Skip to content
BotServBotServ
NocoDBAirtableDatabaseNo-CodeSelf-HostingOpen SourceREST-API

NocoDB self-hosted: Airtable alternative no-code database

Self-host NocoDB as Airtable alternative with spreadsheet database, REST API, n8n integration and AI connectivity.

S

schutzgeist

4 min read
NocoDB self-hosted: Airtable alternative no-code database

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

ToolStrengthWeakness
NocoDBOpen source, REST API, Airtable-compatibleNo formula columns
AirtableMature, powerful formulasCloud-only, expensive, US data centers
BaserowSimilar, also open sourceSmaller ecosystem
Postgres directPowerful and flexibleNo UI for non-technical users
SupabasePostgres + Auth + RealtimeMore complex, geared toward developers

Further Reading

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?

Choose NocoDB if you want to self-host and data privacy matters: it’s open source, uses your own database, and is free. Airtable is more mature (better formulas, automation features) but is cloud-based and expensive.

What database runs underneath?

NocoDB uses Postgres, MySQL, or SQLite as its storage layer. For small setups, the built-in SQLite is fine; for teams, add Postgres in the same Docker Compose stack.

Does NocoDB have an API?

Yes, a complete REST API (v2) with full CRUD, filtering, sorting, and pagination. Plus webhooks for reacting to data changes. This makes it ideal as a data hub for automation.

How do I connect NocoDB to AI?

Typical flow: n8n or a custom script fetches records via the API, passes them to Ollama for classification or summarization, then writes results back to NocoDB fields. AI acts as a data enricher.

What are the limitations?

No formula columns like Airtable, and no complex business logic. For that, you need Supabase or Postgres with custom code, or a dedicated CRM like Twenty.

Multi-user support?

Yes: user management with roles (owner, creator, editor, viewer). For small teams, this is more than enough; SSO and LDAP are available in enterprise editions.

Sources and Further Resources

Back to Blog
Share:

Related Posts