コンテンツにスキップ

NocoDB Commands

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

Installation

CommandDescription
npx create-nocodb-appQuick start with NPX
npm install -g nocodbInstall globally via NPM
docker run -d --name nocodb -p 8080:8080 nocodb/nocodb:latestRun with Docker
brew install nocodbInstall on macOS with Homebrew
curl -o setup.sh https://get.nocodb.com/linux && bash setup.shAuto-install script for Linux

Basic Operations

CommandDescription
nocodbStart NocoDB server
nocodb --port 3000Start on custom port
nocodb --host 0.0.0.0Bind to all interfaces
nocodb --helpShow help information
nocodb --versionShow version information

Database Connection

CommandDescription
NC_DB="mysql2://user:pass@host:port/db" nocodbConnect to MySQL
NC_DB="pg://user:pass@host:port/db" nocodbConnect to PostgreSQL
NC_DB="mssql://user:pass@host:port/db" nocodbConnect to SQL Server
NC_DB="sqlite3://./db.sqlite" nocodbUse SQLite database

Environment Variables

VariableDescription
NC_DBDatabase connection string
NC_PORTPort number (default: 8080)
NC_HOSTHost address (default: localhost)
NC_PUBLIC_URLPublic URL for webhooks
NC_AUTH_JWT_SECRETJWT secret for authentication
NC_SENTRY_DSNSentry DSN for error tracking
NC_REDIS_URLRedis connection for caching
NC_DISABLE_TELEDisable telemetry (true/false)

API Operations

EndpointDescription
GET /api/v1/db/meta/projectsList all projects
POST /api/v1/db/meta/projectsCreate new project
GET /api/v1/db/data/:project/:tableGet table data
POST /api/v1/db/data/:project/:tableCreate new record
PUT /api/v1/db/data/:project/:table/:idUpdate record
DELETE /api/v1/db/data/:project/:table/:idDelete record

CLI Database Management

CommandDescription
nocodb --db-migrateRun database migrations
nocodb --db-seedSeed database with sample data
nocodb --db-resetReset database schema
nocodb --export-metaExport metadata
nocodb --import-meta <file>Import metadata from file

Docker Operations

CommandDescription
docker run -d -p 8080:8080 nocodb/nocodbBasic Docker run
docker run -d -p 8080:8080 -v nocodb:/usr/app/data nocodb/nocodbRun with persistent volume
docker-compose up -dStart with Docker Compose
docker logs nocodbView container logs
docker exec -it nocodb bashAccess container shell

Configuration Files

FileDescription
.envEnvironment configuration
docker-compose.ymlDocker Compose configuration
nocodb.config.jsAdvanced configuration
package.jsonNPM package configuration

Backup and Restore

CommandDescription
nocodb --export-dataExport all data
nocodb --import-data <file>Import data from file
docker exec nocodb pg_dump -U postgres nocodb > backup.sqlPostgreSQL backup
docker exec -i nocodb psql -U postgres nocodb < backup.sqlPostgreSQL restore

Development Mode

CommandDescription
npm run devStart in development mode
npm run buildBuild for production
npm run start:prodStart production server
npm run testRun test suite
npm run lintRun code linting

Webhook Configuration

CommandDescription
curl -X POST /api/v1/db/meta/hooksCreate webhook
curl -X GET /api/v1/db/meta/hooksList webhooks
curl -X PUT /api/v1/db/meta/hooks/:idUpdate webhook
curl -X DELETE /api/v1/db/meta/hooks/:idDelete webhook

User Management

CommandDescription
nocodb --create-userCreate new user
nocodb --list-usersList all users
nocodb --reset-password <email>Reset user password
nocodb --delete-user <email>Delete user account

Performance Optimization

CommandDescription
NC_REDIS_URL=redis://localhost:6379 nocodbEnable Redis caching
NC_DB_POOL_SIZE=20 nocodbSet database pool size
NC_MAX_ATTACHMENTS_ALLOWED=10 nocodbLimit file attachments
NC_ATTACHMENT_FIELD_SIZE=20971520 nocodbSet max attachment size

Security Configuration

CommandDescription
NC_ADMIN_EMAIL=admin@example.com nocodbSet admin email
NC_ADMIN_PASSWORD=secure123 nocodbSet admin password
NC_JWT_EXPIRES_IN=10h nocodbSet JWT expiration
NC_SECURE_COOKIE=true nocodbEnable secure cookies

Troubleshooting

CommandDescription
nocodb --debugEnable debug mode
nocodb --log-level=debugSet log level
docker logs -f nocodbFollow container logs
nocodb --check-dbCheck database connection
nocodb --repair-dbRepair database issues

Integration Commands

CommandDescription
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

CommandDescription
nocodb --enable-auditEnable audit logging
nocodb --enable-corsEnable CORS support
nocodb --rate-limit 100Set API rate limiting
nocodb --custom-css <file>Apply custom styling
nocodb --plugin-dir <path>Set plugin directory