DOKPLOY-GUIDE 7 min read fordnox

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

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_DB connection 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:

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

  1. In your Dokploy project, navigate to the Domains tab
  2. Click Add Domain and enter your domain (e.g., nocodb.yourdomain.com)
  3. Set the container port to 8080
  4. Enable HTTPS — Dokploy automatically provisions a Let's Encrypt SSL certificate
  5. 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

  1. In Dokploy, go to your project's Deployments tab and click Deploy
  2. Watch the build logs — you should see both nocodb and nocodb-db containers start
  3. Check the Logs tab for the nocodb service. Look for: NocoDB is running
  4. Open https://nocodb.yourdomain.com in your browser — you should see the NocoDB signup page
  5. Create your super admin account on first access
  6. 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.

~/self-hosted-app/nocodb/dokploy/get-started

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

nocodb dokploy docker compose self-hosted no-code database nocodb deployment

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.