NocoDB Self-Hosted: Open-Source Airtable Alternative for No-Code Databases
What This Article Covers
- What NocoDB is: an open-source Airtable alternative with a spreadsheet interface for databases.
- Docker setup and creating your first base.
- REST API for automation and AI integration.
- n8n workflows with NocoDB and Ollama.
- When NocoDB beats direct Postgres access, and when it doesn’t.
Introduction
NocoDB is the leading open-source Airtable alternative: a database with a spreadsheet UI. You create tables like in Excel, but it’s a real database (Postgres, MySQL, or SQLite underneath) complete with a REST API, multiple views, filters, forms, and webhooks.
For AI workflows, NocoDB shines: manage structured data (leads, tickets, document metadata) in a user-friendly interface, then connect it to n8n or Ollama via API without writing SQL.
Common Use Cases
- Support ticket system: incoming requests as a table; AI categorizes and assigns; n8n escalates high-priority items.
- Content calendar: track articles, status, and channels; AI generates drafts directly into the table.
- Lead tracking: manage contacts and follow-ups; AI suggests next steps based on the data.
- Document index: store metadata for PDFs and files; AI auto-tags and classifies.
- Lightweight CRM: works well for small teams before migrating to a dedicated CRM like Twenty.
Installation: Docker
services:
nocodb:
image: nocodb/nocodb:latest
ports:
- "127.0.0.1:8081:8080"
environment:
- NC_DB=pg://db:5432?u=postgres&p=geheim&d=nocodb
- NC_AUTH_JWT_SECRET=langer-zufaelliger-string
depends_on: [db]
restart: always
db:
image: postgres:16
environment:
POSTGRES_DB: nocodb
POSTGRES_PASSWORD: geheim
volumes: [pg_data:/var/lib/postgresql/data]
restart: always
volumes:
pg_data:
Or minimal with built-in SQLite:
services:
nocodb:
image: nocodb/nocodb:latest
ports: ["127.0.0.1:8081:8080"]
volumes: [nc_data:/usr/app/data]
restart: always
volumes:
nc_data:
The first user created when you visit http://localhost:8081 becomes the admin.
Concepts
- Base = project or workspace containing tables.
- Table = spreadsheet-like structure with typed columns (text, number, date, single/multi-select, links, attachments).
- Views: grid, kanban, gallery, form; create multiple views per table.
- API Token: generate in Settings > API Tokens for automations.
- Webhooks: trigger HTTP calls on data changes, routing to n8n or other services.
REST API: Programmatic Data Access
# Create a token in the UI, then:
curl -H "xc-token: DEIN_TOKEN" \
"http://localhost:8081/api/v2/tables/TABLE_ID/records"
# Create a new record
curl -X POST -H "xc-token: DEIN_TOKEN" -H "Content-Type: application/json" \
-d '{"Name": "Max", "Status": "Neu"}' \
"http://localhost:8081/api/v2/tables/TABLE_ID/records"
The API is fully featured: CRUD operations, filtering (where=(Status,eq,Neu)), sorting, pagination, everything n8n or custom scripts need.
n8n Integration
n8n provides a native NocoDB node, but HTTP requests work just as well:
Webhook (form on website)
│
▼
Ollama node: classify text (category, priority)
│
▼
NocoDB node: create record with AI-generated fields
│
▼
If priority=high → send Telegram alert
This is the classic “AI as data enricher” pattern: unstructured input flows through AI classification, then lands as clean, structured fields in NocoDB.
Practical Example: AI-Powered Ticket Triage
import requests
import ollama
NC = "http://nocodb:8081"
TOKEN = "dein-token"
HEADERS = {"xc-token": TOKEN}
TABLE = "tickets_table_id"
client = ollama.Client(host="http://ollama:11434")
def triage(text):
resp = client.chat(model="llama3.1:8b", messages=[{
"role": "user",
"content": f"Klassifiziere: Kategorie (Bug/Feature/Frage) + "
f"Priorität (niedrig/mittel/hoch). Antworte JSON.\n\n{text}"
}], format="json")
return resp["message"]["content"]
# Fetch new tickets from NocoDB (Status=Neu)
tickets = requests.get(f"{NC}/api/v2/tables/{TABLE}/records",
headers=HEADERS, params={"where": "(Status,eq,Neu)"}).json()["list"]
for t in tickets:
result = triage(t["Beschreibung"])
import json as j
data = j.loads(result)
requests.patch(f"{NC}/api/v2/tables/{TABLE}/records",
headers=HEADERS,
json={"Id": t["Id"], "Kategorie": data["kategorie"],
"Prioritaet": data["prioritaet"], "Status": "Triaigiert"})
Security
- Set JWT secret (
NC_AUTH_JWT_SECRET); otherwise it’s randomly generated and insecure. - API tokens: use separate tokens per integration; never share the admin token.
- Authentication: default user/password login; SSO and LDAP available in enterprise editions.
- HTTPS: use a reverse proxy with TLS for external access.
NocoDB vs. Alternatives
| Tool | Strength | Weakness |
|---|---|---|
| NocoDB | Open source, REST API, Airtable-compatible | No formula columns |
| Airtable | Mature, powerful formulas | Cloud-only, expensive, US data centers |
| Baserow | Similar, also open source | Smaller ecosystem |
| Postgres direct | Powerful and flexible | No UI for non-technical users |
| Supabase | Postgres + Auth + Realtime | More complex, geared toward developers |
Further Reading
- IRC-Coding.de: in-depth programming tutorials on REST APIs and data modeling.
- n8n: workflow automation.
- Nextcloud integration: add file management.
- Supabase: when you need a full backend.
- Docker: container fundamentals.
- Ollama: local AI models.
Key Takeaways:
- NocoDB is open-source Airtable: spreadsheet UI plus a real database plus REST API.
- Perfect as a structured data layer for AI workflows (AI fills fields, humans verify).
- Docker setup in minutes with Postgres or SQLite.
- n8n has a native node; use the REST API for custom scripts.
- For complex logic, Supabase or Postgres offers more power; NocoDB is the no-code bridge.
FAQ
NocoDB or Airtable?
What database runs underneath?
Does NocoDB have an API?
How do I connect NocoDB to AI?
What are the limitations?
Multi-user support?
Sources and Further Resources
- NocoDB: GitHub repository.
- NocoDB Docs: official documentation.
- IRC-Coding.de: programming tutorials.


