
NocoDB is an open-source no-code platform that adds a spreadsheet-style interface on top of a relational database. It lets teams create bases, views, and relationships through a web UI while keeping the data stored in a database you control. It provides a lightweight platform for building internal tools and collaborative data workflows without migrating data to a hosted Software-as-a-Service (SaaS) platform.
This article explains how to deploy NocoDB on a Linux server using Docker Compose, configure persistent storage with PostgreSQL, secure the application with HTTPS using Traefik, and verify functionality by creating a sample base.
Before you begin, you need to:
nocodb.example.com).NocoDB requires persistent directories for application data, database files, and TLS certificates. Environment variables configure domain routing and database credentials.
Create the project directory.
This command creates the following directories:
data: Stores NocoDB configuration, metadata, and internal files.pgdata: Persists PostgreSQL database files.letsencrypt: Stores Traefik ACME certificates for HTTPS renewal.Navigate to the project directory.
Create a .env file to store environment variables.
Add the following environment variables:
Replace:
nocodb.example.com with your domain name.admin@example.com with your email address.strong_password with a strong database password.Save and close the file.
The Docker Compose stack runs NocoDB with PostgreSQL as the backend database. This configuration is based on the official NocoDB Docker Compose example, adapted to use environment variables and persistent storage.
Create a new Docker Compose file.
Add the following manifest:
Save and close the file.
In the above manifest:
80 (HTTP) and 443 (HTTPS) on the host so Traefik can route external traffic to your services..env file.NC_DB connection string to connect NocoDB to the PostgreSQL database.8080) visible to Traefik without publishing the port directly to the host../data, ./pgdata, ./letsencrypt) persist application data, database files, and TLS certificates./var/run/docker.sock) allows Traefik to automatically detect running services.Create and start the services.
Verify that the services are running.
Output:
View the logs for the services.
For more information on managing Docker Compose stack, see the How To Use Docker Compose article.
The NocoDB web interface requires an initial administrator account setup. The first registered user becomes the Super Admin with full access to all workspaces and settings.
Open https://nocodb.example.com in a web browser. Replace nocodb.example.com with your configured domain.
On the Sign Up screen, enter your email and a strong password to create the Super Admin account.
After creating the account, NocoDB launches the onboarding wizard. Select your role, configure workspace preferences, and complete the personalization steps based on your requirements.
Click Next to proceed through each screen until the dashboard loads.
NocoDB organizes data into bases (similar to databases) containing tables with customizable fields. Each table automatically generates REST API endpoints for CRUD operations.
The following fields and records are example data used for demonstration purposes. You can create any table structure and records that match your use case.
From the dashboard, click + Create Base and enter Employee Directory as the name.
Click Create Base.
Inside the new base, click Create New Table (or + Create Table in the sidebar).
Enter Employees as the table name and click Create Table.
Add fields to the table by clicking the + button in the header row:
Name, Type: Single line textEmail, Type: EmailDepartment, Type: Single line textAdd a sample record by clicking + New record or the empty row. Fill in:
Name: Jane SmithEmail: jane@example.comDepartment: EngineeringGenerate an API token. Click your profile icon in the bottom-left corner, select API Tokens. Click Create new token, enter a name (for example, test-token), and copy the generated token.
Find the table ID. In the sidebar under Tables, right-click the Employees table (not the view underneath it) and copy the table ID.
Test the API endpoint using curl. Replace nocodb.example.com with your domain, YOUR_API_TOKEN with the token you generated, and TABLE_ID with your table ID.
Output:
The API returns the employee record in JSON format, confirming the deployment works correctly.
You have successfully deployed NocoDB on your server using Docker Compose, Traefik for HTTPS, and PostgreSQL for persistent storage. The instance is accessible through your configured domain and supports role-based permissions, API access, and multiple view types, including grid, form, Kanban, and gallery. The persistent volumes (./data and ./pgdata) retain application data and database files across container restarts and updates. For additional configuration details and advanced features, refer to the official NocoDB documentation.
0 Comments
Be the first to comment and share your perspective with the community.