Deploy NocoDB with Dokploy: Docker Compose Setup Guide
Step-by-step guide to deploying NocoDB no-code database on your VPS using Dokploy and Docker Compose. Includes PostgreSQL backend, persistent storage, and SSL.
Deploy NocoDB 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 — making it straightforward to run NocoDB as a self-hosted Airtable alternative.
This guide walks you through deploying NocoDB with a PostgreSQL database backend, persistent data storage, and automatic HTTPS.
Prerequisites
- A VPS with at least 1 vCPU, 2 GB RAM, and 10 GB storage
- Dokploy installed and running on your server (installation docs)
- A domain name (e.g.,
nocodb.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:
nocodb:
image: nocodb/nocodb:latest
restart: unless-stopped
ports:
- "8080:8080"
environment:
- NC_DB=pg://nocodb-db:5432?u=nocodb&p=${NOCODB_DB_PASSWORD}&d=nocodb
- NC_AUTH_JWT_SECRET=${NC_AUTH_JWT_SECRET}
- NC_PUBLIC_URL=https://${NOCODB_DOMAIN}
volumes:
- ../files/nocodb-data:/usr/app/data
depends_on:
nocodb-db:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:8080/api/v1/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
nocodb-db:
image: postgres:16-alpine
restart: unless-stopped
environment:
- POSTGRES_DB=nocodb
- POSTGRES_USER=nocodb
- POSTGRES_PASSWORD=${NOCODB_DB_PASSWORD}
volumes:
- ../files/nocodb-db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U nocodb"]
interval: 10s
timeout: 5s
retries: 5
Note: NocoDB supports SQLite (default), PostgreSQL, and MySQL as its metadata database. This guide uses PostgreSQL for production reliability. The
NC_DBconnection string tells NocoDB to use the PostgreSQL service.
Environment Variables
Set these in Dokploy's Environment tab for your compose project:
| Variable | Purpose | Example |
|---|---|---|
NOCODB_DOMAIN |
Your NocoDB domain name | nocodb.yourdomain.com |
NOCODB_DB_PASSWORD |
PostgreSQL database password | a-strong-random-password |
NC_AUTH_JWT_SECRET |
JWT secret for authentication | a-long-random-secret-string |
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. The JWT secret is critical for session security — use a long, random string.
Volumes & Data Persistence
This setup uses Dokploy's ../files convention for bind-mounted volumes:
../files/nocodb-data— NocoDB uploads, thumbnails, and local file storage../files/nocodb-db-data— PostgreSQL database files
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 (e.g., /opt/nocodb) because Dokploy may clean them during redeployment.
If you need S3 backup support, consider using named Docker volumes instead. Named volumes can be backed up with Dokploy's built-in backup features.
Domain & SSL Setup
- In your Dokploy project, navigate to the Domains tab
- Click Add Domain and enter your domain (e.g.,
nocodb.yourdomain.com) - Set the container port to
8080 - 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 your NocoDB container.
Verifying the Deployment
- In Dokploy, go to your project's Deployments tab and click Deploy
- Watch the build logs — you should see both
nocodbandnocodb-dbcontainers start - Check the Logs tab for the
nocodbservice. Look for:NocoDB is running - Open
https://nocodb.yourdomain.comin your browser — you should see the NocoDB signup page - Create your super admin account on first access
- Create a new base and table to verify the database connection is working
Troubleshooting
NocoDB fails to connect to PostgreSQL
Ensure NOCODB_DB_PASSWORD is consistent between the NocoDB NC_DB connection string and the PostgreSQL POSTGRES_PASSWORD. The database must be healthy before NocoDB starts — check nocodb-db logs for initialization issues.
Uploads not persisting
File uploads are stored in /usr/app/data. Ensure the ../files/nocodb-data volume is correctly mapped. Without this volume, uploaded attachments are lost on container restart.
"Invalid JWT" or session errors
The NC_AUTH_JWT_SECRET must remain consistent across redeployments. Changing it invalidates all existing sessions and API tokens. If you need to rotate the secret, all users will need to log in again.
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 NocoDB in our complete overview.
Need a VPS? Hostinger VPS starts at $4.99/mo — perfect for running NocoDB.
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.