Environment variables
Homarr offers a Docker Container, which can be run on any compatible system, such as Unraid, Kubernetes and many more systems! Our Docker container is based on the 22.12.0-alpine image and serves per standard on the port 7575.
Homarr offers a few environment variables, which can be used to configure the container.
General​
Using the PUID and PGID will require you to set the correct permissions on the mounted volumes and if used the docker socket. See more in the Running as a different user documentation.
| Environment Variable | Description | Possible values | Default | 
|---|---|---|---|
| PUID | User ID to run the container as | Any valid user ID | 0 | 
| PGID | Group ID to run the container as | Any valid group ID | 0 | 
| LOG_LEVEL | Log level to use | debug/info/warn/error | info | 
| NO_EXTERNAL_CONNECTION | Disables some requests that need internet connection | trueorfalse | false | 
| ENABLE_DNS_CACHING | Enables dns caching. This is not yet working for all users. See #4006 | trueorfalse | false | 
Authentication​
See Single Sign-On for more informations.
Security​
The SECRET_ENCRYPTION_KEY is required. If none is specified before starting the container, a random key will be shown in the error message and the container will exit.
| Environment Variable | Description | Possible values | Default | 
|---|---|---|---|
| SECRET_ENCRYPTION_KEY | Secret used to encrypt secrets in database. | 64 character hex string | - | 
A random secret can be generated by using the following command: openssl rand -hex 32
Docker​
| Environment Variable | Description | Possible values | Default | 
|---|---|---|---|
| DOCKER_HOSTNAMES | Comma seperated list of hostnames to connect to | For example localhost,docker.example.com | - | 
| DOCKER_PORTS | Comma seperated list of ports to connect to | For example 2375,2376 | - | 
Database​
| Environment Variable | Description | Possible values | Default | 
|---|---|---|---|
| DB_DRIVER | Database driver to use. Currently better-sqlite3is used for sqlite,mysql2for mysql andnode-postgresfor postgresql | better-sqlite3/mysql2/node-postgres | better-sqlite3 | 
| DB_DIALECT | Database dialect to use. | sqlite/mysql/postgresql | sqlite | 
| DB_URL | Database URL to connect to. | Any valid database URL | /appdata/db/db.sqlite | 
| DB_HOST | Database host to connect to. | Any valid database host | - | 
| DB_PORT | Database port to connect to. | Any valid database port | - | 
| DB_NAME | Database name to connect to. | Any valid database name | - | 
| DB_USER | Database user to connect with. | Any valid database user | - | 
| DB_PASSWORD | Database password to connect with. | Any valid database password | - | 
You can either use the url or host, port, name and credentials combined. The URL will be prioritized over the other values.
Advanced deployments​
The advanced deployments environment variables should only be used if you know what you are doing.
| Environment Variable | Description | 
|---|---|
| DB_MIGRATIONS_DISABLED | Disable db migrations. For example for helm charts |