docker.recipes

NocoDB

beginner

Turn any database into a smart spreadsheet.

Overview

NocoDB is an open-source platform that transforms any database into a smart spreadsheet interface, providing an Airtable-like experience without vendor lock-in. Built with modern web technologies, NocoDB supports multiple database backends including PostgreSQL, MySQL, SQLite, and SQL Server, making it a versatile solution for teams who want spreadsheet simplicity with database power. The platform generates REST APIs automatically, offers real-time collaboration features, and provides advanced functionality like form views, gallery views, and kanban boards. This Docker stack combines NocoDB with PostgreSQL to create a complete, self-hosted database management solution. PostgreSQL serves as the robust backend database engine, while NocoDB provides the intuitive web interface and API layer. This combination eliminates the need for complex database administration tools while maintaining full SQL capabilities underneath the user-friendly interface. This setup is ideal for development teams, small businesses, and organizations seeking data sovereignty without sacrificing usability. Unlike cloud-based alternatives, this stack runs entirely on your infrastructure, giving you complete control over your data while providing the collaborative features modern teams expect. The PostgreSQL backend ensures enterprise-grade reliability and performance, while NocoDB's interface makes database interactions accessible to non-technical team members.

Key Features

  • Visual database schema designer with drag-and-drop table creation and relationship management
  • Multiple view types including grid, gallery, form, and kanban views for different data visualization needs
  • Automatic REST API generation with authentication and role-based access control
  • Real-time collaboration with user permissions, comments, and activity tracking
  • PostgreSQL backend providing ACID compliance, full-text search, and advanced indexing capabilities
  • Form builder for external data collection with customizable fields and validation rules
  • Database import functionality supporting CSV, Excel, and direct database connections
  • Webhook integrations and automation triggers for connecting with external services

Common Use Cases

  • 1Customer relationship management (CRM) systems for small to medium businesses
  • 2Project management and task tracking with team collaboration features
  • 3Content management for blogs, documentation, and marketing materials
  • 4Inventory management and product catalog administration
  • 5Event planning and attendee management with form-based registration
  • 6Data collection and survey management with public form interfaces
  • 7Personal knowledge bases and information organization systems

Prerequisites

  • Docker and Docker Compose installed on the host system
  • Minimum 2GB RAM available for PostgreSQL and NocoDB containers
  • Port 8080 available for NocoDB web interface access
  • Basic understanding of environment variables for database password configuration
  • Sufficient disk space for PostgreSQL data volume (recommend 10GB minimum)
  • Network connectivity for initial container image downloads

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 container_name: nocodb
5 restart: unless-stopped
6 environment:
7 NC_DB: "pg://postgres:5432?u=nocodb&p=${DB_PASSWORD}&d=nocodb"
8 ports:
9 - "8080:8080"
10 depends_on:
11 - postgres
12 networks:
13 - nocodb
14
15 postgres:
16 image: postgres:15-alpine
17 container_name: nocodb-postgres
18 restart: unless-stopped
19 environment:
20 POSTGRES_USER: nocodb
21 POSTGRES_PASSWORD: ${DB_PASSWORD}
22 POSTGRES_DB: nocodb
23 volumes:
24 - postgres_data:/var/lib/postgresql/data
25 networks:
26 - nocodb
27
28volumes:
29 postgres_data:
30
31networks:
32 nocodb:
33 driver: bridge

.env Template

.env
1DB_PASSWORD=changeme

Usage Notes

  1. 1Access at http://localhost:8080
  2. 2Airtable alternative
  3. 3Works with existing databases

Individual Services(2 services)

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

nocodb
nocodb:
  image: nocodb/nocodb:latest
  container_name: nocodb
  restart: unless-stopped
  environment:
    NC_DB: pg://postgres:5432?u=nocodb&p=${DB_PASSWORD}&d=nocodb
  ports:
    - "8080:8080"
  depends_on:
    - postgres
  networks:
    - nocodb
postgres
postgres:
  image: postgres:15-alpine
  container_name: nocodb-postgres
  restart: unless-stopped
  environment:
    POSTGRES_USER: nocodb
    POSTGRES_PASSWORD: ${DB_PASSWORD}
    POSTGRES_DB: nocodb
  volumes:
    - postgres_data:/var/lib/postgresql/data
  networks:
    - nocodb

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 nocodb:
5 image: nocodb/nocodb:latest
6 container_name: nocodb
7 restart: unless-stopped
8 environment:
9 NC_DB: "pg://postgres:5432?u=nocodb&p=${DB_PASSWORD}&d=nocodb"
10 ports:
11 - "8080:8080"
12 depends_on:
13 - postgres
14 networks:
15 - nocodb
16
17 postgres:
18 image: postgres:15-alpine
19 container_name: nocodb-postgres
20 restart: unless-stopped
21 environment:
22 POSTGRES_USER: nocodb
23 POSTGRES_PASSWORD: ${DB_PASSWORD}
24 POSTGRES_DB: nocodb
25 volumes:
26 - postgres_data:/var/lib/postgresql/data
27 networks:
28 - nocodb
29
30volumes:
31 postgres_data:
32
33networks:
34 nocodb:
35 driver: bridge
36EOF
37
38# 2. Create the .env file
39cat > .env << 'EOF'
40DB_PASSWORD=changeme
41EOF
42
43# 3. Start the services
44docker compose up -d
45
46# 4. View logs
47docker 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/run | bash

Troubleshooting

  • Database connection failed errors: Verify the DB_PASSWORD environment variable matches between NocoDB and PostgreSQL containers
  • NocoDB container fails to start: Check if PostgreSQL container is fully initialized by examining logs with docker logs nocodb-postgres
  • Permission denied on PostgreSQL data volume: Ensure the host directory has proper permissions or remove the volume to use Docker-managed storage
  • Cannot access NocoDB interface: Verify port 8080 is not blocked by firewall and no other services are using this port
  • Slow query performance: Monitor PostgreSQL memory usage and consider increasing shared_buffers in PostgreSQL configuration
  • NocoDB shows blank page: Clear browser cache and check browser console for JavaScript errors, ensure containers can communicate on the nocodb network

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