多维表格
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.

72 lines
1.8 KiB

---
title: 'Docker'
description: 'Docker installation - takes about three minutes!'
tags: ['Open Source']
keywords : ['NocoDB installation', 'NocoDB docker installation', 'NocoDB prerequisites']
---
Docker installation - takes about three minutes!
Docker provides an easy way to install and run NocoDB. Follow these steps to get NocoDB up and running using Docker.
## Prerequisites
- [Docker](https://www.docker.com/get-started)
## Installation Steps
1. Choose your preferred database:
<Tabs>
<TabItem value="sqlite" label="SQLite">
```
docker run -d --name nocodb \
-v "$(pwd)"/nocodb:/usr/app/data/ \
-p 8080:8080 \
nocodb/nocodb:latest
```
</TabItem>
<TabItem value="postgres" label="Postgres">
```
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
```
</TabItem>
</Tabs>
2. Once the container is running, you can access NocoDB by opening http://localhost:8080 in your web browser.
:::tip
To persist data, always mount a volume at `/usr/app/data/`. Without this, your data will be lost when the container is removed.
For versions prior to 0.10.6, mount the volume at /usr/src/app.
:::
## Troubleshooting
- If you can't access NocoDB after installation, check if the Docker container is running:
```bash
docker ps
```
- If the container is not running, check the logs for any errors:
```bash
docker logs nocodb
```
## Installation Video
<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>