Deploy AppFlowy with Dokploy: Docker Compose Setup Guide
Step-by-step guide to deploying AppFlowy Cloud collaborative workspace on your VPS using Dokploy and Docker Compose. Includes PostgreSQL, Redis, GoTrue auth, and SSL.
Deploy AppFlowy with Dokploy
Dokploy is an open-source server management platform that simplifies deploying Docker Compose applications on your VPS. It handles reverse proxy configuration, SSL certificates, and deployment management — which is helpful for running AppFlowy Cloud's multi-service architecture.
This guide walks you through deploying AppFlowy Cloud with PostgreSQL, Redis, and GoTrue authentication. AppFlowy Cloud provides the sync server for AppFlowy's collaborative workspace, enabling real-time collaboration and cloud backup for the desktop and mobile apps.
Prerequisites
- A VPS with at least 2 vCPUs, 4 GB RAM, and 20 GB storage
- Dokploy installed and running on your server (installation docs)
- A domain name (e.g.,
appflowy.yourdomain.com) with DNS A record pointing to your server's IP
Docker Compose Configuration
Create a new Compose project in Dokploy and paste the following configuration:
version: "3.8"
services:
appflowy-cloud:
image: appflowyinc/appflowy_cloud:latest
restart: unless-stopped
ports:
- "8025:8025"
environment:
- APPFLOWY_ENVIRONMENT=production
- APPFLOWY_DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@appflowy-db:5432/${POSTGRES_DB}
- APPFLOWY_REDIS_URI=redis://appflowy-redis:6379
- APPFLOWY_GOTRUE_BASE_URL=http://appflowy-gotrue:9999
- APPFLOWY_S3_USE_MINIO=true
- APPFLOWY_S3_MINIO_URL=http://appflowy-minio:9000
- APPFLOWY_S3_ACCESS_KEY=${MINIO_ACCESS_KEY}
- APPFLOWY_S3_SECRET_KEY=${MINIO_SECRET_KEY}
- APPFLOWY_S3_BUCKET=appflowy
- APPFLOWY_S3_REGION=us-east-1
depends_on:
appflowy-db:
condition: service_healthy
appflowy-redis:
condition: service_healthy
appflowy-gotrue:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8025/api/health"]
interval: 10s
timeout: 5s
retries: 10
appflowy-gotrue:
image: appflowyinc/gotrue:latest
restart: unless-stopped
environment:
- GOTRUE_API_HOST=0.0.0.0
- GOTRUE_API_PORT=9999
- API_EXTERNAL_URL=https://${APPFLOWY_DOMAIN}
- GOTRUE_DB_DRIVER=postgres
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@appflowy-db:5432/${POSTGRES_DB}?search_path=auth
- GOTRUE_SITE_URL=https://${APPFLOWY_DOMAIN}
- GOTRUE_JWT_SECRET=${JWT_SECRET}
- GOTRUE_JWT_EXP=3600
- GOTRUE_MAILER_AUTOCONFIRM=true
- GOTRUE_DISABLE_SIGNUP=false
depends_on:
appflowy-db:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9999/health"]
interval: 10s
timeout: 5s
retries: 5
appflowy-db:
image: postgres:16-alpine
restart: unless-stopped
environment:
- POSTGRES_DB=${POSTGRES_DB:-appflowy}
- POSTGRES_USER=${POSTGRES_USER:-appflowy}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- ../files/appflowy-db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-appflowy}"]
interval: 10s
timeout: 5s
retries: 5
appflowy-redis:
image: redis:7-alpine
restart: unless-stopped
volumes:
- ../files/appflowy-redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
appflowy-minio:
image: minio/minio:latest
restart: unless-stopped
command: server /data --console-address ":9001"
environment:
- MINIO_ROOT_USER=${MINIO_ACCESS_KEY}
- MINIO_ROOT_PASSWORD=${MINIO_SECRET_KEY}
volumes:
- ../files/appflowy-minio-data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 10s
retries: 3
Note: AppFlowy Cloud requires MinIO (or S3-compatible storage) for file storage. This compose file includes a MinIO service for local object storage. For production, you can replace MinIO with an external S3-compatible provider by updating the
APPFLOWY_S3_*variables.
Environment Variables
Set these in Dokploy's Environment tab for your compose project:
| Variable | Purpose | Example |
|---|---|---|
APPFLOWY_DOMAIN |
Your AppFlowy domain | appflowy.yourdomain.com |
POSTGRES_USER |
PostgreSQL username (default: appflowy) | appflowy |
POSTGRES_PASSWORD |
PostgreSQL password | a-strong-random-password |
POSTGRES_DB |
PostgreSQL database name (default: appflowy) | appflowy |
JWT_SECRET |
GoTrue JWT signing secret (32+ chars) | a-long-random-jwt-secret |
MINIO_ACCESS_KEY |
MinIO access key | minioadmin |
MINIO_SECRET_KEY |
MinIO secret key | a-strong-minio-secret |
In Dokploy, environment variables are set via the Environment editor in the project settings. Do not create a .env file manually — Dokploy manages this for you. Ensure the JWT secret is consistent between the cloud and gotrue services.
Volumes & Data Persistence
This setup uses Dokploy's ../files convention for bind-mounted volumes:
../files/appflowy-db-data— PostgreSQL database (user data, workspaces, documents)../files/appflowy-redis-data— Redis persistence data../files/appflowy-minio-data— MinIO object storage (file uploads, images)
The ../files path is relative to the compose file inside Dokploy's project directory. This ensures your data persists across redeployments. Avoid using absolute paths because Dokploy may clean them during redeployment.
Domain & SSL Setup
- In your Dokploy project, navigate to the Domains tab
- Click Add Domain and enter your domain (e.g.,
appflowy.yourdomain.com) - Set the container port to
8025(AppFlowy Cloud API port) - Enable HTTPS — Dokploy automatically provisions a Let's Encrypt SSL certificate
- Save and wait for the certificate to be issued (usually under a minute)
Dokploy's built-in Traefik reverse proxy handles TLS termination and routes traffic to the AppFlowy Cloud service.
Verifying the Deployment
- In Dokploy, go to your project's Deployments tab and click Deploy
- Watch the build logs — services should start in order (database and Redis first, then GoTrue and MinIO, then AppFlowy Cloud)
- Check the Logs tab for
appflowy-cloud. Look for the health endpoint responding - Open
https://appflowy.yourdomain.com/api/health— you should see a success response - Configure the AppFlowy desktop app to use your self-hosted server URL
- Create an account and verify syncing works between devices
Troubleshooting
AppFlowy Cloud fails to start
Check that PostgreSQL and Redis are healthy first. The cloud service depends on both being available. Verify the APPFLOWY_DATABASE_URL connection string uses the correct credentials and host name.
GoTrue authentication errors
Ensure JWT_SECRET is at least 32 characters and consistent between services. Check GoTrue logs for database migration errors. The PostgreSQL database needs the auth schema — GoTrue creates it automatically on first run.
MinIO bucket not found
The AppFlowy S3 bucket must be created before use. You can create it via the MinIO console at port 9001 or using the mc CLI tool. Ensure MINIO_ROOT_USER and MINIO_ROOT_PASSWORD match the APPFLOWY_S3_* credentials.
Desktop app cannot connect to server Verify the domain is accessible from outside your network. The AppFlowy desktop app needs to reach the API endpoint over HTTPS. Check that the domain resolves correctly and the SSL certificate is valid.
SSL certificate not issuing Ensure your domain's DNS A record points to your server's IP and has propagated. Dokploy uses Let's Encrypt HTTP-01 challenges, so port 80 must be accessible. Check Traefik logs in Dokploy for certificate-related errors.
Learn more about AppFlowy in our complete overview.
Need a VPS? Hostinger VPS starts at $4.99/mo — perfect for running AppFlowy.
For more on Docker Compose deployments in Dokploy, see the Dokploy Docker Compose documentation.
App data sourced from selfh.st open-source directory.
Ready to get started?
Get the best VPS hosting deal today. Hostinger offers 4GB RAM VPS starting at just $4.99/mo.
Get Hostinger VPS — $4.99/mo// up to 75% off + free domain included
// related topics
fordnox
Expert VPS reviews and hosting guides. We test every provider we recommend.
// last updated: February 12, 2026. Disclosure: This article may contain affiliate links.