> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sitecopilot.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Docker config

id: docker-config

title: Docker Configuration (.env)

This page documents the environment variables used by the Docker deployment. Use a `.env` file and avoid committing secrets to git.

## Minimal `.env` example

```

# App

SITECOPILOT_BASE_URL=https://docs.example.com # public base url

SITECOPILOT_PORT=8080

  

# Database (MySQL)

MYSQL_ROOT_PASSWORD=ChangeMeRoot!

MYSQL_DATABASE=sitecopilot

MYSQL_USER=sc_user

MYSQL_PASSWORD=ChangeMeDB!

MYSQL_HOST=mysql

MYSQL_PORT=3306

  

# Redis

REDIS_HOST=redis

REDIS_PORT=6379

REDIS_PASSWORD=

  

# Admin/initial token (optional; create via dashboard otherwise)

SITECOPILOT_ADMIN_TOKEN=

  

# Storage (optional)

# If using S3-compatible storage for uploads

S3_ENDPOINT=

S3_BUCKET=

S3_REGION=

S3_KEY=

S3_SECRET=

  

# Email (optional)

SMTP_HOST=

SMTP_PORT=587

SMTP_USER=

SMTP_PASS=

  

# Other

LOG_LEVEL=info

```

### Notes

* You can either provide the MySQL fields individually (as above) or use a single `DATABASE_URL` such as:

`DATABASE_URL=mysql://sc_user:pass@mysql:3306/sitecopilot`

* If Redis requires auth, set `REDIS_PASSWORD` and ensure the site config is aware.

* Keep secrets out of source control; use a secrets manager for production.

## Recommended filesystem layout

* `volumes` for MySQL, Redis and uploads (persistent storage).

* Backups: schedule `mysqldump` to an object storage or snapshot volumes.
