This is a personal fork of NocoDB.
Below are quick instructions to build and deploy it on Google Cloud Run.
- Google Cloud project with billing enabled.
- Google Cloud CLI installed and authenticated:
gcloud auth login gcloud config set project <YOUR_PROJECT_ID>
- Docker installed locally (to build and push the image).
- A fork (this repo) cloned locally.
In the root of this repo, ensure you have a Dockerfile that builds NocoDB.
For example:
# Use an official Node.js runtime as the base (Node 18 recommended)
FROM node:18-alpine
# Create app directory
WORKDIR /app
# Copy package files
COPY package.json pnpm-lock.yaml ./
# Install pnpm
RUN npm install -g pnpm
# Install dependencies
RUN pnpm install
# Copy the rest of your source code
COPY . .
# Build NocoDB
RUN pnpm run build
# Expose port 8080 (the default NocoDB port)
EXPOSE 8080
# Start the NocoDB server
CMD ["pnpm", "run", "start"]Adjust commands (e.g., build, start) if your fork’s scripts differ.
From your local repo folder:
-
Build the image (replace
YOUR_PROJECT_IDwith your GCP project ID):docker build -t gcr.io/YOUR_PROJECT_ID/nocodb:latest . -
Enable Container Registry (or Artifact Registry):
gcloud services enable containerregistry.googleapis.com -
Push the image:
docker push gcr.io/YOUR_PROJECT_ID/nocodb:latest
(If you prefer Artifact Registry, tag/push accordingly, e.g. LOCATION-docker.pkg.dev/YOUR_PROJECT_ID/REPO_NAME/nocodb:latest.)
gcloud run deploy nocodb \
--image gcr.io/YOUR_PROJECT_ID/nocodb:latest \
--platform managed \
--region us-central1 \
--allow-unauthenticated- Replace
nocodbwith the service name you want. - Replace
gcr.io/YOUR_PROJECT_ID/nocodb:latestwith your image path. - Choose a region you prefer (e.g.,
us-central1). --allow-unauthenticatedmakes NocoDB public. (You can require auth if you’d like.)
When it finishes, you’ll get a URL to access NocoDB!
By default, NocoDB uses SQLite stored in the container’s filesystem — data is ephemeral (lost if the container restarts).
To use a managed Postgres (e.g., Cloud SQL for PostgreSQL), set environment variables:
gcloud run services update nocodb \
--region us-central1 \
--update-env-vars=NC_DB="pg://<DB_HOST>:5432?u=<USER>&p=<PASS>&d=<DB_NAME>" \
--update-env-vars=NC_AUTH_JWT_SECRET="random-secret-key"You might also need a Cloud SQL Auth Proxy or VPC connector for secure connectivity.
- Go to the Cloud Run URL from the deployment step.
- Complete NocoDB’s initial setup in the browser.
- Enjoy your self-hosted NocoDB on GCP!
This project remains under AGPLv3, inherited from the upstream NocoDB project.
Happy self-hosting! If you have questions or issues, check the NocoDB community on Discord or the GCP Cloud Run docs.