NocoDB Comandi¶
Traduzione: Copia tutti i comandi
Traduzione: Generare PDF
< >
Comandi e flussi di lavoro completi NocoDB per la gestione del database e lo sviluppo senza codice.
## Installazione
|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|
## Operazioni di base
|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|
## Connessione al database
|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|
## Variabili dell'ambiente
|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)|
## Operazioni API
|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 Gestione dei database
|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 `|Import metadata from file|
## Operazioni Docker
|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|
## File di configurazione
|File|Description|
|---------|-------------|
|`.env`|Environment configuration|
|`docker-compose.yml`|Docker Compose configuration|
|`nocodb.config.js`|Advanced configuration|
|`package.json`|NPM package configuration|
## Backup e ripristino
|Command|Description|
|---------|-------------|
|`nocodb --export-data`|Export all data|
|`nocodb --import-data `|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|
## Modalità di sviluppo
|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|
## Configurazione Webhook
|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|
## Gestione utente
|Command|Description|
|---------|-------------|
|`nocodb --create-user`|Create new user|
|`nocodb --list-users`|List all users|
|`nocodb --reset-password `|Reset user password|
|`nocodb --delete-user `|Delete user account|
## Ottimizzazione delle prestazioni
|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|
## Configurazione di sicurezza
|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|
## Risoluzione dei problemi
|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|
## Comandi di integrazione
|Command|Description|
|---------|-------------|
|`nocodb --slack-webhook `|Configure Slack integration|
|`nocodb --discord-webhook `|Configure Discord integration|
|`nocodb --teams-webhook `|Configure Teams integration|
|`nocodb --email-smtp `|Configure email SMTP|
## Caratteristiche avanzate
|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 `|Apply custom styling|
|`nocodb --plugin-dir `|Set plugin directory|