Skip to main content
Version: 1.38.0

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​

warning

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 VariableDescriptionPossible valuesDefault
PUIDUser ID to run the container asAny valid user ID0
PGIDGroup ID to run the container asAny valid group ID0
LOG_LEVELLog level to usedebug / info / warn / errorinfo
NO_EXTERNAL_CONNECTIONDisables some requests that need internet connectiontrue or falsefalse
ENABLE_DNS_CACHINGEnables dns caching. This is not yet working for all users. See #4006true or falsefalse

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 VariableDescriptionPossible valuesDefault
SECRET_ENCRYPTION_KEYSecret used to encrypt secrets in database.64 character hex string-
info

A random secret can be generated by using the following command: openssl rand -hex 32

Docker​

Environment VariableDescriptionPossible valuesDefault
DOCKER_HOSTNAMESComma seperated list of hostnames to connect toFor example localhost,docker.example.com-
DOCKER_PORTSComma seperated list of ports to connect toFor example 2375,2376-

Database​

Environment VariableDescriptionPossible valuesDefault
DB_DRIVERDatabase driver to use. Currently better-sqlite3 is used for sqlite, mysql2 for mysql and node-postgres for postgresqlbetter-sqlite3 / mysql2 / node-postgresbetter-sqlite3
DB_DIALECTDatabase dialect to use.sqlite / mysql / postgresqlsqlite
DB_URLDatabase URL to connect to.Any valid database URL/appdata/db/db.sqlite
DB_HOSTDatabase host to connect to.Any valid database host-
DB_PORTDatabase port to connect to.Any valid database port-
DB_NAMEDatabase name to connect to.Any valid database name-
DB_USERDatabase user to connect with.Any valid database user-
DB_PASSWORDDatabase 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.

Redis​

By default Redis is running within the installation. (for example in Docker). However for example for K8s it can be useful to use an external Redis instance.

note

External redis is currently not supported with Proxmox Community Scripts

Environment VariableDescriptionPossible valuesDefault
REDIS_IS_EXTERNALWhether Redis is running externally.true / falsefalse
REDIS_HOSTHostname of the Redis instance.Any valid hostname-
REDIS_PORTPort of the Redis instance.Any valid port6379
REDIS_USERNAMEUsername to connect to the Redis instance.Any valid username-
REDIS_PASSWORDPassword to connect to the Redis instance.Any valid password-
REDIS_DATABASE_INDEXSelect which database of your redis instance should be used.Any numeric index-
REDIS_TLS_CACA certificate for Redis TLS connections. If a certificate is specified the connection will use TLS.Any valid CA certificate-

Advanced deployments​

warning

The advanced deployments environment variables should only be used if you know what you are doing.

Environment VariableDescription
DB_MIGRATIONS_DISABLEDDisable db migrations. For example for helm charts