Skip to content

NocoDB Commands

Comprehensive NocoDB commands and workflows for database management and no-code development.

Installation

Command Description
npx create-nocodb-app Quick start with NPX
npm install -g nocodb Install globally via NPM
docker run -d --name nocodb -p 8080:8080 nocodb/nocodb:latest Run with Docker
brew install nocodb Install on macOS with Homebrew
curl -o setup.sh https://get.nocodb.com/linux && bash setup.sh Auto-install script for Linux

Basic Operations

Command Description
nocodb Start NocoDB server
nocodb --port 3000 Start on custom port
nocodb --host 0.0.0.0 Bind to all interfaces
nocodb --help Show help information
nocodb --version Show version information

Database Connection

Command Description
NC_DB="mysql2://user:pass@host:port/db" nocodb Connect to MySQL
NC_DB="pg://user:pass@host:port/db" nocodb Connect to PostgreSQL
NC_DB="mssql://user:pass@host:port/db" nocodb Connect to SQL Server
NC_DB="sqlite3://./db.sqlite" nocodb Use SQLite database

Environment Variables

Variable Description
NC_DB Database connection string
NC_PORT Port number (default: 8080)
NC_HOST Host address (default: localhost)
NC_PUBLIC_URL Public URL for webhooks
NC_AUTH_JWT_SECRET JWT secret for authentication
NC_SENTRY_DSN Sentry DSN for error tracking
NC_REDIS_URL Redis connection for caching
NC_DISABLE_TELE Disable telemetry (true/false)

API Operations

Endpoint Description
GET /api/v1/db/meta/projects List all projects
POST /api/v1/db/meta/projects Create new project
GET /api/v1/db/data/:project/:table Get table data
POST /api/v1/db/data/:project/:table Create new record
PUT /api/v1/db/data/:project/:table/:id Update record
DELETE /api/v1/db/data/:project/:table/:id Delete record

CLI Database Management

Command Description
nocodb --db-migrate Run database migrations
nocodb --db-seed Seed database with sample data
nocodb --db-reset Reset database schema
nocodb --export-meta Export metadata
nocodb --import-meta <file> Import metadata from file

Docker Operations

Command Description
docker run -d -p 8080:8080 nocodb/nocodb Basic Docker run
docker run -d -p 8080:8080 -v nocodb:/usr/app/data nocodb/nocodb Run with persistent volume
docker-compose up -d Start with Docker Compose
docker logs nocodb View container logs
docker exec -it nocodb bash Access container shell

Configuration Files

File Description
.env Environment configuration
docker-compose.yml Docker Compose configuration
nocodb.config.js Advanced configuration
package.json NPM package configuration

Backup and Restore

Command Description
nocodb --export-data Export all data
nocodb --import-data <file> Import data from file
docker exec nocodb pg_dump -U postgres nocodb > backup.sql PostgreSQL backup
docker exec -i nocodb psql -U postgres nocodb < backup.sql PostgreSQL restore

Development Mode

Command Description
npm run dev Start in development mode
npm run build Build for production
npm run start:prod Start production server
npm run test Run test suite
npm run lint Run code linting

Webhook Configuration

Command Description
curl -X POST /api/v1/db/meta/hooks Create webhook
curl -X GET /api/v1/db/meta/hooks List webhooks
curl -X PUT /api/v1/db/meta/hooks/:id Update webhook
curl -X DELETE /api/v1/db/meta/hooks/:id Delete webhook

User Management

Command Description
nocodb --create-user Create new user
nocodb --list-users List all users
nocodb --reset-password <email> Reset user password
nocodb --delete-user <email> Delete user account

Performance Optimization

Command Description
NC_REDIS_URL=redis://localhost:6379 nocodb Enable Redis caching
NC_DB_POOL_SIZE=20 nocodb Set database pool size
NC_MAX_ATTACHMENTS_ALLOWED=10 nocodb Limit file attachments
NC_ATTACHMENT_FIELD_SIZE=20971520 nocodb Set max attachment size

Security Configuration

Command Description
NC_ADMIN_EMAIL=admin@example.com nocodb Set admin email
NC_ADMIN_PASSWORD=secure123 nocodb Set admin password
NC_JWT_EXPIRES_IN=10h nocodb Set JWT expiration
NC_SECURE_COOKIE=true nocodb Enable secure cookies

Troubleshooting

Command Description
nocodb --debug Enable debug mode
nocodb --log-level=debug Set log level
docker logs -f nocodb Follow container logs
nocodb --check-db Check database connection
nocodb --repair-db Repair database issues

Integration Commands

Command Description
nocodb --slack-webhook <url> Configure Slack integration
nocodb --discord-webhook <url> Configure Discord integration
nocodb --teams-webhook <url> Configure Teams integration
nocodb --email-smtp <config> Configure email SMTP

Advanced Features

Command Description
nocodb --enable-audit Enable audit logging
nocodb --enable-cors Enable CORS support
nocodb --rate-limit 100 Set API rate limiting
nocodb --custom-css <file> Apply custom styling
nocodb --plugin-dir <path> Set plugin directory