Installation

Simple installation - takes about three minutes!

Prerequisites

Quick try

Heroku

Before doing so, make sure you have a Heroku account. By default, an add-on Heroku Postgres will be used as meta database. You can see the connection string defined in DATABASE_URL by navigating to Heroku App Settings and selecting Config Vars.

Deploy NocoDB to Heroku with 1-Click

Docker

If you are a Docker user, you may try this way!

docker run -d --name nocodb \
-v "$(pwd)"/nocodb:/usr/app/data/ \
-p 8080:8080 \
nocodb/nocodb:latest
docker run -d --name nocodb-mysql \
-v "$(pwd)"/nocodb:/usr/app/data/ \
-p 8080:8080 \
-e NC_DB="mysql2://host.docker.internal:3306?u=root&p=password&d=d1" \
-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \
nocodb/nocodb:latest
docker run -d --name nocodb-postgres \
-v "$(pwd)"/nocodb:/usr/app/data/ \
-p 8080:8080 \
-e NC_DB="pg://host.docker.internal:5432?u=root&p=password&d=d1" \
-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \
nocodb/nocodb:latest
docker run -d --name nocodb-mssql \
-v "$(pwd)"/nocodb:/usr/app/data/ \
-p 8080:8080 \
-e NC_DB="mssql://host.docker.internal:1433?u=root&p=password&d=d1" \
-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \
nocodb/nocodb:latest
Tip 1: To persist data in docker you can mount volume at `/usr/app/data/` since 0.10.6. In older version mount at `/usr/src/app`. Otherwise your data will be lost after recreating the container.
Tip 2: If you plan to input some special characters, you may need to change the character set and collation yourself when creating the database. Please check out the examples for MySQL Docker.

Docker Compose

We provide different docker-compose.yml files under this directory. Here are some examples.

git clone https://github.com/nocodb/nocodb
cd nocodb/docker-compose/mysql
docker-compose up -d
git clone https://github.com/nocodb/nocodb
cd nocodb/docker-compose/pg
docker-compose up -d
git clone https://github.com/nocodb/nocodb
cd nocodb/docker-compose/mssql
docker-compose up -d
Tip 1: To persist data in docker you can mount volume at `/usr/app/data/` since 0.10.6. In older version mount at `/usr/src/app`.
Tip 2: If you plan to input some special characters, you may need to change the character set and collation yourself when creating the database. Please check out the examples for MySQL Docker Compose.

NPX

You can run below command if you need an interactive configuration.

npx create-nocodb-app

Preview:

image

Homebrew

brew tap nocodb/nocodb
brew install nocodb
nocodb

Executables

You can download executables directly and run without any extra dependancy. Use the right command based on your platform.

MacOS (x64)
curl http://get.nocodb.com/macos-x64 -o nocodb -L \
  && chmod +x nocodb \
  && ./nocodb
MacOS (arm64)
curl http://get.nocodb.com/macos-arm64 -o nocodb -L \
  && chmod +x nocodb \
  && ./nocodb
Linux (x64)
curl http://get.nocodb.com/linux-x64 -o nocodb -L \
  && chmod +x nocodb \
  && ./nocodb
Linux (arm64)
curl http://get.nocodb.com/linux-arm64 -o nocodb -L \
  && chmod +x nocodb \
  && ./nocodb
Windows (x64)
iwr http://get.nocodb.com/win-x64.exe
.\Noco-win-x64.exe
Windows (arm64)
iwr http://get.nocodb.com/win-arm64.exe
.\Noco-win-arm64.exe

Node Application

We provide a simple NodeJS Application for getting started.

git clone https://github.com/nocodb/nocodb-seed
cd nocodb-seed
npm install
npm start

AWS ECS (Fargate)

Click to Expand

Create ECS Cluster

aws ecs create-cluster \
--cluster-name <YOUR_ECS_CLUSTER>

Create Log group

aws logs create-log-group \
--log-group-name /ecs/<YOUR_APP_NAME>/<YOUR_CONTAINER_NAME>

Create ECS Task Definiton

Every time you create it, it will add a new version. If it is not existing, the version will be 1.

aws ecs register-task-definition \
--cli-input-json "file://./<YOUR_TASK_DEF_NAME>.json"
This json file defines the container specification. You can define secrets such as NC_DB and environment variables here.

Here's the sample Task Definition

{
  "family": "nocodb-sample-task-def",
  "networkMode": "awsvpc",
  "containerDefinitions": [{
    "name": "<YOUR_CONTAINER_NAME>",
    "image": "nocodb/nocodb:latest",
    "essential": true,
    "logConfiguration": {
      "logDriver": "awslogs",
      "options": {
        "awslogs-group": "/ecs/<YOUR_APP_NAME>/<YOUR_CONTAINER_NAME>",
        "awslogs-region": "<YOUR_AWS_REGION>",
        "awslogs-stream-prefix": "ecs"
      }
    },
    "secrets": [{
      "name": "<YOUR_SECRETS_NAME>",
      "valueFrom": "<YOUR_SECRET_ARN>"
    }],
    "environment": [{
      "name": "<YOUR_ENV_VARIABLE_NAME>",
      "value": "<YOUR_ENV_VARIABLE_VALUE>"
    }],
    "portMappings": [{
      "containerPort": 8080,
      "hostPort": 8080,
      "protocol": "tcp"
    }]
  }],
  "requiresCompatibilities": [
    "FARGATE"
  ],
  "cpu": "256",
  "memory": "512",
  "executionRoleArn": "<YOUR_ECS_EXECUTION_ROLE_ARN>",
  "taskRoleArn": "<YOUR_ECS_TASK_ROLE_ARN>"
}

Create ECS Service

aws ecs create-service \
--cluster <YOUR_ECS_CLUSTER> \
--service-name  <YOUR_SERVICE_NAME> \
--task-definition <YOUR_TASK_DEF>:<YOUR_TASK_DEF_VERSION> \
--desired-count <DESIRED_COUNT> \
--launch-type "FARGATE" \
--platform-version <VERSION> \
--health-check-grace-period-seconds <GRACE_PERIOD_IN_SECOND> \
--network-configuration "awsvpcConfiguration={subnets=["<YOUR_SUBSETS>"], securityGroups=["<YOUR_SECURITY_GROUPS>"], assignPublicIp=ENABLED}" \
--load-balancer targetGroupArn=<TARGET_GROUP_ARN>,containerName=<CONTAINER_NAME>,containerPort=<YOUR_CONTAINER_PORT>
If your service fails to start, you may check the logs in ECS console or in Cloudwatch. Generally it fails due to the connection between ECS container and NC_DB. Make sure the security groups have the correct inbound and outbound rules.
```

GCP (Cloud Run)

Click to Expand

Pull NocoDB Image on Cloud Shell

Since Cloud Run only supports images from Google Container Registry (GCR) or Artifact Registry, we need to pull NocoDB image, tag it and push it in GCP using Cloud Shell. Here are some sample commands which you can execute in Cloud Shell.

# pull latest NocoDB image
docker pull nocodb/nocodb:latest

# tag the image
docker tag nocodb/nocodb:latest gcr.io/<MY_PROJECT_ID>/nocodb/nocodb:latest

# push the image to GCR
docker push gcr.io/<MY_PROJECT_ID>/nocodb/nocodb:latest

Deploy NocoDB on Cloud Run

gcloud run deploy --image=gcr.io/<MY_PROJECT_ID>/nocodb/nocodb:latest \
                  --region=us-central1 \
                  --allow-unauthenticated \
                  --platform=managed 

DigitalOcean (App)

Click to Expand

Create Apps

On Home page, Click on Create icon & Select Apps (Deploy your code).

Screenshot 2022-02-19 at 12 17 43 PM

Choose Source: Docker Hub

Screenshot 2022-02-19 at 12 22 01 PM

Choose Source: Repository

Configure Source Repository as nocodb/nocodb. Optionally you can pick release tag if you are interested in specific NocoDB version.

Screenshot 2022-02-19 at 12 23 11 PM

[Optional] Additional Configurations

Screenshot 2022-02-19 at 12 24 44 PM

Name your web service

Pick a name for your NocoDB application. This name will become part of URL subsequently Pick nearest Region for cloud hosting Screenshot 2022-02-19 at 12 28 11 PM

Finalize and Launch

  • Select hosting plan for your NocoDB application

  • Click "Launch APP"

Screenshot 2022-02-19 at 12 29 23 PM

Application will be build & URL will be live in a minute! The URL will be something like https://simply-nocodb-rsyir.ondigitalocean.app/

Cloudron

Click to Expand

Log into Cloudron and select App Store

image

Search NocoDB

image

Click Install

image

Configure NocoDB

image

Go to My App and Launch NocoDB

image

CapRover

Click to Expand

Login and Click One-Click Apps / Databases

image

Search NocoDB

image

Configure NocoDB and Deploy

image

Railway

Click to Expand

Go to Templates, Search NocoDB and click Deploy

image

Configure NocoDB and Deploy

image

Production Setup

It is mandatory to configure NC_DB environment variables for production usecases.

Environment variables

VariableMandatoryCommentsIf absent
NC_DBYesSee our database URLsA local SQLite will be created in root folder
NC_DB_JSONYesCan be used instead of NC_DB and value should be valid knex connection JSON
NC_DB_JSON_FILEYesCan be used instead of NC_DB and value should be a valid path to knex connection JSON
DATABASE_URLNoJDBC URL Format. Can be used instead of NC_DB. Used in 1-Click Heroku deployment
DATABASE_URL_FILENoCan be used instead of DATABASE_URL: path to file containing JDBC URL Format.
NC_AUTH_JWT_SECRETYesJWT secret used for auth and storing other secretsA Random secret will be generated
PORTNoFor setting app running port8080
DB_QUERY_LIMIT_DEFAULTNoDefault pagination limit25
DB_QUERY_LIMIT_MAXNoMaximum allowed pagination limit1000
DB_QUERY_LIMIT_MINNoMinimum allowed pagination limit1
NC_TOOL_DIRNoApp directory to keep metadata and app related filesDefaults to current working directory. In docker maps to /usr/app/data/ for mounting volume.
NC_PUBLIC_URLYesUsed for sending Email invitationsBest guess from http request params
NC_JWT_EXPIRES_INNoJWT token expiry time10h
NC_CONNECT_TO_EXTERNAL_DB_DISABLEDNoDisable Project creation with external database
NC_INVITE_ONLY_SIGNUPNoAllow users to signup only via invite url, value should be any non-empty string.
NC_BACKEND_URLNoCustom Backend URLhttp://localhost:8080 will be used
NC_REQUEST_BODY_SIZENoRequest body size limit1048576
NC_EXPORT_MAX_TIMEOUTNoAfter NC_EXPORT_MAX_TIMEOUT csv gets downloaded in batchesDefault value 5000(in millisecond) will be used
NC_DISABLE_TELENoDisable telemetry
NC_DASHBOARD_URLNoCustom dashboard url path/dashboard
NC_GOOGLE_CLIENT_IDNoGoogle client id to enable google authentication
NC_GOOGLE_CLIENT_SECRETNoGoogle client secret to enable google authentication
NC_MIGRATIONS_DISABLEDNoDisable NocoDB migration
NC_ONE_CLICKNoUsed for Heroku one-click deployment
NC_MINNoIf set to any non-empty string the default splash screen(initial welcome animation) and matrix screensaver will disable
NC_SENTRY_DSNNoFor Sentry monitoring
NC_REDIS_URLNoCustom Redis URL. Example: redis://:authpassword@127.0.0.1:6380/4Meta data will be stored in memory
NC_DISABLE_ERR_REPORTNoDisable error reporting
NC_DISABLE_CACHENoTo be used only while debugging. On setting this to true - meta data be fetched from db instead of redis/cache.false
NC_BASEURL_INTERNALNoUsed as base url for internal(server) API callsDefault value in docker will be http://localhost:$PORT and in all other case it's populated from request object
AWS_ACCESS_KEY_IDNoFor Litestream - S3 access key idIf Litestream is configured and NC_DB is not present. SQLite gets backed up to S3
AWS_SECRET_ACCESS_KEYNoFor Litestream - S3 secret access keyIf Litestream is configured and NC_DB is not present. SQLite gets backed up to S3
AWS_BUCKETNoFor Litestream - S3 bucketIf Litestream is configured and NC_DB is not present. SQLite gets backed up to S3
AWS_BUCKET_PATHNoFor Litestream - S3 bucket path (like folder within S3 bucket)If Litestream is configured and NC_DB is not present. SQLite gets backed up to S3
NC_SMTP_FROMNoFor SMTP plugin - Email sender address
NC_SMTP_HOSTNoFor SMTP plugin - SMTP host value
NC_SMTP_PORTNoFor SMTP plugin - SMTP port value
NC_SMTP_USERNAMENoFor SMTP plugin (Optional) - SMTP username value for authentication
NC_SMTP_PASSWORDNoFor SMTP plugin (Optional) - SMTP password value for authentication
NC_SMTP_SECURENoFor SMTP plugin (Optional) - To enable secure set value as true any other value treated as false
NC_SMTP_IGNORE_TLSNoFor SMTP plugin (Optional) - To ignore tls set value as true any other value treated as false. For more info visit https://nodemailer.com/smtp/
NC_S3_BUCKET_NAMENoFor S3 storage plugin - AWS S3 bucket name
NC_S3_REGIONNoFor S3 storage plugin - AWS S3 region
NC_S3_ACCESS_KEYNoFor S3 storage plugin - AWS access key credential for accessing resource
NC_S3_ACCESS_SECRETNoFor S3 storage plugin - AWS access secret credential for accessing resource
NC_ADMIN_EMAILNoFor updating/creating super admin with provided email and password
NC_ADMIN_PASSWORDNoFor updating/creating super admin with provided email and password. Your password should have at least 8 letters with one uppercase, one number and one special letter(Allowed special chars $&+,:;=?@#|'.^*()%!_-" )
NODE_OPTIONSNoFor passing Node.js options to instance

Sample Demos

Code Sandbox

Loading CodeSandbox...

Docker deploying with one command

Using NPX

Heroku Deployment