docker-compose.yml or .env file. This page documents all available options.
Required Variables
These variables must be set for Zerobyte to function properly.APP_SECRET
Required - A secret key used to encrypt sensitive data in the database.- Type: String
- Minimum length: 32 characters
- Maximum length: 256 characters
- Default: None (must be set)
BASE_URL
Required - The base URL where your Zerobyte instance will be accessed.- Type: String (valid URL)
- Default: None (must be set)
- Examples:
http://192.168.1.50:4096http://localhost:4096https://zerobyte.example.com
The protocol (
http:// or https://) affects cookie security. See Authentication for details.Server Configuration
PORT
The port the web interface and API will listen on.- Type: Integer
- Default:
4096
SERVER_IP
The IP address the server will bind to.- Type: String
- Default:
localhost
SERVER_IDLE_TIMEOUT
Idle timeout for the server in seconds.- Type: Integer (as string)
- Default:
60
Environment & Logging
NODE_ENV
The application environment mode.- Type: Enum (
development,production,test) - Default:
production
This is automatically set in the Docker image. You typically don’t need to change this.
LOG_LEVEL
Logging verbosity level.- Type: Enum (
debug,info,warn,error) - Default:
info(production),debug(development)
TZ
Timezone for the container. Crucial for accurate backup scheduling.- Type: String (TZ database name)
- Default:
UTC - Examples:
Europe/Paris,America/New_York,Asia/Tokyo
Security & Access Control
TRUSTED_ORIGINS
Comma-separated list of additional trusted origins for CORS.- Type: String (comma-separated URLs)
- Default: None (only
BASE_URLis trusted)
The
BASE_URL is automatically added to the trusted origins list.DISABLE_RATE_LIMITING
Disable rate limiting for API requests.- Type: String (
trueorfalse) - Default:
false
Restic Configuration
RESTIC_HOSTNAME
The hostname used by Restic when creating snapshots.- Type: String
- Default:
zerobyte(auto-detected from container hostname)
If you set a custom hostname in Docker, Zerobyte will automatically detect it. You only need to set this variable if you want to override the detected hostname.
RESTIC_CACHE_DIR
Path to the Restic cache directory inside the container.- Type: String (path)
- Default:
/var/lib/zerobyte/restic/cache
RESTIC_PASS_FILE
Path to the Restic password file inside the container.- Type: String (path)
- Default:
/var/lib/zerobyte/data/restic.pass
Storage Paths
These variables control where Zerobyte stores data inside the container.ZEROBYTE_DATABASE_URL
Path to the SQLite database file.- Type: String (path)
- Default:
/var/lib/zerobyte/data/zerobyte.db
ZEROBYTE_VOLUMES_DIR
Base directory for mounting remote volumes.- Type: String (path)
- Default:
/var/lib/zerobyte/volumes
ZEROBYTE_REPOSITORIES_DIR
Base directory for local repositories.- Type: String (path)
- Default:
/var/lib/zerobyte/repositories
Rclone Configuration
RCLONE_CONFIG_DIR
Path to the rclone config directory inside the container.- Type: String (path)
- Default:
/root/.config/rclone
Change this if your container runs as a non-root user (e.g., TrueNAS apps).
Development Options
ENABLE_DEV_PANEL
Enable the development panel for debugging.- Type: String (
trueorfalse) - Default:
false
APP_VERSION
Override the application version string.- Type: String
- Default:
dev
MIGRATIONS_PATH
Custom path for database migrations.- Type: String (path)
- Default: None (uses default location)
Secret References
For enhanced security, Zerobyte supports dynamic secret resolution for sensitive fields in volume and repository configurations. Instead of storing encrypted secrets in the database, you can reference them using:Environment Variable Secrets
Prefix:env://VAR_NAME
env://ZEROBYTE_SMB_PASSWORD
File-based Secrets (Docker Secrets)
Prefix:file://SECRET_NAME
file://smb_password
The secret will be read from /run/secrets/smb_password (standard Docker Secrets path).
Complete Example
Here’s a completedocker-compose.yml with all common environment variables:
Local Development
When running Zerobyte without Docker for development, create a.env.local file:
Remote mount backends (NFS/SMB/WebDAV/SFTP) require Linux mount tooling and
CAP_SYS_ADMIN, so they may not work on macOS during local development.