mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 12:35:46 +03:00
📚 Add documentation about n8n in Docker with PostgresDB
This commit is contained in:
parent
892cf40429
commit
7aff08cc8a
@ -67,9 +67,11 @@ docker run -it --rm \
|
||||
n8nio/n8n
|
||||
```
|
||||
|
||||
## Use with MongoDB
|
||||
### Start with other Database
|
||||
|
||||
Instead of SQLite, it is also possible to run n8n with MongoDB.
|
||||
By default n8n uses SQLite to save credentials, past executions and workflows.
|
||||
n8n however also supports MongoDB and PostgresDB. To use them simply a few
|
||||
environment variables have to be set.
|
||||
|
||||
It is important to still persist the data in the `/root/.n8` folder. The reason
|
||||
is that it contains n8n user data. That is the name of the webhook
|
||||
@ -78,6 +80,9 @@ for the credentials. If none gets found n8n creates automatically one on
|
||||
startup. In case credentials are already saved with a different encryption key
|
||||
it can not be used anymore as encrypting it is not possible anymore.
|
||||
|
||||
|
||||
#### Use with MongoDB
|
||||
|
||||
Replace the following placeholders with the actual data:
|
||||
- MONGO_DATABASE
|
||||
- MONGO_HOST
|
||||
@ -90,7 +95,7 @@ docker run -it --rm \
|
||||
--name n8n \
|
||||
-p 5678:5678 \
|
||||
-e DB_TYPE=mongodb \
|
||||
-e DB_MONGODB_CONNECTION_URL="mongodb://MONGO_USER:MONGO_PASSWORD@MONGO_SERVER:MONGO_PORT/MONGO_DATABASE" \
|
||||
-e DB_MONGODB_CONNECTION_URL="mongodb://<MONGO_USER>:<MONGO_PASSWORD>@<MONGO_SERVER>:<MONGO_PORT>/<MONGO_DATABASE>" \
|
||||
-v ~/.n8n:/root/.n8n \
|
||||
n8nio/n8n \
|
||||
n8n start
|
||||
@ -99,6 +104,30 @@ docker run -it --rm \
|
||||
A full working setup with docker-compose can be found [here](../../compose/withMongo/README.md)
|
||||
|
||||
|
||||
#### Use with PostgresDB
|
||||
|
||||
Replace the following placeholders with the actual data:
|
||||
- POSTGRES_DATABASE
|
||||
- POSTGRES_HOST
|
||||
- POSTGRES_PASSWORD
|
||||
- POSTGRES_PORT
|
||||
- POSTGRES_USER
|
||||
|
||||
```
|
||||
docker run -it --rm \
|
||||
--name n8n \
|
||||
-p 5678:5678 \
|
||||
-e DB_TYPE=postgresdb \
|
||||
-e DB_POSTGRESDB_DATABASE=<POSTGRES_DATABASE> \
|
||||
-e DB_POSTGRESDB_HOST=<POSTGRES_HOST> \
|
||||
-e DB_POSTGRESDB_PASSWORD=<POSTGRES_PASSWORD> \
|
||||
-e DB_POSTGRESDB_PORT=<POSTGRES_PORT> \
|
||||
-e DB_POSTGRESDB_USER=<POSTGRES_USER> \
|
||||
-v ~/.n8n:/root/.n8n \
|
||||
n8nio/n8n \
|
||||
n8n start
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
n8n is licensed under **Apache 2.0 with Commons Clause**
|
||||
|
Loading…
Reference in New Issue
Block a user