NocoDB logoDatabase UI

NocoDB

Giao diện bảng tính/no-code trên database, thường dùng như lựa chọn thay Airtable.

Ghi chú review

Phù hợp quản lý dữ liệu vận hành nhẹ. Với production nên dùng PostgreSQL thay vì SQLite.

Hướng dẫn deploy

Nên chạy bằng Docker Compose với PostgreSQL riêng cho production nhỏ.

  1. Tạo database PostgreSQL cho NocoDB hoặc dùng managed Postgres.
  2. Cấu hình biến `NC_DB` theo connection string của database.
  3. Chạy container NocoDB và đặt reverse proxy/HTTPS.
  4. Tạo workspace đầu tiên, kết nối database nguồn nếu cần.
  5. Phân quyền user trước khi đưa team vào dùng.
Backup:Backup database NocoDB và các database nguồn mà NocoDB kết nối tới.

Copy để chạy trên server

Dùng từng block riêng: lưu compose trước, hoặc copy script bash để tạo file và chạy container.

docker-compose.ymlyaml
services:
  nocodb:
    image: nocodb/nocodb:latest
    container_name: nocodb
    environment:
      NC_DB: "pg://postgres:5432?u=nocodb&p=nocodb_password&d=nocodb"
    volumes:
      - ./data:/usr/app/data
    ports:
      - "8080:8080"
    depends_on:
      - postgres
    restart: unless-stopped

  postgres:
    image: postgres:16-alpine
    container_name: nocodb_postgres
    environment:
      POSTGRES_USER: nocodb
      POSTGRES_PASSWORD: nocodb_password
      POSTGRES_DB: nocodb
    volumes:
      - ./postgres:/var/lib/postgresql/data
    restart: unless-stopped
setup.shbash
#!/usr/bin/env bash
set -euo pipefail

sudo mkdir -p /opt/nocodb
sudo chown "$USER":"$USER" /opt/nocodb
cd /opt/nocodb

cat > docker-compose.yml <<'COMPOSE'
services:
  nocodb:
    image: nocodb/nocodb:latest
    container_name: nocodb
    environment:
      NC_DB: "pg://postgres:5432?u=nocodb&p=nocodb_password&d=nocodb"
    volumes:
      - ./data:/usr/app/data
    ports:
      - "8080:8080"
    depends_on:
      - postgres
    restart: unless-stopped

  postgres:
    image: postgres:16-alpine
    container_name: nocodb_postgres
    environment:
      POSTGRES_USER: nocodb
      POSTGRES_PASSWORD: nocodb_password
      POSTGRES_DB: nocodb
    volumes:
      - ./postgres:/var/lib/postgresql/data
    restart: unless-stopped
COMPOSE

docker compose up -d
echo "NocoDB is running on http://SERVER_IP:8080"

Stack

TypeScriptNode.jsPostgreSQLDocker