SafariDesk Self-Hosted Configuration
SafariDesk self-hosting is configured through one root.env file.
Start from:
.env.
Related pages:
Configuration Rules
Use these rules for production:- Replace every
change-me-*value. - Keep secrets out of Git.
- Use one public hostname unless you intentionally configure split-domain routing.
- Keep
DEBUG=false. - Keep PostgreSQL and Redis private inside Docker Compose.
- Pin
SAFARIDESK_IMAGE_TAGto a release tag. - Back up
.envsecurely with your infrastructure secrets, not in this repository.
Minimum Production Values
At minimum, update these before public deployment:Same-Domain URL Configuration
Same-domain deployment is the default and recommended setup. Example:.env values:
VITE_WS_NOTIFICATIONS_URL and VITE_CHAT_WS_BASE are empty, the frontend derives WebSocket URLs from the browser origin.
Split-Domain URL Configuration
Split-domain deployment is supported for advanced deployments. Example:.env values:
deploy/nginx/split-domain.conf as the starting point if you need this model.
App Identity
Production example:
Docker Images
Production example:
Domains and URLs
Use
https:// values in production.
Frontend Public Config
These variables are passed as Docker build args tofrontend/Dockerfile and are baked into the Vite frontend build.
Important: changing
VITE_* values requires rebuilding the frontend image.
Security
Generate secrets with your password manager or a secure random generator.
Example:
Database
Do not expose PostgreSQL directly to the internet.
Redis and Celery
If you set
REDIS_PASSWORD, update Celery URLs too.
Example:
Email and SMTP
Use either TLS or SSL according to your provider. Do not set both to true unless your SMTP provider explicitly requires it.
Admin Bootstrap
Create the admin user with:
Mail Integrations and OAuth
Placeholder provider links:
Integrations
Leave unused integrations empty.
AI Providers
Leave
GEMINI_API_KEY empty if AI features are not enabled.
Billing and Licensing
Placeholder links:
Optional Ports
Example for local testing on a busy host:
Docker Log Container Names
The environment file includes container names used by backend admin log features:Rebuild Requirements
Changes to these variables require a frontend rebuild because they are baked into the Vite build:VITE_API_URLVITE_WS_NOTIFICATIONS_URLVITE_CHAT_WS_BASEVITE_SITE_URLVITE_ALLOW_OTP
.env changes only require restarting services:

