Follow these steps to connect NocoDB to your PostgreSQL database:
Open NocoDB in your browser by navigating to http://localhost:8080.
Sign Up with an email and password. This email will act as the Super Admin account.
Go to "Integrations" -> PostgreSQL, and fill in the connection details:
| Field | Value | Description |
|---|---|---|
| Connection Name | EdgeOS DB |
A label to identify the connection in NocoDB |
| Host Address | postgres |
Matches the DB_HOST value in your .env file |
| Port Number | 5432 |
Matches the DB_PORT value in your .env file |
| Username | myuser |
Replace with the DB_USERNAME value from your .env file |
| Password | secret |
Matches the DB_PASSWORD value in your .env file |
| Database Name | edgeos_db |
Matches the DB_NAME value in your .env file |
| Schema Name | public |
Keep as public unless using a different schema |
Click on "Test Connection" to verify the provided details. If the test is successful, click "Create Connection" to save it.
Next, go to "Create Base" and assign a name for the Base.
Navigate to "Connect External Data", and select the PostgreSQL connection you created earlier.
Click on "Test Connection" to confirm the setup, then click "Add Source" to complete the process.
Your database is now connected to NocoDB, and you can start managing your data through the NocoDB interface.
To use NocoDB's REST APIs, you'll need to generate an API token:
- Navigate to "Team & Settings" in the left sidebar
- Click on "Tokens" in the settings menu
- Click "Create new token"
- Give your token a descriptive name
- Copy the generated token
- Open your
.envfile and add the token as:NOCODB_TOKEN=your_copied_token
Keep this token secure as it provides access to your NocoDB instance through the API.