How to Self-Host NocoDB: Open Source Airtable on Any Database 2026
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
| Feature | NocoDB | Airtable | Grist |
|---|---|---|---|
| License | AGPL 3.0 | Proprietary | Apache 2.0 |
| GitHub Stars | ~49K | — | ~7K |
| Cost | Free | $20/user/mo | Free |
| Connects to existing DB | Yes | No | No |
| Formula language | Excel-like | Airtable formulas | Python |
| Auto REST/GraphQL API | Yes | Yes (paid) | Yes |
| Views | Grid/Gallery/Form/Kanban/Calendar | All types | Grid/Card/Chart |
| Automations | Yes | Yes | Limited |
| Row permissions | No | No | Yes |
| 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:
Option B: PostgreSQL backend (recommended for production)
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.
- Home → + New Project → Connect to existing database
- Choose PostgreSQL / MySQL / SQL Server
- Enter connection string or individual host/port/user/pass/db
- 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.
Gallery View
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.
- + Add View → Form
- Choose which fields to show
- 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:
- Table → Automation → + Add Automation
- Trigger: Record created / updated / deleted
- 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:
- + New Project → Import Airtable
- Enter your Airtable Personal Access Token
- Select which bases to import
- 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
- Click share icon on any view
- Toggle Enable public access
- Optionally enable password protection
- 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.