Skip to main content
Resources December 31, 2025 · 5 min read

Self-Hosting NocoDB vs Airtable: Docker Setup, Portainer, and Cloudflare Tunnels

Run NocoDB with one docker command, then go production with Portainer and Cloudflare Tunnels. Cut Airtable costs to zero without losing API-first flexibility.

Edward Chalupa

Edward Chalupa

Founder, Whtnxt · Dallas, TX

Self-Hosting NocoDB vs Airtable: Docker Setup, Portainer, and Cloudflare Tunnels

I moved my content management database from Airtable to a self-hosted NocoDB instance six months ago. Not because Airtable is bad, but because I wanted control.

Control over my data. Control over costs. Control over where it lives.

If you’re tired of subscription fees climbing every year, or you just want your data on your own infrastructure, here’s exactly how I set up NocoDB using Portainer for Docker management and Cloudflare Tunnels for secure external access.

Quick Start

If you just want NocoDB running right now, one command gets you there:

docker run -p 8080:8080 -v nocodb_data:/usr/app/data nocodb/nocodb:latest

Open http://localhost:8080, create your admin account, and you’re in. The volume flag persists your data across container restarts. For a production setup with PostgreSQL, external access, and proper container management, keep reading.

Why Self-Host a Database?

Modern server infrastructure

Three reasons drove my decision:

Cost control. Airtable starts at $20/user/month for Pro features. With a small team, that’s manageable. Scale to 10 users and you’re at $2,400/year. NocoDB runs on a $6/month VPS or a home server you already own.

Data ownership. Your marketing database lives on someone else’s servers. For internal operations, client data, or content workflows, that’s a risk I’d rather not take. Self-hosting means your data never leaves your infrastructure.

Customization. Need a specific API endpoint? Want to modify the interface? Self-hosted means you control the entire stack. No waiting for feature requests.

NocoDB vs Airtable: The Honest Comparison

NocoDB is an open-source Airtable alternative. It connects to existing databases (PostgreSQL, MySQL, SQLite) and gives you a spreadsheet-like interface.

What NocoDB does better:

  • Zero per-user costs
  • Direct database access via SQL
  • Self-hosted or cloud options
  • Open-source with active development
  • API-first architecture

What Airtable does better:

  • More polished UI/UX
  • Better collaboration features out of the box
  • Extensive template marketplace
  • Automations are more user-friendly
  • Mobile apps are more refined

For my use case (content management, marketing automation workflows, project tracking), NocoDB gives me 90% of Airtable’s functionality at 5% of the cost.

Setting Up NocoDB with Portainer

Network infrastructure connectivity

I run all my self-hosted services through Portainer, a web-based Docker management tool. It makes deploying and updating containers dead simple.

Step 1: Deploy NocoDB Stack in Portainer

In Portainer, go to Stacks and create a new stack. Here’s the docker-compose configuration I use:

version: '3.8'
services:
  nocodb:
    image: nocodb/nocodb:latest
    container_name: nocodb
    ports:
      - "8080:8080"
    environment:
      - NC_DB=pg://postgres:5432?u=nocodb&p=your_secure_password&d=nocodb
      - NC_AUTH_JWT_SECRET=your_jwt_secret_here
      - NC_PUBLIC_URL=https://nocodb.yourdomain.com
    volumes:
      - nocodb_data:/usr/app/data
    restart: unless-stopped
    depends_on:
      - postgres

  postgres:
    image: postgres:15-alpine
    container_name: nocodb-db
    environment:
      - POSTGRES_USER=nocodb
      - POSTGRES_PASSWORD=your_secure_password
      - POSTGRES_DB=nocodb
    volumes:
      - postgres_data:/var/lib/postgresql/data
    restart: unless-stopped

volumes:
  nocodb_data:
  postgres_data:

Key environment variables:

NC_DB sets your database connection string. I use PostgreSQL for production workloads. You can also use MySQL or SQLite.

NC_AUTH_JWT_SECRET is critical for security. Generate a random 64-character string for this value.

NC_PUBLIC_URL should match the domain you’ll use to access NocoDB externally.

Hit “Deploy the stack” and Portainer handles the rest. Within 2 minutes, NocoDB is running at http://your-server-ip:8080.

Step 2: Secure External Access with Cloudflare Tunnels

NocoDB is running locally. Now you need secure external access without exposing ports or dealing with dynamic IPs.

Cloudflare Tunnels create an outbound-only connection from your server to Cloudflare’s network. No inbound firewall rules. No port forwarding. HTTPS by default.

Setting up the tunnel:

  1. Log into your Cloudflare dashboard
  2. Navigate to Zero Trust > Access > Tunnels
  3. Create a new tunnel and name it (e.g., “nocodb-tunnel”)
  4. Install the cloudflared connector on your server

For Docker-based setups, run cloudflared as a container:

docker run -d \
  --name cloudflared \
  --restart unless-stopped \
  cloudflare/cloudflared:latest \
  tunnel run --token YOUR_TUNNEL_TOKEN

The token is provided when you create the tunnel in the Cloudflare dashboard.

Configuring the public hostname:

In the Cloudflare Tunnel dashboard:

  • Set your public hostname (e.g., nocodb.yourdomain.com)
  • Point it to http://nocodb:8080 (using the Docker container name)
  • Save the configuration

Within minutes, NocoDB is accessible at https://nocodb.yourdomain.com with automatic SSL. Zero port forwarding required.

For detailed tunnel configuration options, check Cloudflare’s tunnel documentation.

Real Use Cases

Here’s what I actually use my self-hosted NocoDB instance for:

Content calendar and pipeline. All blog posts, social media content, and email campaigns tracked in one database. Custom views for each content type. API connections to WordPress and social scheduling tools.

Marketing automation workflows. Lead scoring tables connected to HubSpot via API. Form submissions flow into NocoDB, trigger scoring logic, then sync back to HubSpot. All without Zapier fees.

Client project management. Each client gets their own base. Project timelines, deliverables, billing tracking. Share access via email without paying per-user fees.

Image asset management. Integrated with my Immich photo library. Metadata for every image stored in NocoDB. Search by keyword, location, or project.

The common thread is workflows that connect multiple systems. NocoDB sits in the middle, orchestrating data between tools.

When to Use NocoDB vs Stick with Airtable

Use NocoDB if:

  • You’re comfortable with Docker and basic server management
  • You have sensitive data that shouldn’t live on third-party servers
  • You’re hitting Airtable’s pricing limits
  • You need SQL access to your data
  • You want API-first architecture with no rate limits

Stick with Airtable if:

  • You need zero technical setup
  • Collaboration features are critical (comments, mentions, real-time editing)
  • You want extensive pre-built templates
  • Mobile experience matters more than cost
  • You prefer managed services over self-hosting

For my marketing automation workflows, NocoDB was the right call. Six months in, zero regrets. The system is fast, reliable, and costs me nothing beyond the VPS I already run.

If you’re ready to take control of your data infrastructure, this is one of the easiest self-hosted services to start with.

Share: