n8n (container)
n8n is an extendable workflow automation tool.
Image details
Configuration
TypeContainerlinuxn8nio/n8n:latest5678:5678/tcp/home/node/.n8n : /portainer/Files/AppData/Config/n8nN8N_BASIC_AUTH_ACTIVE=trueN8N_BASIC_AUTH_USER=adminN8N_BASIC_AUTH_PASSWORD=adminunless-stoppedTemplate by novaspirit
Notes
Check our Github page: https://github.com/pi-hosted/pi-hosted
Official Webpage: https://n8n.io/
Official Docker Documentation: https://docs.n8n.io/getting-started/installation/#docker
Documentation is Available here
Standalone Install
Select an install method, to see config/commands for deploying n8n (container)
Install on Portainer
Import all app templates into your Portainer instance, for easy 1-click deploys
- Ensure both Docker and Portainer are installed, and up-to-date
- Log into your Portainer web UI
- Under Settings → App Templates, paste the below URL
- Head to Home → App Templates, and the list of apps will show up
- Select n8n (container), fill in any config options, and hit Deploy
Template Import URL
https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me
More install options in our documentation.

n8n - Secure Workflow Automation for Technical Teams
n8n is a workflow automation platform that gives technical teams the flexibility of code with the speed of no-code. With 400+ integrations, native AI capabilities, and a fair-code license, n8n lets you build powerful automations while maintaining full control over your data and deployments.
Key Capabilities
- Code When You Need It: Write JavaScript/Python, add npm packages, or use the visual interface
- AI-Native Platform: Build AI agent workflows based on LangChain with your own data and models
- Full Control: Self-host with our fair-code license or use our cloud offering
- Enterprise-Ready: Advanced permissions, SSO, and air-gapped deployments
- Active Community: 400+ integrations and 900+ ready-to-use templates
Contents
- Key Capabilities - Contents - Demo - Available integrations - Documentation - Start n8n in Docker - Start n8n with tunnel - Use with PostgreSQL - Passing sensitive data using files - Example server setups - Updating- [Pull latest (stable) version](#pull-latest-stable-version)
- [Pull specific version](#pull-specific-version)
- [Pull next (unstable) version](#pull-next-unstable-version)
- [Updating with Docker Compose](#updating-with-docker-compose) - Setting Timezone
- Build Docker-Image
- What does n8n mean and how do you pronounce it?
- Support
- Jobs
- LicenseDemo
This :tv: short video (< 4 min) goes over key concepts of creating workflows in n8n.Available integrations
n8n has 200+ different nodes to automate workflows. A full list can be found at https://n8n.io/integrations.Documentation
The official n8n documentation can be found at https://docs.n8n.io.Additional information and example workflows are available on the website at https://n8n.io.
Start n8n in Docker
In the terminal, enter the following:docker volume create n8n_data
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-v n8n_data:/home/node/.n8n \
docker.n8n.io/n8nio/n8nThis command will download the required n8n image and start your container. You can then access n8n by opening: http://localhost:5678
To save your work between container restarts, it also mounts a docker volume,
n8n_data. The workflow data gets saved in an SQLite database in the user folder (/home/node/.n8n). This folder also contains important data like the webhook URL and the encryption key used for securing credentials.If this data can't be found at startup n8n automatically creates a new key and any existing credentials can no longer be decrypted.
Start n8n with tunnel
WARNING: This is only meant for local development and testing and should NOT be used in production!
n8n must be reachable from the internet to make use of webhooks - essential for triggering workflows from external web-based services such as GitHub. To make this easier, n8n has a special tunnel service which redirects requests from our servers to your local n8n instance. You can inspect the code running this service here: https://github.com/n8n-io/localtunnel
To use it simply start n8n with
--tunneldocker volume create n8n_data
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-v n8n_data:/home/node/.n8n \
docker.n8n.io/n8nio/n8n \
start --tunnelUse with PostgreSQL
By default, n8n uses SQLite to save credentials, past executions and workflows. However, n8n also supports using PostgreSQL.WARNING: Even when using a different database, it is still important topersist the
/home/node/.n8n folder, which also contains essential n8n
user data including the encryption key for the credentials.In the following commands, replace the placeholders (depicted within angled brackets, e.g.
<POSTGRES_USER>) with the actual data:docker volume create n8n_data
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_PORT=<POSTGRES_PORT> \
-e DB_POSTGRESDB_USER=<POSTGRES_USER> \
-e DB_POSTGRESDB_SCHEMA=<POSTGRES_SCHEMA> \
-e DB_POSTGRESDB_PASSWORD=<POSTGRES_PASSWORD> \
-v n8n_data:/home/node/.n8n \
docker.n8n.io/n8nio/n8nA full working setup with docker-compose can be found here.
Passing sensitive data using files
To avoid passing sensitive information via environment variables, "\_FILE" may be appended to some environment variable names. n8n will then load the data from a file with the given name. This makes it possible to load data easily from Docker and Kubernetes secrets.The following environment variables support file input:
- DBPOSTGRESDBDATABASEFILE
- DBPOSTGRESDBHOSTFILE
- DBPOSTGRESDBPASSWORDFILE
- DBPOSTGRESDBPORTFILE
- DBPOSTGRESDBUSERFILE
- DBPOSTGRESDBSCHEMAFILE
Example server setups
Example server setups for a range of cloud providers and scenarios can be found in the Server Setup documentation.Updating
Before you upgrade to the latest version make sure to check here if there are any breaking changes which may affect you: Breaking ChangesFrom your Docker Desktop, navigate to the Images tab and select Pull from the context menu to download the latest n8n image.
You can also use the command line to pull the latest, or a specific version:
Pull latest (stable) version
docker pull docker.n8n.io/n8nio/n8nPull specific version
docker pull docker.n8n.io/n8nio/n8n:0.220.1Pull next (unstable) version
docker pull docker.n8n.io/n8nio/n8n:nextStop the container and start it again:
- Get the container ID:
docker ps -a- Stop the container with ID containerid:
docker stop [container_id]- Remove the container (this does not remove your user data) with ID containerid:
docker rm [container_id]- Start the new container:
docker run --name=[container_name] [options] -d docker.n8n.io/n8nio/n8nUpdating with Docker Compose
If you run n8n using a Docker Compose file, follow these steps to update n8n:# Pull latest version
docker compose pull
# Stop and remove older version
docker compose down
# Start the container
docker compose up -dSetting the timezone
To specify the timezone n8n should use, the environment variableGENERIC_TIMEZONE can
be set. One example where this variable has an effect is the Schedule node.The system's timezone can be set separately with the environment variable
TZ.
This controls the output of certain scripts and commands such as $ date.For example, to use the same timezone for both:
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-e GENERIC_TIMEZONE="Europe/Berlin" \
-e TZ="Europe/Berlin" \
docker.n8n.io/n8nio/n8nFor more information on configuration and environment variables, please see the n8n documentation.
Build Docker-Image
docker buildx build --platform linux/amd64,linux/arm64 --build-arg N8N_VERSION=<VERSION> -t n8n:<VERSION> .
# For example:
docker buildx build --platform linux/amd64,linux/arm64 --build-arg N8N_VERSION=1.30.1 -t n8n:1.30.1 .What does n8n mean and how do you pronounce it?
Short answer: It means "nodemation" and it is pronounced as n-eight-n.Long answer: I get that question quite often (more often than I expected) so I decided it is probably best to answer it here. While looking for a good name for the project with a free domain I realized very quickly that all the good ones I could think of were already taken. So, in the end, I chose nodemation. "node-" in the sense that it uses a Node-View and that it uses Node.js and "-mation" for "automation" which is what the project is supposed to help with. However, I did not like how long the name was and I could not imagine writing something that long every time in the CLI. That is when I then ended up on "n8n". Sure it does not work perfectly but neither does it for Kubernetes (k8s) and I did not hear anybody complain there. So I guess it should be ok.
Support
If you need more help with n8n, you can ask for support in the n8n community forum. This is the best source of answers, as both the n8n support team and community members can help.Jobs
If you are interested in working for n8n and so shape the future of the project check out our job posts.License
You can find the license information here.Serve n8n (container) on your own domain behind Caddy, Nginx or Traefik. Fill in your domain and copy the result. It's a starting point, some apps need their own base URL or extra headers set too.
Proxying n8n-container.example.com to http://n8n:5678
Add this to your Caddyfile
n8n-container.example.com {
reverse_proxy http://n8n:5678
}Check the logs first
Nine times out of ten the logs tell you exactly what went wrong.
- In Portainer, go to Containers, click the container, then Logs. Or run
docker logs n8n - Exit codes help too:
137means killed, usually out of memory.126or127means the command inside the image is broken.
Port already in use
If deployment fails with "Bind for 0.0.0.0:5678 failed: port is already allocated", something else on your server is using that port.
- Find what's using it:
sudo ss -tlnp | grep :5678 - Stop the other service, or pick a different host port. In
5678:5678only the left number is yours to change, the right one belongs to the app.
Running but the page won't load
The container is up but nothing appears in your browser.
- Use your server's real IP:
http://your-server-ip:5678. The 0.0.0.0 link Portainer shows isn't a real address. - Give it a minute after first deploy, n8n can take a while to initialise.
- Make sure your firewall allows the port, e.g.
sudo ufw allow 5678
Permission denied on volumes
If the logs show "permission denied", the app can't write to its data folder on the host.
- Fix the ownership:
sudo chown -R 1000:1000 /portainer/Files/AppData/Config/n8n
Image won't pull
Test the pull directly on the host: docker pull n8nio/n8n:latest
- "manifest unknown" means the tag no longer exists. This template uses
latest, so try pinning a specific version instead. - "toomanyrequests" is the Docker Hub rate limit. Log in with
docker loginto raise it. - "no space left on device" means a full disk. Reclaim space with
docker system prune
"exec format error"
This means the image was built for a different CPU architecture than your server.
- This image supports:
amd64, arm64 - Check yours with
uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.
Container keeps restarting
The unless-stopped restart policy relaunches the app after every crash, so the real error can scroll past.
- Check the logs right after a restart, the last few lines before it died are the useful ones.
- Get the exit code with
docker inspect n8n --format '{{.State.ExitCode}}' - Still stuck? Redeploy once with the restart policy set to
noso the failure stays visible.
Raise an issue
Found something which isn't working as it should? Here's how to report it.
- Bug within the app: Open an issue within n8n's repo
- Template not working: Open an issue on novaspirit/pi-hosted
- This website not working: Open an issue on lissy93/portainer-templates
A single container
n8n (container) runs as one container, the simplest kind of app here. Just the one image to pull and nothing else wired up alongside it.
The app image
An image is the app packed up ready to go, everything n8n (container) needs bundled into one download. This template pulls n8nio/n8n:latest, which Docker fetches once (about 355 MB) and then starts your own copy from.
Where the image comes from
Docker pulls its images from registries, public libraries of ready-built apps. n8n (container)'s comes from Docker Hub, published by n8nio.
Version tags
The bit after the colon in the image name is the version tag. Here it's latest, which always points at the newest build, so a redeploy can bump you to a newer release without you asking. Newest right now is 2.35.3-0dccd14. Pin a specific tag if you would rather stay on one version.
Which machines it runs on
Every image is built for particular CPU types. This one ships for amd64, arm64, so it runs on both regular x86 servers and ARM boards like a Raspberry Pi.
Ports
A port is the door the app answers on. A mapping like 5678:5678 means it's reachable on port 5678 of your server, where the left number is yours to change and the right one belongs to the app. It opens:
5678:5678
Volumes
A volume is where n8n (container) keeps its files so they survive an update or a restart. Without one, anything it saves would sit inside the container and vanish the moment it's recreated. This template mounts:
/home/node/.n8nfrom/portainer/Files/AppData/Config/n8non the host
Environment variables
Environment variables are the settings you hand over when you deploy, things like a password or a timezone. n8n (container) takes 3 of them, all with defaults you can leave alone or tweak:
N8N_BASIC_AUTH_ACTIVE, defaults totrueN8N_BASIC_AUTH_USER, defaults toadminN8N_BASIC_AUTH_PASSWORD, defaults toadmin
Restart policy
The restart policy here is unless-stopped, so Docker restarts n8n (container) after a crash or reboot, but leaves it off when you stop it on purpose. You can change this on the deploy screen. The choices are no (never restart), on-failure (only after a crash), unless-stopped (restart unless you stop it), and always (bring it back no matter what).
Networking
Nothing custom is set, so n8n (container) sits on Docker's default bridge network: its own private space that reaches the outside world only through the ports it publishes.
Container name
Once it's deployed, Portainer names the container n8n. That's what you'll spot in the containers list and use in commands like docker logs n8n.
Platform
The platform is linux, the kind of system the container is built to run on. Docker and Portainer handle this on a normal Linux server.
Portainer app templates
Zooming out, this whole page comes from a Portainer app template: a short recipe telling Portainer how to set n8n (container) up. Add the template list to Portainer once, then deploying n8n (container) is a click rather than a wall of config.