Skip to main content

How to Self-Host NocoDB: Open Source Airtable on Any Database 2026

·OSSAlt Team
nocodbairtabledatabaseno-codeself-hostingdocker2026

TL;DR

NocoDB (AGPL 3.0, ~49K GitHub stars, Node.js) turns any SQL database — PostgreSQL, MySQL, SQLite, SQL Server — into an Airtable-style spreadsheet UI. Connect it to your existing database and get grid, gallery, form, and kanban views instantly. Airtable charges $20/user/month. NocoDB is free, connects to databases you already have, and generates REST + GraphQL APIs on every table automatically.

Key Takeaways

  • NocoDB: AGPL 3.0, ~49K stars — Airtable UI on top of any SQL database
  • Bring your own DB: Connect to existing PostgreSQL/MySQL instead of a black-box proprietary format
  • Auto-generated APIs: Every table gets REST and GraphQL endpoints immediately
  • Views: Grid, Gallery, Form, Kanban, Calendar, Map — on any table
  • Automations: Webhooks, email, Slack, Zapier — triggered by row changes
  • Airtable import: Import Airtable base directly from Airtable API key

NocoDB vs Airtable vs Grist

FeatureNocoDBAirtableGrist
LicenseAGPL 3.0ProprietaryApache 2.0
GitHub Stars~49K~7K
CostFree$20/user/moFree
Connects to existing DBYesNoNo
Formula languageExcel-likeAirtable formulasPython
Auto REST/GraphQL APIYesYes (paid)Yes
ViewsGrid/Gallery/Form/Kanban/CalendarAll typesGrid/Card/Chart
AutomationsYesYesLimited
Row permissionsNoNoYes
GitHub Stars~49K~7K

Part 1: Docker Setup

Option A: Fresh SQLite (quickest start)

# docker-compose.yml
services:
  nocodb:
    image: nocodb/nocodb:latest
    container_name: nocodb
    restart: unless-stopped
    ports:
      - "8080:8080"
    volumes:
      - nocodb_data:/usr/app/data
    environment:
      NC_DB: "sqlite3:///usr/app/data/noco.db"

volumes:
  nocodb_data:
services:
  nocodb:
    image: nocodb/nocodb:latest
    container_name: nocodb
    restart: unless-stopped
    ports:
      - "8080:8080"
    volumes:
      - nocodb_data:/usr/app/data
    environment:
      NC_DB: "pg://postgres:5432?u=nocodb&p=${POSTGRES_PASSWORD}&d=nocodb"
      NC_AUTH_JWT_SECRET: "${JWT_SECRET}"
      NC_PUBLIC_URL: "https://noco.yourdomain.com"
      # Optional: disable sign-up
      NC_DISABLE_SIGNUP: "false"
      # Optional: SMTP
      NC_SMTP_HOST: "smtp.yourdomain.com"
      NC_SMTP_PORT: 587
      NC_SMTP_USERNAME: "${SMTP_USER}"
      NC_SMTP_PASSWORD: "${SMTP_PASS}"
      NC_SMTP_FROM: "nocodb@yourdomain.com"
    depends_on:
      postgres:
        condition: service_healthy

  postgres:
    image: postgres:16-alpine
    restart: unless-stopped
    environment:
      POSTGRES_USER: nocodb
      POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
      POSTGRES_DB: nocodb
    volumes:
      - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U nocodb"]
      interval: 10s
      start_period: 20s

volumes:
  nocodb_data:
  postgres_data:
# .env
POSTGRES_PASSWORD=your-secure-db-password
JWT_SECRET=$(openssl rand -hex 32)

docker compose up -d

Visit http://your-server:8080 — create your admin account.


Part 2: HTTPS with Caddy

noco.yourdomain.com {
    reverse_proxy localhost:8080
}

Part 3: Connect an Existing Database

The killer feature: connect NocoDB to a database you already have.

  1. Home → + New Project → Connect to existing database
  2. Choose PostgreSQL / MySQL / SQL Server
  3. Enter connection string or individual host/port/user/pass/db
  4. NocoDB reads all existing tables and creates views automatically
Connection: postgres://myuser:mypass@db.internal:5432/myapp

NocoDB reflects existing tables — changes in NocoDB write back to your actual database. No data migration needed.

Use cases:

  • Manage PostgreSQL tables via a spreadsheet UI
  • Give non-technical teammates a friendly view into the database
  • Build forms that insert directly into production tables (with care)
  • Generate REST API on top of legacy database tables

Part 4: Views

Every table supports multiple views — all views show the same data, just differently:

Grid View

Standard spreadsheet. Sort, filter, group, hide columns, lock rows.

Card-based display. Useful for image-heavy data (products, people, media).

Kanban View

Group by any Choice column. Drag cards between columns.

Tasks table → Kanban grouped by "Status"
├── Todo
│   ├── Task A
│   └── Task B
├── In Progress
│   └── Task C
└── Done
    └── Task D

Form View

Auto-generated form for data entry — share a link for public submissions.

  1. + Add View → Form
  2. Choose which fields to show
  3. Share the form link (no NocoDB account needed to submit)

Calendar View

Group by any Date column — see events in day/week/month layout.


Part 5: Auto-Generated REST API

Every table in NocoDB automatically has a REST API:

# Get your API token:
# Account → Team & Auth → API Tokens → Add token

TOKEN="your-api-token"
BASE_URL="https://noco.yourdomain.com"
TABLE_ID="md_xxxxx"     # From URL when viewing a table

# List records:
curl "${BASE_URL}/api/v1/db/data/noco/${TABLE_ID}" \
  -H "xc-token: $TOKEN" | jq

# Filter + sort:
curl "${BASE_URL}/api/v1/db/data/noco/${TABLE_ID}?where=(Status,eq,Active)&sort=-CreatedAt&limit=20" \
  -H "xc-token: $TOKEN"

# Create a record:
curl -X POST "${BASE_URL}/api/v1/db/data/noco/${TABLE_ID}" \
  -H "xc-token: $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"Name": "New item", "Status": "Active"}'

# Update:
curl -X PATCH "${BASE_URL}/api/v1/db/data/noco/${TABLE_ID}/42" \
  -H "xc-token: $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"Status": "Inactive"}'

# Delete:
curl -X DELETE "${BASE_URL}/api/v1/db/data/noco/${TABLE_ID}/42" \
  -H "xc-token: $TOKEN"

Swagger UI

NocoDB has a built-in API explorer:

  • Visit https://noco.yourdomain.com/api/v1/swagger
  • Try all endpoints interactively with your token

Part 6: Automations

Trigger actions when rows change:

  1. Table → Automation → + Add Automation
  2. Trigger: Record created / updated / deleted
  3. Actions:
    • Webhook — POST to any URL (Slack, Discord, n8n, etc.)
    • Send email — via configured SMTP
    • Slack message — direct Slack integration
    • Create another record — cross-table automation
// Example webhook payload (row created):
{
  "type": "records.after.insert",
  "table": "Orders",
  "record": {
    "Id": 42,
    "Customer": "Alice",
    "Total": 99.99,
    "Status": "Pending"
  }
}

Part 7: Import from Airtable

NocoDB can import directly from Airtable using your API key:

  1. + New Project → Import Airtable
  2. Enter your Airtable Personal Access Token
  3. Select which bases to import
  4. NocoDB imports tables, field types, views, and records
# Airtable personal access token:
# airtable.com/create/tokens → Create token with "data.records:read" scope

Note: Formulas may need manual re-creation. Images import as attachment URLs.


Part 8: User Roles and Sharing

Workspace roles

  • Owner: Full access, manage billing
  • Creator: Create/delete tables and bases
  • Editor: Edit records, create views
  • Commenter: Comment, no edit
  • Viewer: Read-only

Share a view publicly

  1. Click share icon on any view
  2. Toggle Enable public access
  3. Optionally enable password protection
  4. Share the generated URL — no account needed to view

Part 9: Backup and Restore

# Backup PostgreSQL:
docker exec nocodb-postgres-1 pg_dump -U nocodb nocodb \
  | gzip > nocodb-backup-$(date +%Y%m%d).sql.gz

# Backup SQLite:
docker cp nocodb:/usr/app/data/noco.db ./noco-backup-$(date +%Y%m%d).db

# Restore PostgreSQL:
gunzip < nocodb-backup-20260101.sql.gz | \
  docker exec -i nocodb-postgres-1 psql -U nocodb nocodb

# Backup uploads (attachments):
tar -czf nocodb-uploads-$(date +%Y%m%d).tar.gz \
  $(docker volume inspect nocodb_nocodb_data --format '{{.Mountpoint}}')/uploads/

Maintenance

# Update NocoDB:
docker compose pull
docker compose up -d

# Logs:
docker compose logs -f nocodb

# Check NocoDB version:
curl https://noco.yourdomain.com/api/v1/meta/version | jq

See all open source database and no-code tools at OSSAlt.com/categories/productivity.

Comments