Sets up a self-hosted NocoDB on macOS using Homebrew and configures this repo to use it. Invoke when local NocoDB is needed for products/orders APIs.
Use this skill to install and run NocoDB locally on macOS via Homebrew, then wire the current project to it by setting NOCODB_* environment variables.
This repo talks to NocoDB using:
NOCODB_API_URL (example: http://localhost:8080)NOCODB_API_TOKEN (created in NocoDB UI → Account Settings → Tokens/API tokens)NOCODB_PROJECT_ID (aka Base ID / Project ID, visible in the URL as #/nc/<project_id> when a base is open)Prereq: Homebrew installed.
brew tap nocodb/nocodb
brew install nocodb
Run it:
nocodb
Open:
Update later:
brew upgrade nocodb
If you do nothing, NocoDB will create a local SQLite database in the current working directory.
For a more stable local setup, explicitly set the metadata DB via NC_DB and set a fixed JWT secret:
export NC_AUTH_JWT_SECRET="change-me-locally"
export NC_DB="pg://127.0.0.1:5432?u=<user>&p=<password>&d=<db_name>"
nocodb
Notes:
NC_DB is the primary DB where NocoDB stores metadata (and can store data).nocodb from the same directory (or configure SQLite explicitly using NC_DB_JSON per the NocoDB docs).You’ll use it as NOCODB_API_TOKEN in this repo.
Open any table in your base and look at the URL:
http://localhost:8080/#/nc/<project_id>?...
The <project_id> segment is the value to use for NOCODB_PROJECT_ID.
.env.example → .env.localNOCODB_API_URL=http://localhost:8080
NOCODB_API_TOKEN=replace_me
NOCODB_PROJECT_ID=replace_me
npm run dev
GET /api/products returns 200 (not 503)./products shows products (once your base has a products table populated).POST /api/orders returns { id } (once orders + order_items tables exist and permissions allow inserts).GET /api/products returns 503: you didn’t set NOCODB_API_URL, NOCODB_API_TOKEN, NOCODB_PROJECT_ID.Invalid token: ensure you’re using an API token (header xc-token on NocoDB side) and that the user still has access.