docker.recipes

NocoDB Airtable Alternative

beginner

Open source Airtable alternative that turns databases into smart spreadsheets.

Overview

NocoDB transforms any database into a smart spreadsheet interface, providing a powerful open-source alternative to Airtable. Originally created in 2021, NocoDB addresses the gap between traditional database management and user-friendly spreadsheet interfaces, allowing non-technical users to interact with complex data while maintaining the power and reliability of SQL databases. It automatically generates REST APIs, supports multiple database backends, and provides collaborative features that make database management accessible to teams without extensive technical expertise. This stack combines NocoDB with PostgreSQL for robust data storage, Redis for caching and session management, and MinIO for S3-compatible file storage. PostgreSQL provides ACID compliance and advanced querying capabilities that surpass simple flat-file databases, while Redis accelerates NocoDB's performance through intelligent caching of frequently accessed data and metadata. MinIO handles file attachments, images, and documents uploaded through NocoDB's interface, providing scalable object storage without vendor lock-in to cloud providers. Teams transitioning from Airtable, startups building data-driven applications, and organizations requiring self-hosted database solutions will find this configuration particularly valuable. The combination eliminates subscription costs while providing enterprise-grade features like advanced data types, complex relationships, and unlimited records. Unlike cloud-based alternatives, this stack gives complete control over data location, security policies, and customization options while maintaining the intuitive spreadsheet-like interface that makes databases accessible to business users.

Key Features

  • Automatic REST API generation with authentication and rate limiting for any connected database
  • Real-time collaborative editing with conflict resolution and user presence indicators
  • Advanced data types including JSON fields, file attachments, and computed columns with formulas
  • PostgreSQL-powered complex relationships with foreign keys, many-to-many joins, and referential integrity
  • Redis-accelerated metadata caching for sub-second response times on large datasets
  • MinIO-integrated file handling supporting direct uploads, image thumbnails, and version control
  • Multi-database connectivity supporting MySQL, SQLite, and external PostgreSQL instances
  • Granular permission system with role-based access control and field-level security

Common Use Cases

  • 1Migrating from Airtable while maintaining existing workflows and user interfaces
  • 2Building customer relationship management systems with file attachments and complex data relationships
  • 3Creating internal business applications like inventory management, project tracking, or employee databases
  • 4Developing data collection portals for surveys, applications, or feedback systems with public forms
  • 5Establishing document management systems combining structured metadata with file storage
  • 6Implementing content management for blogs, portfolios, or marketing campaigns with media assets
  • 7Setting up development environments where teams need shared access to test data and configurations

Prerequisites

  • Minimum 2GB RAM for all services (NocoDB requires 512MB, PostgreSQL 1GB, Redis 256MB, MinIO 512MB)
  • Available ports 8080 (NocoDB), 9000 (MinIO API), and 9001 (MinIO Console)
  • Environment variables configured: POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB, JWT_SECRET, MINIO_ACCESS_KEY, MINIO_SECRET_KEY
  • Basic understanding of database concepts like tables, relationships, and data types
  • Docker Compose v2.0+ with support for health checks and service dependencies
  • At least 10GB free disk space for PostgreSQL data, Redis persistence, and MinIO object storage

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 nocodb:
3 image: nocodb/nocodb:latest
4 ports:
5 - "8080:8080"
6 environment:
7 NC_DB: pg://postgres:5432?u=${POSTGRES_USER}&p=${POSTGRES_PASSWORD}&d=${POSTGRES_DB}
8 NC_AUTH_JWT_SECRET: ${JWT_SECRET}
9 NC_S3_ACCESS_KEY: ${MINIO_ACCESS_KEY}
10 NC_S3_ACCESS_SECRET: ${MINIO_SECRET_KEY}
11 NC_S3_BUCKET_NAME: nocodb
12 NC_S3_ENDPOINT: http://minio:9000
13 volumes:
14 - nocodb_data:/usr/app/data
15 depends_on:
16 postgres:
17 condition: service_healthy
18 minio:
19 condition: service_started
20 networks:
21 - nocodb-net
22 restart: unless-stopped
23
24 postgres:
25 image: postgres:16-alpine
26 environment:
27 POSTGRES_USER: ${POSTGRES_USER}
28 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
29 POSTGRES_DB: ${POSTGRES_DB}
30 volumes:
31 - postgres_data:/var/lib/postgresql/data
32 healthcheck:
33 test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
34 interval: 10s
35 timeout: 5s
36 retries: 5
37 networks:
38 - nocodb-net
39 restart: unless-stopped
40
41 redis:
42 image: redis:7-alpine
43 volumes:
44 - redis_data:/data
45 networks:
46 - nocodb-net
47 restart: unless-stopped
48
49 minio:
50 image: minio/minio:latest
51 ports:
52 - "9000:9000"
53 - "9001:9001"
54 environment:
55 MINIO_ROOT_USER: ${MINIO_ACCESS_KEY}
56 MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY}
57 volumes:
58 - minio_data:/data
59 command: server /data --console-address ":9001"
60 networks:
61 - nocodb-net
62 restart: unless-stopped
63
64volumes:
65 nocodb_data:
66 postgres_data:
67 redis_data:
68 minio_data:
69
70networks:
71 nocodb-net:
72 driver: bridge

.env Template

.env
1# PostgreSQL
2POSTGRES_USER=nocodb
3POSTGRES_PASSWORD=secure_postgres_password
4POSTGRES_DB=nocodb
5
6# NocoDB
7JWT_SECRET=$(openssl rand -hex 32)
8
9# MinIO
10MINIO_ACCESS_KEY=minioadmin
11MINIO_SECRET_KEY=secure_minio_password

Usage Notes

  1. 1NocoDB at http://localhost:8080
  2. 2Connect to existing databases
  3. 3Create API endpoints automatically
  4. 4MinIO Console at http://localhost:9001

Individual Services(4 services)

Copy individual services to mix and match with your existing compose files.

nocodb
nocodb:
  image: nocodb/nocodb:latest
  ports:
    - "8080:8080"
  environment:
    NC_DB: pg://postgres:5432?u=${POSTGRES_USER}&p=${POSTGRES_PASSWORD}&d=${POSTGRES_DB}
    NC_AUTH_JWT_SECRET: ${JWT_SECRET}
    NC_S3_ACCESS_KEY: ${MINIO_ACCESS_KEY}
    NC_S3_ACCESS_SECRET: ${MINIO_SECRET_KEY}
    NC_S3_BUCKET_NAME: nocodb
    NC_S3_ENDPOINT: http://minio:9000
  volumes:
    - nocodb_data:/usr/app/data
  depends_on:
    postgres:
      condition: service_healthy
    minio:
      condition: service_started
  networks:
    - nocodb-net
  restart: unless-stopped
postgres
postgres:
  image: postgres:16-alpine
  environment:
    POSTGRES_USER: ${POSTGRES_USER}
    POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    POSTGRES_DB: ${POSTGRES_DB}
  volumes:
    - postgres_data:/var/lib/postgresql/data
  healthcheck:
    test:
      - CMD-SHELL
      - pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}
    interval: 10s
    timeout: 5s
    retries: 5
  networks:
    - nocodb-net
  restart: unless-stopped
redis
redis:
  image: redis:7-alpine
  volumes:
    - redis_data:/data
  networks:
    - nocodb-net
  restart: unless-stopped
minio
minio:
  image: minio/minio:latest
  ports:
    - "9000:9000"
    - "9001:9001"
  environment:
    MINIO_ROOT_USER: ${MINIO_ACCESS_KEY}
    MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY}
  volumes:
    - minio_data:/data
  command: server /data --console-address ":9001"
  networks:
    - nocodb-net
  restart: unless-stopped

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 nocodb:
5 image: nocodb/nocodb:latest
6 ports:
7 - "8080:8080"
8 environment:
9 NC_DB: pg://postgres:5432?u=${POSTGRES_USER}&p=${POSTGRES_PASSWORD}&d=${POSTGRES_DB}
10 NC_AUTH_JWT_SECRET: ${JWT_SECRET}
11 NC_S3_ACCESS_KEY: ${MINIO_ACCESS_KEY}
12 NC_S3_ACCESS_SECRET: ${MINIO_SECRET_KEY}
13 NC_S3_BUCKET_NAME: nocodb
14 NC_S3_ENDPOINT: http://minio:9000
15 volumes:
16 - nocodb_data:/usr/app/data
17 depends_on:
18 postgres:
19 condition: service_healthy
20 minio:
21 condition: service_started
22 networks:
23 - nocodb-net
24 restart: unless-stopped
25
26 postgres:
27 image: postgres:16-alpine
28 environment:
29 POSTGRES_USER: ${POSTGRES_USER}
30 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
31 POSTGRES_DB: ${POSTGRES_DB}
32 volumes:
33 - postgres_data:/var/lib/postgresql/data
34 healthcheck:
35 test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
36 interval: 10s
37 timeout: 5s
38 retries: 5
39 networks:
40 - nocodb-net
41 restart: unless-stopped
42
43 redis:
44 image: redis:7-alpine
45 volumes:
46 - redis_data:/data
47 networks:
48 - nocodb-net
49 restart: unless-stopped
50
51 minio:
52 image: minio/minio:latest
53 ports:
54 - "9000:9000"
55 - "9001:9001"
56 environment:
57 MINIO_ROOT_USER: ${MINIO_ACCESS_KEY}
58 MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY}
59 volumes:
60 - minio_data:/data
61 command: server /data --console-address ":9001"
62 networks:
63 - nocodb-net
64 restart: unless-stopped
65
66volumes:
67 nocodb_data:
68 postgres_data:
69 redis_data:
70 minio_data:
71
72networks:
73 nocodb-net:
74 driver: bridge
75EOF
76
77# 2. Create the .env file
78cat > .env << 'EOF'
79# PostgreSQL
80POSTGRES_USER=nocodb
81POSTGRES_PASSWORD=secure_postgres_password
82POSTGRES_DB=nocodb
83
84# NocoDB
85JWT_SECRET=$(openssl rand -hex 32)
86
87# MinIO
88MINIO_ACCESS_KEY=minioadmin
89MINIO_SECRET_KEY=secure_minio_password
90EOF
91
92# 3. Start the services
93docker compose up -d
94
95# 4. View logs
96docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/nocodb-airtable/run | bash

Troubleshooting

  • NocoDB shows 'Database connection failed': Verify PostgreSQL container is healthy and environment variables match between services
  • File uploads return 'S3 connection error': Check MinIO container logs and ensure NC_S3_ENDPOINT uses correct internal hostname 'minio:9000'
  • PostgreSQL container exits with 'initdb: error': Remove postgres_data volume and restart to reinitialize with correct credentials
  • Redis connection timeouts in NocoDB logs: Add NC_REDIS_URL environment variable pointing to 'redis://redis:6379' if Redis integration is enabled
  • MinIO Console inaccessible at localhost:9001: Ensure MINIO_ROOT_USER and MINIO_ROOT_PASSWORD are properly set and container has started completely
  • NocoDB API responses are slow with large datasets: Increase Redis memory limit and verify PostgreSQL has adequate shared_buffers configuration

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space