Deploy with Dokploy
Deploy OpenPanel using Dokploy's Docker Compose template
Dokploy is an open-source, self-hosted platform for deploying applications. OpenPanel can be deployed on Dokploy using the Docker Compose template, with some specific configuration requirements.
⚠️ Important: The Dokploy template requires specific configuration that differs from Coolify. Make sure to follow all steps carefully, especially the environment variables and domain configuration.
⚠️ Important: We have an open issue on dokploy https://github.com/Dokploy/templates/issues/292 and hoping it will be resolved.
Prerequisites
- A Dokploy instance installed and running
- A server with at least 2GB RAM (4GB+ recommended)
- Domain name configured in Dokploy
Quick Start
Deploy OpenPanel Template
- Log in to your Dokploy dashboard
- Navigate to your project
- Click "New Application" or "Deploy"
- Select "Docker Compose" or search for "OpenPanel" template
- Select the OpenPanel template
Configure Domain Names
Configure your domain names in Dokploy:
- Set up the main domain for the dashboard (e.g.,
analytics.yourdomain.com) - Configure the API domain - this should be the same domain as the dashboard, with the API path forwarded to
/api
The API and dashboard use the same domain. The API service has a forward path to /api, so make sure to configure this correctly.
Configure Environment Variables
Edit the .env file or environment variables in Dokploy. You must set these environment variables:
⚠️ Critical: Unlike Coolify, Dokploy does not support SERVICE_FQDN_* variables. You must hardcode NEXT_PUBLIC_API_URL and NEXT_PUBLIC_DASHBOARD_URL with your actual domain values.
Configure API Service Domain Settings
In Dokploy, configure the API service domain:
- Go to the
op-apiservice configuration - Set up the domain configuration:
- Important: Check the "Strip external path" checkbox for the API service
The "Strip external path" option is crucial! Without it, the API will receive incorrect paths when requests are forwarded from /api.
Deploy
- Review all configuration
- Click "Deploy" or "Save"
- Wait for all services to start and become healthy
Monitor the deployment logs to ensure all services start correctly.
Verify Installation
Once deployment is complete:
-
Check that all services are running:
op-api- API serverop-dashboard- Dashboard (frontend)op-worker- Background workerop-db- PostgreSQL databaseop-kv- Redis cacheop-ch- ClickHouse database
-
Access your dashboard at your configured domain
-
Try creating an account to verify the API is working correctly
If you're using Cloudflare in front of Dokploy, remember to purge the Cloudflare cache after making changes to ensure updated resources are served.
Configuration Details
Required Environment Variables
For Dokploy, you must hardcode these variables (unlike Coolify, Dokploy doesn't support SERVICE_FQDN_* variables):
NEXT_PUBLIC_API_URL- Full API URL (e.g.,https://analytics.example.com/api)NEXT_PUBLIC_DASHBOARD_URL- Full Dashboard URL (e.g.,https://analytics.example.com)
Dokploy automatically sets:
OPENPANEL_POSTGRES_DB- PostgreSQL database nameSERVICE_USER_POSTGRES- PostgreSQL usernameSERVICE_PASSWORD_POSTGRES- PostgreSQL password (auto-generated)SERVICE_PASSWORD_REDIS- Redis password (auto-generated)
For a complete reference of all available environment variables, see the Environment Variables documentation.
Domain Configuration
The API and dashboard services share the same domain:
- Dashboard: Serves the frontend at the root path (
/) - API: Serves the API at
/apipath
Important settings for the API service:
- Domain: Same as dashboard domain
- Path:
/api - Strip external path: ✅ Must be checked
This ensures that when requests come to /api/*, the path is correctly forwarded to the API service without the /api prefix.
Troubleshooting
API Requests Not Working
If API requests fail after deployment:
-
Verify environment variables:
-
Check "Strip external path" setting:
- Go to API service configuration in Dokploy
- Ensure "Strip external path" is checked
-
Verify domain configuration:
- API service should have path
/api - Dashboard service should be at root
/
- API service should have path
Account Creation Not Working
If account creation fails:
-
Check API logs:
-
Verify
NEXT_PUBLIC_API_URLmatches your domain:- Should be
https://yourdomain.com/api - Not
http://localhost:3000or similar
- Should be
-
Check that the API service is accessible:
Cloudflare Cache Issues
If you're using Cloudflare in front of Dokploy:
- After deploying or updating, purge Cloudflare cache
- This ensures updated resources are served immediately
- You can do this from Cloudflare dashboard or API
Database Connection Issues
If services can't connect to databases:
-
Verify database services are running:
op-db(PostgreSQL)op-kv(Redis)op-ch(ClickHouse)
-
Check environment variables are set:
-
Verify service names match in docker-compose:
- Database service names:
op-db,op-kv,op-ch - These should match the hostnames in connection strings
- Database service names:
Docker Compose Structure
The OpenPanel template includes these services:
- op-api: OpenPanel API server
- op-dashboard: OpenPanel dashboard (frontend)
- op-worker: Background worker for processing events
- op-db: PostgreSQL database
- op-kv: Redis cache
- op-ch: ClickHouse analytics database
Differences from Coolify
The Dokploy template differs from Coolify in these ways:
-
Environment Variables:
- Dokploy does not support
SERVICE_FQDN_*variables - Must hardcode
NEXT_PUBLIC_API_URLandNEXT_PUBLIC_DASHBOARD_URL
- Dokploy does not support
-
Domain Configuration:
- Must manually configure domain paths
- Must enable "Strip external path" for API service
-
Service Discovery:
- Uses standard Docker Compose service names
- No automatic FQDN resolution
Updating OpenPanel
To update OpenPanel in Dokploy:
-
Pull the latest images:
-
Restart services:
Or use Dokploy's UI to restart services.
Next Steps
- Configure email settings for password resets and invitations
- Set up AI integration for the analytics assistant
- Configure SDK to track events from your applications
Additional Resources
- Dokploy Documentation
- OpenPanel GitHub Issue #292 - Discussion about Dokploy deployment