Overview
QFieldCloud uses environment variables for configuration. All settings are defined in the.env file at the root of the project. This page documents the most important configuration options.
General Settings
DEBUG
Type: Boolean (0 or 1)Default:
1Production Value:
0
Enables or disables Django debug mode.
QFIELDCLOUD_HOST
Type: StringDefault:
localhostRequired: Yes Main hostname of your QFieldCloud instance. Must not include
http://, https://, trailing slash, or port number.
ENVIRONMENT
Type: StringDefault:
developmentOptions:
development, staging, test, production
Defines the environment where QFieldCloud runs. Used for logging, monitoring, and feature flags.
Security Settings
SECRET_KEY
Type: StringDefault:
change_meRequired: Yes Django secret key used for cryptographic signing. Must be unique and kept secret.
SALT_KEY
Type: StringDefault:
0123456789abcdefghijklmnopqrstuvwxyzRequired: Yes Key used for cryptographic operations on encrypted fields.
Certificate Settings
QFIELDCLOUD_TLS_CERT
Type: File PathDefault:
/etc/nginx/certs/${QFIELDCLOUD_HOST}.pem
Path to TLS certificate file within the nginx container.
QFIELDCLOUD_TLS_KEY
Type: File PathDefault:
/etc/nginx/certs/${QFIELDCLOUD_HOST}-key.pem
Path to TLS private key file within the nginx container.
QFIELDCLOUD_TLS_DHPARAMS
Type: File PathDefault:
/etc/nginx/dhparams/ssl-dhparams.pem
Path to Diffie-Hellman parameters file. Leave empty to disable.
Let’s Encrypt Settings
LETSENCRYPT_EMAIL
Type: EmailDefault:
[email protected]Required: Yes (for Let’s Encrypt) Email address used for Let’s Encrypt registration and recovery.
LETSENCRYPT_RSA_KEY_SIZE
Type: IntegerDefault:
4096
RSA key size for Let’s Encrypt certificates.
LETSENCRYPT_STAGING
Type: Boolean (0 or 1)Default:
1
Use Let’s Encrypt staging environment (avoids rate limits during testing).
Database Settings
POSTGRES_USER
Type: StringDefault:
qfieldcloud_db_admin
PostgreSQL connection user. Must have permissions to create and modify the database.
POSTGRES_PASSWORD
Type: StringDefault:
3shJDd2r7TwwkehbRequired: Yes PostgreSQL connection password.
POSTGRES_DB
Type: StringDefault:
qfieldcloud_db
PostgreSQL database name. Will be created if it doesn’t exist.
POSTGRES_HOST
Type: StringDefault:
db
PostgreSQL host. Use db for standalone deployment or your external database hostname.
POSTGRES_PORT
Type: IntegerDefault:
5432
PostgreSQL port.
POSTGRES_SSLMODE
Type: StringDefault:
preferOptions:
disable, allow, prefer, require, verify-ca, verify-full
PostgreSQL SSL mode. Use require or higher for production.
Storage Settings
STORAGES
Type: JSONRequired: Yes Defines storage backends for QFieldCloud. Supports S3, MinIO, and WebDAV.
Default S3/MinIO Configuration
AWS S3 Configuration
WebDAV Configuration
STORAGES_PROJECT_DEFAULT_STORAGE
Type: StringDefault: (empty, uses
default)
Default storage backend for new projects. Must be a key from STORAGES.
STORAGES_PROJECT_DEFAULT_ATTACHMENTS_STORAGE
Type: StringDefault: (empty, uses
default)
Default attachments storage for new projects.
Nginx Settings
WEB_HTTP_PORT
Type: IntegerDefault:
80
Public HTTP port.
WEB_HTTPS_PORT
Type: IntegerDefault:
443
Public HTTPS port.
NGINX_ERROR_LOG_LEVEL
Type: StringDefault:
errorOptions:
debug, info, notice, warn, error, crit, alert, emerg
Nginx error log level.
NGINX_CLIENT_MAX_BODY_SIZE
Type: StringDefault:
10g
Maximum allowed size of client request body.
NGINX_PROXY_TIMEOUTS
Gunicorn Settings
GUNICORN_TIMEOUT_S
Type: IntegerDefault:
300
Maximum seconds a worker can handle a request before being killed.
GUNICORN_MAX_REQUESTS
Type: IntegerDefault:
300
Maximum requests a worker processes before restarting (prevents memory leaks).
GUNICORN_WORKERS
Type: IntegerDefault:
3
Number of worker processes.
GUNICORN_THREADS
Type: IntegerDefault:
3
Number of threads per worker.
Email Settings
EMAIL_HOST
Type: StringDefault:
smtp4dev
SMTP server hostname.
EMAIL_PORT
Type: IntegerDefault:
25
SMTP server port.
EMAIL_USE_TLS
Type: BooleanDefault:
False
Use TLS encryption.
EMAIL_USE_SSL
Type: BooleanDefault:
False
Use SSL encryption.
EMAIL_HOST_USER
Type: StringDefault:
user
SMTP authentication username.
EMAIL_HOST_PASSWORD
Type: StringDefault:
password
SMTP authentication password.
DEFAULT_FROM_EMAIL
Type: EmailDefault:
webmaster@localhost
Default sender email address.
Authentication Settings
QFIELDCLOUD_PASSWORD_LOGIN_IS_ENABLED
Type: Boolean (0 or 1)Default:
1
Enable/disable password-based login.
ACCOUNT_EMAIL_VERIFICATION
Type: StringDefault:
optionalOptions:
mandatory, optional, none
Email verification requirement level.
QFIELDCLOUD_ACCOUNT_ADAPTER
Type: StringDefault:
qfieldcloud.core.adapters.AccountAdapterSignUpOpenOptions:
qfieldcloud.core.adapters.AccountAdapterSignUpOpen- Open signupqfieldcloud.core.adapters.AccountAdapterSignUpClosed- Closed signup
QFIELDCLOUD_AUTH_TOKEN_EXPIRATION_HOURS
Type: IntegerDefault:
720 (30 days)
Authentication token expiration time in hours.
SOCIALACCOUNT_PROVIDERS
Type: JSONDefault:
{}
OIDC/OAuth2 provider configurations.
Django Settings
DJANGO_ALLOWED_HOSTS
Type: Space-separated stringDefault:
localhost 127.0.0.1 0.0.0.0 app nginx
Allowed hostnames for Django. Must include your domain.
DJANGO_SETTINGS_MODULE
Type: StringDefault:
qfieldcloud.settings
Django settings module to use.
Worker Settings
QFIELDCLOUD_WORKER_QFIELDCLOUD_URL
Type: URLDefault:
http://app:8000/api/v1/
QFieldCloud API URL used by workers.
QFIELDCLOUD_WORKER_REPLICAS
Type: IntegerDefault:
1
Number of parallel worker instances.
TMP_DIRECTORY
Type: Absolute PathDefault:
/tmp
Directory for temporary files shared between containers.
Docker Settings
COMPOSE_PROJECT_NAME
Type: StringDefault:
qfieldcloud
Prefix for Docker containers.
COMPOSE_FILE
Type: Colon-separated listDefault:
docker-compose.yml:docker-compose.override.local.yml
Docker Compose files to use.
Standalone-Only Settings
These settings only apply when using
docker-compose.override.standalone.yml.MinIO Settings
PostgreSQL Settings
SMTP4Dev Settings
Monitoring Settings
SENTRY_DSN
Type: StringDefault: (empty) Sentry DSN for error tracking. Leave empty to disable.
SENTRY_SAMPLE_RATE
Type: Float (0-1)Default:
1
Sentry sample rate.
SENTRY_RELEASE
Type: StringDefault:
dev
Release version shown in Sentry.
Configuration Examples
Minimal Production Configuration
Next Steps
After configuring your environment:- Review SSL Certificate Setup
- Configure Database and Storage
- Set up monitoring and backups
- Test your configuration thoroughly