Introduction

Introduction

Welcome to Defog! Defog is the fastest way to get the data you need, when you need it. You can get to specific data points in seconds or explore broad trends in minutes - without having to wait on someone else.

Type in your question in plain language and Defog's AI engine fetches the relevant data and visualizes it for you. Test it out here (opens in a new tab)

Quick Start

For production use, refer to our docker deployment guide.:

Cloning the repo

Clone the defog-docker (opens in a new tab) repository:

git clone https://github.com/defog-ai/defog-docker
cd defog-docker

Installing docker and docker-compose

Install docker and docker compose, if you have not already. You can find the installation instructions here (opens in a new tab).

Getting your Defog API Key

If you do not yet have a Defog API Key, sign up at https://defog.ai/signup (opens in a new tab) to get a free one. The free key lets you query up to 5 tables with 25 total columns, and up to 1000 queries per month. If you want to query more complex databases, you can upgrade to a paid plan.

Updating the .env file

Update the .env file with your DEFOG_API_KEY and DEFOG_API_KEY_NAMES variables. You can use multiple API keys by providing a comma-separated list of API keys. If you do so, then users will be able to select from multiple databases from a UI dropdown, like below

Multiple API Keys

DEFOG_API_KEY_NAMES is a comma-separated list of human readable API key names that you want to display to users. This is to ensure that end-users can easily select the correct API key when querying the database, without you having to expose the actual API key. These can be any string, but should be unique and easily identifiable.

Here is an example of what the .env file should look like:

With a single API key:

DEFOG_API_KEY=YOUR_API_KEY
DEFOG_API_KEY_NAMES="My Dataset"
...

With multiple API keys

DEFOG_API_KEY=YOUR_API_KEY_1,YOUR_API_KEY_2
DEFOG_API_KEY_NAMES="Dataset 1,Dataset 2"
...

Running the app

To start the app, run the following command:

docker compose up

Log In

You can then view Defog's UI in your browser by visiting http://localhost:80, and log in with the default user id admin and password admin.