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

# Environment Variables

> Server-side configuration.

The binary executable can also be configured using environment variables.

Note, you must opt-in to this by setting the `-env` flag when starting the server. This mode of configuration is useful for containerized environments like Docker where it is difficult to pass command-line arguments.

<Info>If you are using the pre-built Docker images, this flag has already been set.</Info>

## Variables

* `APP_DATABASE_HOST`: Path to app database. Default is `./me_meta.db`.

* `ANALYTICS_DATABASE_HOST`: Path to analytics database. Default is `./me_analytics.db`.

* `AUTO_SSL`: Automatically provision SSL certificates to the specified domain and redirect HTTP requests to HTTPS. Requires the server to run on ports 80 and 443. The domain must be publicly accessible and resolve to the server.

* `AUTO_SSL_EMAIL`: Email address to optionally send SSL certificate notifications.

* `PORT`: Port to listen on. Default is `8080`.

* `LOGGER`: Logger format. Default is `json`. Options are `json` and `pretty`.

* `LEVEL`: Logger level. Default is `info`. Options are `debug`, `info`, `warn`, and `error`.

* `CORS_ALLOWED_ORIGINS`: Comma-separated list of allowed CORS origins on API routes. Useful for external dashboards that may host the frontend on a different domain.
