mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
475 lines
12 KiB
475 lines
12 KiB
3 years ago
|
---
|
||
3 years ago
|
title: 'Installation'
|
||
3 years ago
|
description: 'Simple installation - takes about three minutes!'
|
||
|
---
|
||
1 year ago
|
import Tabs from '@theme/Tabs';
|
||
|
import TabItem from '@theme/TabItem';
|
||
3 years ago
|
|
||
3 years ago
|
Simple installation - takes about three minutes!
|
||
3 years ago
|
|
||
3 years ago
|
## Prerequisites
|
||
2 years ago
|
- [Docker](https://www.docker.com/get-started) or [Node.js](https://nodejs.org/en/download) ( > v16.x )
|
||
3 years ago
|
|
||
|
## Quick try
|
||
3 years ago
|
|
||
2 years ago
|
### Docker
|
||
3 years ago
|
|
||
3 years ago
|
If you are a Docker user, you may try this way!
|
||
3 years ago
|
|
||
1 year ago
|
<Tabs>
|
||
|
<TabItem value="sqlite" label="SQLite">
|
||
3 years ago
|
|
||
1 year ago
|
```bash
|
||
|
docker run -d --name nocodb \
|
||
|
-v "$(pwd)"/nocodb:/usr/app/data/ \
|
||
|
-p 8080:8080 \
|
||
|
nocodb/nocodb:latest
|
||
|
```
|
||
2 years ago
|
|
||
1 year ago
|
</TabItem>
|
||
|
<TabItem value="mysql" label="MySQL">
|
||
3 years ago
|
|
||
1 year ago
|
```bash
|
||
|
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
|
||
|
```
|
||
3 years ago
|
|
||
1 year ago
|
</TabItem>
|
||
|
<TabItem value="postgres" label="Postgres">
|
||
2 years ago
|
|
||
1 year ago
|
```bash
|
||
|
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
|
||
|
```
|
||
3 years ago
|
|
||
1 year ago
|
</TabItem>
|
||
|
<TabItem value="sqlserver" label="SQL Server">
|
||
3 years ago
|
|
||
1 year ago
|
```bash
|
||
|
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
|
||
|
```
|
||
3 years ago
|
|
||
1 year ago
|
</TabItem>
|
||
|
</Tabs>
|
||
3 years ago
|
|
||
1 year ago
|
:::tip
|
||
3 years ago
|
|
||
1 year ago
|
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.
|
||
|
|
||
|
:::
|
||
3 years ago
|
|
||
1 year ago
|
:::tip
|
||
3 years ago
|
|
||
1 year ago
|
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](https://github.com/nocodb/nocodb/issues/1340#issuecomment-1049481043).
|
||
3 years ago
|
|
||
1 year ago
|
:::
|
||
3 years ago
|
|
||
|
### Docker Compose
|
||
|
|
||
1 year ago
|
We provide different docker-compose.yml files under [this directory](https://github.com/nocodb/nocodb/tree/master/docker-compose). Here are some examples.
|
||
3 years ago
|
|
||
1 year ago
|
<Tabs>
|
||
|
<TabItem value="js" label="JavaScript">
|
||
2 years ago
|
|
||
1 year ago
|
```js
|
||
|
function helloWorld() {
|
||
|
console.log('Hello, world!');
|
||
|
}
|
||
|
```
|
||
3 years ago
|
|
||
1 year ago
|
</TabItem>
|
||
|
<TabItem value="mysql" label="MySQL">
|
||
3 years ago
|
|
||
1 year ago
|
```bash
|
||
|
git clone https://github.com/nocodb/nocodb
|
||
|
cd nocodb/docker-compose/mysql
|
||
|
docker-compose up -d
|
||
|
```
|
||
3 years ago
|
|
||
1 year ago
|
</TabItem>
|
||
|
<TabItem value="postgres" label="Postgres">
|
||
3 years ago
|
|
||
1 year ago
|
```bash
|
||
|
git clone https://github.com/nocodb/nocodb
|
||
|
cd nocodb/docker-compose/pg
|
||
|
docker-compose up -d
|
||
|
```
|
||
2 years ago
|
|
||
1 year ago
|
</TabItem>
|
||
|
<TabItem value="sqlserver" label="SQL Server">
|
||
3 years ago
|
|
||
1 year ago
|
```bash
|
||
|
git clone https://github.com/nocodb/nocodb
|
||
|
cd nocodb/docker-compose/mssql
|
||
|
docker-compose up -d
|
||
|
```
|
||
3 years ago
|
|
||
1 year ago
|
</TabItem>
|
||
|
</Tabs>
|
||
|
|
||
|
:::tip
|
||
3 years ago
|
|
||
|
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`.
|
||
3 years ago
|
|
||
1 year ago
|
:::
|
||
|
|
||
|
:::tip
|
||
|
|
||
|
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](https://github.com/nocodb/nocodb/issues/1313#issuecomment-1046625974).
|
||
|
|
||
|
:::
|
||
3 years ago
|
|
||
2 years ago
|
|
||
|
### NPX
|
||
|
|
||
|
You can run below command if you need an interactive configuration.
|
||
|
|
||
|
```bash
|
||
|
npx create-nocodb-app
|
||
|
```
|
||
|
|
||
|
#### Preview:
|
||
|
|
||
1 year ago
|
<img width="587" alt="image" src="https://user-images.githubusercontent.com/35857179/161526235-5ee0d592-0105-4a57-aa53-b1048dca6aad.png" />
|
||
2 years ago
|
|
||
|
|
||
|
|
||
|
### Homebrew
|
||
|
|
||
|
```bash
|
||
|
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)
|
||
|
|
||
|
```bash
|
||
|
curl http://get.nocodb.com/macos-x64 -o nocodb -L \
|
||
|
&& chmod +x nocodb \
|
||
|
&& ./nocodb
|
||
|
```
|
||
|
|
||
|
##### MacOS (arm64)
|
||
|
|
||
|
```bash
|
||
|
curl http://get.nocodb.com/macos-arm64 -o nocodb -L \
|
||
|
&& chmod +x nocodb \
|
||
|
&& ./nocodb
|
||
|
```
|
||
|
|
||
|
##### Linux (x64)
|
||
|
|
||
|
```bash
|
||
|
curl http://get.nocodb.com/linux-x64 -o nocodb -L \
|
||
|
&& chmod +x nocodb \
|
||
|
&& ./nocodb
|
||
|
```
|
||
|
##### Linux (arm64)
|
||
|
|
||
|
```bash
|
||
|
curl http://get.nocodb.com/linux-arm64 -o nocodb -L \
|
||
|
&& chmod +x nocodb \
|
||
|
&& ./nocodb
|
||
|
```
|
||
|
|
||
|
##### Windows (x64)
|
||
|
|
||
|
```bash
|
||
|
iwr http://get.nocodb.com/win-x64.exe
|
||
|
.\Noco-win-x64.exe
|
||
|
```
|
||
|
##### Windows (arm64)
|
||
|
|
||
|
```bash
|
||
|
iwr http://get.nocodb.com/win-arm64.exe
|
||
|
.\Noco-win-arm64.exe
|
||
|
```
|
||
|
|
||
|
### Node Application
|
||
|
|
||
|
We provide a simple NodeJS Application for getting started.
|
||
|
|
||
|
```bash
|
||
|
git clone https://github.com/nocodb/nocodb-seed
|
||
|
cd nocodb-seed
|
||
1 year ago
|
pnpm install
|
||
|
pnpm start
|
||
2 years ago
|
```
|
||
|
|
||
|
|
||
3 years ago
|
### AWS ECS (Fargate)
|
||
|
|
||
2 years ago
|
<details>
|
||
|
<summary>Click to Expand</summary>
|
||
3 years ago
|
|
||
2 years ago
|
#### Create ECS Cluster
|
||
3 years ago
|
|
||
2 years ago
|
```
|
||
|
aws ecs create-cluster \
|
||
|
--cluster-name <YOUR_ECS_CLUSTER>
|
||
|
```
|
||
3 years ago
|
|
||
2 years ago
|
#### Create Log group
|
||
3 years ago
|
|
||
2 years ago
|
```
|
||
|
aws logs create-log-group \
|
||
|
--log-group-name /ecs/<YOUR_APP_NAME>/<YOUR_CONTAINER_NAME>
|
||
|
```
|
||
3 years ago
|
|
||
2 years ago
|
#### Create ECS Task Definiton
|
||
3 years ago
|
|
||
2 years ago
|
Every time you create it, it will add a new version. If it is not existing, the version will be 1.
|
||
3 years ago
|
|
||
2 years ago
|
```bash
|
||
|
aws ecs register-task-definition \
|
||
|
--cli-input-json "file://./<YOUR_TASK_DEF_NAME>.json"
|
||
|
```
|
||
3 years ago
|
|
||
1 year ago
|
:::tip
|
||
|
|
||
|
This json file defines the container specification. You can define secrets such as NC_DB and environment variables here.
|
||
|
|
||
|
:::
|
||
2 years ago
|
|
||
|
Here's the sample Task Definition
|
||
|
|
||
|
```json
|
||
|
{
|
||
|
"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>"
|
||
|
}
|
||
|
```
|
||
3 years ago
|
|
||
2 years ago
|
#### Create ECS Service
|
||
3 years ago
|
|
||
2 years ago
|
```bash
|
||
|
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>
|
||
|
```
|
||
|
|
||
1 year ago
|
:::tip
|
||
|
|
||
|
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.
|
||
|
|
||
|
:::
|
||
2 years ago
|
|
||
|
</details>
|
||
|
|
||
2 years ago
|
### GCP (Cloud Run)
|
||
|
|
||
|
<details>
|
||
|
<summary>Click to Expand</summary>
|
||
|
|
||
|
#### 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.
|
||
|
|
||
|
```bash
|
||
|
# 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
|
||
|
|
||
|
```bash
|
||
|
gcloud run deploy --image=gcr.io/<MY_PROJECT_ID>/nocodb/nocodb:latest \
|
||
|
--region=us-central1 \
|
||
|
--allow-unauthenticated \
|
||
|
--platform=managed
|
||
|
```
|
||
|
|
||
|
</details>
|
||
|
|
||
2 years ago
|
### DigitalOcean (App)
|
||
|
|
||
|
<details>
|
||
|
<summary>Click to Expand</summary>
|
||
|
|
||
|
#### Create Apps
|
||
|
|
||
|
On Home page, Click on Create icon & Select Apps (Deploy your code).
|
||
|
|
||
|
![Screenshot 2022-02-19 at 12 17 43 PM](https://user-images.githubusercontent.com/86527202/154790558-f8fe5580-5a58-412c-9c2e-145587712bf2.png)
|
||
|
|
||
|
#### Choose Source: Docker Hub
|
||
|
|
||
|
![Screenshot 2022-02-19 at 12 22 01 PM](https://user-images.githubusercontent.com/86527202/154790563-b5b6d5b4-0bdc-4718-8cea-0a7ee52f283b.png)
|
||
|
|
||
|
#### 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](https://user-images.githubusercontent.com/86527202/154790564-1dcb5e33-3a57-471a-a44c-835a410a0cb7.png)
|
||
|
|
||
|
#### [Optional] Additional Configurations
|
||
|
|
||
|
![Screenshot 2022-02-19 at 12 24 44 PM](https://user-images.githubusercontent.com/86527202/154790565-c0234b2e-ad50-4042-90b6-4f8798f1d585.png)
|
||
|
|
||
|
#### 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](https://user-images.githubusercontent.com/86527202/154790567-a6e65e4e-9aa0-4edb-998e-da8803ad6e23.png)
|
||
|
|
||
|
#### Finalize and Launch
|
||
|
|
||
|
- Select hosting plan for your NocoDB application
|
||
|
|
||
|
- Click "Launch APP"
|
||
|
|
||
|
![Screenshot 2022-02-19 at 12 29 23 PM](https://user-images.githubusercontent.com/86527202/154790570-62044713-5cca-4d06-82ec-f3cc257218a1.png)
|
||
|
|
||
|
Application will be build & URL will be live in a minute! The URL will be something like https://simply-nocodb-rsyir.ondigitalocean.app/
|
||
|
|
||
|
</details>
|
||
3 years ago
|
|
||
2 years ago
|
### Cloudron
|
||
|
|
||
|
<details>
|
||
|
<summary>Click to Expand</summary>
|
||
|
|
||
|
#### Navigate to App Store
|
||
|
|
||
|
Log into Cloudron and select App Store
|
||
|
|
||
|
![image](https://user-images.githubusercontent.com/35857179/194700146-aae90503-a8fd-4bc5-8397-39f0bc279606.png)
|
||
|
|
||
|
#### Search NocoDB
|
||
|
|
||
|
![image](https://user-images.githubusercontent.com/35857179/194700181-b5303919-70b8-4cf8-bebe-7e75aca601f3.png)
|
||
|
|
||
|
#### Click Install
|
||
|
|
||
|
![image](https://user-images.githubusercontent.com/35857179/194700192-d702f5c2-2afa-45c5-9823-4ebe9e141b01.png)
|
||
|
|
||
|
#### Configure NocoDB
|
||
|
|
||
|
![image](https://user-images.githubusercontent.com/35857179/194700230-c35e934f-bd93-4948-8f31-935483b30571.png)
|
||
|
|
||
|
#### Go to My App and Launch NocoDB
|
||
|
|
||
|
![image](https://user-images.githubusercontent.com/35857179/194700464-50098cb1-bf94-42bb-a63a-cc0aad671913.png)
|
||
|
|
||
|
</details>
|
||
|
|
||
2 years ago
|
### CapRover
|
||
|
|
||
|
<details>
|
||
|
<summary>Click to Expand</summary>
|
||
|
|
||
|
#### Login and Click One-Click Apps / Databases
|
||
|
|
||
|
![image](https://user-images.githubusercontent.com/35857179/194701420-7fe5c396-a488-456c-98de-6f2ee1151fc5.png)
|
||
|
|
||
|
#### Search NocoDB
|
||
|
|
||
|
![image](https://user-images.githubusercontent.com/35857179/194701537-63e7efc5-013b-4ca9-8659-56e9d536e7d0.png)
|
||
|
|
||
|
#### Configure NocoDB and Deploy
|
||
|
|
||
|
![image](https://user-images.githubusercontent.com/35857179/194701576-19519df5-2aa4-435d-8fc6-7bc684b9cfe1.png)
|
||
|
|
||
|
</details>
|
||
|
|
||
2 years ago
|
### Railway
|
||
|
|
||
|
<details>
|
||
|
<summary>Click to Expand</summary>
|
||
|
|
||
|
#### Navigate to Templates
|
||
|
|
||
|
Go to [Templates](https://railway.app/templates), Search NocoDB and click Deploy
|
||
|
|
||
|
![image](https://user-images.githubusercontent.com/35857179/194702833-1bea22ee-6dfa-4024-ac27-e33fe56e5500.png)
|
||
|
|
||
|
#### Configure NocoDB and Deploy
|
||
|
|
||
|
![image](https://user-images.githubusercontent.com/35857179/194702960-149393fe-b00f-4d84-9e54-22cb7616ba44.png)
|
||
|
|
||
|
</details>
|
||
3 years ago
|
|
||
2 years ago
|
### FreeBSD / FreeNAS / TrueNAS Jail
|
||
|
|
||
|
See [here](https://gist.github.com/Zamana/e9281d736f9e9ce5882c6f4b140a590e) provided by [C. R. Zamana](https://github.com/Zamana).
|
||
|
|
||
2 years ago
|
|
||
3 years ago
|
## Sample Demos
|
||
3 years ago
|
|
||
3 years ago
|
### Code Sandbox
|
||
|
|
||
1 year ago
|
<iframe width="100%" height="500" src="https://codesandbox.io/embed/vigorous-firefly-80kq5?hidenavigation=1&theme=dark" title="Code Sandbox" frameBorder="0" allow="clipboard-write"></iframe>
|
||
3 years ago
|
|
||
3 years ago
|
### Docker deploying with one command
|
||
|
|
||
1 year ago
|
<iframe width="100%" height="500" src="https://www.youtube.com/embed/K-UEecQyiOk" title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen></iframe>
|
||
3 years ago
|
|
||
|
### Using NPX
|
||
|
|
||
1 year ago
|
<iframe width="100%" height="500" src="https://www.youtube.com/embed/v6Nn75P1p7I" title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen></iframe>
|
||
|
|