Overview

camelAI uses environment variables to configure various aspects of the application. These variables are typically set in a .env.docker file in the project root. A template file is provided in the repository.

Required Variables

Django Settings

# This is the Django secret key. Change it to a secure key in production.
DJANGO_SECRET_KEY=change_this_to_a_secure_key_in_production

# This is the hostname and site URL. Change it to your own domain in production.
HOSTNAME=localhost
SITE_URL=http://localhost:8000

Database Configuration

# This is the password for the internal postgres user. Change it to a secure password in production.
POSTGRES_PASSWORD=secure_password
DB_PASSWORD=${POSTGRES_PASSWORD}

Email Configuration

# Set to True if SMTP is not setup.
DISABLE_EMAIL=True

AI Provider Settings

At least one LLM provider is needed for camelAI to function. You can configure one or more of the following providers:

OpenAI

# Set this to your OpenAI API key if using OpenAI
# OPENAI_API_KEY=your_openai_api_key

Anthropic

# Set this to your Anthropic API key if using Anthropic
# ANTHROPIC_API_KEY=your_anthropic_api_key

AWS Bedrock

# Set these to your own AWS credentials if using Bedrock
# AWS_ACCESS_KEY_ID=your_access_key_id
# AWS_SECRET_ACCESS_KEY=your_secret_access_key
# AWS_REGION=your_region

Azure OpenAI

# Set these to your own Azure credentials if using Azure OpenAI
# AZURE_OPENAI_ENDPOINT=your_azure_endpoint
# AZURE_OPENAI_API_KEY=your_azure_api_key

For detailed instructions on setting up Azure OpenAI, see our Azure OpenAI Setup Guide.

Example Configuration

Here’s a complete example of a .env.docker file:

# This is the Django secret key. Change it to a secure key in production.
DJANGO_SECRET_KEY=change_this_to_a_secure_key_in_production

# This is the hostname and site URL. Change it to your own domain in production.
HOSTNAME=localhost
SITE_URL=http://localhost:8000

# This is the password for the internal postgres user. Change it to a secure password in production.
POSTGRES_PASSWORD=secure_password
DB_PASSWORD=${POSTGRES_PASSWORD}

# Set to True if SMTP is not setup.
DISABLE_EMAIL=True

# Set this to your OpenAI API key if using OpenAI
# OPENAI_API_KEY=your_openai_api_key

# Set this to your Anthropic API key if using Anthropic
# ANTHROPIC_API_KEY=your_anthropic_api_key

# Set these to your own AWS credentials if using Bedrock
# AWS_ACCESS_KEY_ID=your_access_key_id
# AWS_SECRET_ACCESS_KEY=your_secret_access_key
# AWS_REGION=your_region

# Set these to your own Azure credentials if using Azure OpenAI
# AZURE_OPENAI_ENDPOINT=your_azure_endpoint
# AZURE_OPENAI_API_KEY=your_azure_api_key

Security Best Practices

  1. Never commit the .env.docker file to version control
  2. Use strong, unique passwords for all credentials
  3. Keep your secret keys secure and rotate them regularly
  4. Use HTTPS in production

Updating Variables

After updating environment variables:

  1. Stop the services:

    docker compose down
    
  2. Rebuild and restart:

    docker compose -f docker-compose.prod.yml up -d --build
    

Next Steps

After configuring your environment variables:

  1. Start the Services
  2. Create a Superuser
  3. Begin Using camelAI