Deploying and managing a self-hosted Latitude instance for production use.
app
service).gateway
service).worker
service).websockets
service).docker compose
on a single machine, production deployments often benefit from more robust methods:
.env
file (strong passwords, S3 storage, proper domain/SSL setup via Traefik or another proxy).
.env
File: Set strong POSTGRES_PASSWORD
, configure APP_DOMAIN
and APP_URL
, set up MAIL_TRANSPORT
(e.g., SMTP, Mailgun) with valid credentials, configure DRIVE_DISK
(recommend s3
).DRIVE_DISK=s3
) for scalability and persistence. Configure bucket names and IAM roles or access keys securely.OPT_OUT_ANALYTICS=true
in your .env
file..env
file (e.g., OPENAI_API_KEY=sk-...
).web
, gateway
, worker
, websockets
). Scale database and Redis resources vertically or use managed services that scale.docker compose pull && docker compose up -d
, kubectl rollout restart deployment
, update ECS service).docker-compose.yml
includes a migrations service) or run them manually before updating application services (cd packages/core && pnpm db:migrate
).DRIVE_DISK=local
), ensure the storage volume is backed up.SENTRY_DSN
) or PostHog in your .env
for enhanced error tracking and analytics.