n8n is a workflow automation tool, and a platform for building AI agents.
This is a step-by-step guide on how to install n8n on a Synology NAS using the Container Manager app (formerly known as Docker in DSM).
Stuck on a step? Tell me about it in the comments. I’ll try to lend a hand.
If you want more ways to boost your productivity with a NAS, don’t miss that other article.
n8n is especially handy if you do SEO and want to automate analysis and reporting workflows with AI without depending on paid cloud services. Running it on your local NAS kills the per-execution cost and gives you full control over your data.
Prerequisites on the NAS
Model and system
Make sure you have a Docker-compatible Synology. Mine is the DS1522+ (AMD64 CPU), which supports containers. I’d recommend running DSM 7 or higher. Install the Container Manager app from Synology’s Package Center if you haven’t already.
This is my NAS and I’m delighted with it, but do your own research and find the one that best fits your situation:

Synology DS1522+ NAS 5-bay 2.6/3.1GHz DualCore 8GB 4 LAN GbE USB3.2 eSATA 2-bay M.2 NVMe
See Deal on AmazonPrivileges
Use an administrator account on your NAS to run the install. From DSM 7 on, Container Manager lets you deploy containers directly without any external tooling.
Storage
Create or identify a storage volume (for example, volume1) with enough room for n8n’s data. I’d recommend creating a dedicated folder, say docker/n8n, where all of n8n’s persistent data will live.

Network and ports
Check that port 5678 (n8n’s default) is free. If you want to reach n8n from outside your local network, configure your NAS firewall or your router to allow traffic on that port. If you plan to serve HTTPS through a reverse proxy, obtain or generate a valid certificate (a synology.me or Let’s Encrypt certificate, for example) and a hostname/DDNS for your NAS. That way you can reach your n8n securely through a domain instead of the raw IP.
Step-by-step: installing n8n in Docker (Container Manager)
1. Prepare Container Manager
Open Container Manager on your Synology. If it’s your first time using it, review the default settings. Usually the default NAT/bridge network mode is enough.
2. Download the n8n image
- In Container Manager’s Registry tab, search for the official n8n image (type “n8n” or “n8nio/n8n“, for example).
- Select the official image and click Download.
- Pick the tag you want (
latestis recommended for the most recent stable version). - Wait for the download to finish.

3. Create the container
- Go to the Container tab and click Create.
- Select the n8n image you downloaded.
- Give the container a name (for example, “n8n”).

General
Tick the auto-restart option so n8n starts with the NAS (for example, “always” or “on failure”).
CPU/RAM configuration (optional)
You can cap the resources if you want, though for best performance it’s better to leave them at the defaults.
Ports
Under Port Settings, map n8n’s internal port 5678 to host port 5678 (or whichever you prefer if 5678 is already in use).
Note: if you plan to use an HTTPS reverse proxy, port 5678 can stay reachable internally only, exposing just the NAS’s port 443 externally.
4. Configure volumes (data persistence)
This step is essential so you don’t lose your flows and settings on update. In the Volumes section:
- Add a Mount Volume.
- Select the NAS folder you created, for example
volume1/docker/n8n. - Set the Mount path inside the container to
/home/node/.n8n.
This way n8n’s SQLite database, the encrypted credentials, and other settings are saved permanently on your NAS.
If the interface won’t let you select
/home/node/.n8n, type the path in by hand.
If you want to separate different kinds of data (binary files or certificates, say), you can create subfolders inside docker/n8n and mount them at paths like /files or similar.
Make sure the container’s user (by default, “node” with UID 1000) has write permissions on that folder.
If it doesn’t, you can change the permissions on the NAS or run the container temporarily as root (UID 0). For security, though, it’s better to adjust the permissions for user 1000.
5. Environment variables
Under Environment, add the following variables to configure n8n:
- N8N_HOST: the domain or subdomain n8n will use to generate URLs (for example,
n8n.yourdomain.synology.me). - N8N_PORT: n8n’s internal port (normally 5678).
- N8N_PROTOCOL:
"https"if you’re going to use HTTPS, or"http"if you’ll only use it on the LAN without encryption. - WEBHOOK_URL: the full URL n8n will use for external webhooks (example:
https://n8n.yourdomain.synology.me). - GENERIC_TIMEZONE and TZ: your time zone (for example,
"Europe/Madrid") so your cron flows and logs match your local time. - NODE_ENV: set
"production"to mark it as a production environment.
Security variables (recommended)
- N8N_BASIC_AUTH_ACTIVE: set it to
"true"to protect the interface with basic auth. Then add N8N_BASIC_AUTH_USER and N8N_BASIC_AUTH_PASSWORD with the username and password you want. - N8N_ENCRYPTION_KEY: the encryption key for credentials. If you don’t set it, n8n generates one on startup.
- N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS: set to
"true"to have n8n apply strict permissions to the settings file. - N8N_SECURE_COOKIE: set
"true"if you access over HTTPS, so the session cookies are secure.

(Optional) External database
By default, n8n uses SQLite. If you need a more robust setup (multi-user or lots of flows), consider deploying PostgreSQL and setting variables like DB_TYPE=postgresdb, DB_POSTGRESDB_HOST, DB_POSTGRESDB_DATABASE, and so on. Otherwise, you can stick with SQLite.
(Optional) Other settings
n8n offers plenty more variables, such as N8N_DIAGNOSTICS_ENABLED=false (to turn off telemetry) or N8N_PERSONALIZATION_ENABLED=false (to turn off the interface suggestions). Tune them to your taste.
6. Review and launch the container
Check on the summary screen that the ports, volumes, and environment variables are correct. Click Apply/Save and turn the container on.
7. Initial verification
Open the container logs to confirm n8n starts without errors. If all is well, you’ll see it listening on port 5678.
8. Access n8n
- On the local network: in your browser, enter
http://your_NAS_IP:5678(or whichever port you set). - With a domain and HTTPS: set up a Reverse Proxy on your NAS (in Application Portal or Web Station) to map your domain (example:
https://n8n.yourdomain.synology.me) tohttp://localhost:5678. Enable WebSocket and, if you like, HTTP/2 and compression for better performance.
9. n8n initialization
When you log in for the first time, n8n will ask you to create an account or use the credentials you defined. If you enabled basic auth, your browser will prompt for a username/password. Once you’re in, you’ll see the n8n dashboard, ready for you to start building flows.

Volume configuration and data persistence
Persistence of flows and data
As explained, mounting the /home/node/.n8n folder on your NAS is crucial so you don’t lose flows and credentials on update. After the first startup, check that files like database.sqlite (the database) and config (with the encryption key) have been created in the NAS folder.
Permissions
If “permission denied” errors show up or data isn’t saved, assign the right permissions to the folder on your NAS. One easy (if less secure) option is to give full permissions to everyone. The cleaner approach is to set permissions for UID 1000 (the “node” user inside the container). Another alternative is running the container as root (UID 0), though that’s not the most secure.
Binary files and certificates
If your flows save files, or you want to use your own TLS certificates inside n8n, consider mounting an extra folder at /files. That keeps any file or certificate on your NAS.
Updates
Step 1: Back up (CRUCIAL!)
Before you touch anything, secure your data. As covered above, your configuration lives in a folder (e.g. volume1/docker/n8n).
- Open File Station on your Synology.
- Navigate to the folder where you keep your n8n data (e.g.
docker/n8n). - Right-click the
n8nfolder and choose Compress to n8n.zip.- Why: if the new n8n version tries to migrate the database and fails, you’ll have an exact copy from before the update to restore.
Step 2: Download the new image
To update, you first need your NAS to pull the most recent version of the software.

- Open Container Manager.
- Go to the Registry tab.
- Search for
n8n. - Select the same image you used to install (usually
n8nio/n8nordocker.io/n8nio/n8n). - Click Download.
- When it asks for the tag, choose latest (or the specific version you’re running).
- Note: the system will warn you that the image already exists. Confirm that you want to overwrite it. Wait for the download to finish (you’ll see the notification in the system).

Step 3: Apply the update to the container
This is where a lot of people get confused. You don’t need to delete the container and build a new one from scratch. We’ll use the “Reset” function.
- Go to the Container tab.
- Find your n8n container (it’ll be in the “Running” state).
- Stop the container: select it and click Stop.
- Once stopped, right-click the container and choose Reset (in older versions it may be called “Clear” or “Clean up,” but the correct option in current Container Manager is Reset).
- What does this do? It deletes the “physical” container but keeps all your configuration (ports, mapped volumes, environment variables like
WEBHOOK_URL, etc.). When it starts back up, it’ll use the new image you downloaded in Step 2.
- What does this do? It deletes the “physical” container but keeps all your configuration (ports, mapped volumes, environment variables like
- Once the reset is done, select the container and hit Start.

Step 4: Verification and cleanup
- Give it a moment: n8n can take a couple of minutes to boot after an update, since it often runs internal database migrations.
- Check the logs: click the container > Details > Log. Look for messages like “Migrations executed successfully” or “n8n ready”.
- Open n8n: go to your browser. In the bottom corner or in the help menu, you should see the new version number.
- Clean up old images (optional):
- Go to the Images tab. If you see n8n images tagged “None” or “<none>”, those are the old, now-orphaned versions. You can delete them to free up space on the NAS.
Common problems and fixes
1. The container runs but I lose my workflows on restart
This happens if you didn’t mount the data folder correctly. Make sure the NAS folder maps to /home/node/.n8n in the container. If you can’t use that path, set the N8N_USER_FOLDER variable to another one (for example, /data) and mount the volume there.
2. I can’t map the volume to /home/node/.n8n
The Container Manager interface may not show system paths. Type the mount path in by hand, or use a docker-compose file for more control.
3. The n8n interface doesn’t show execution progress, or webhooks fail
This is usually a WebSocket or URL issue. Check that you set up the reverse proxy with WebSocket support and that the N8N_HOST, N8N_PROTOCOL, and WEBHOOK_URL variables point to the correct HTTPS path.
4. I get the default “Web Station” page or a 400 error
It means your request is hitting the NAS’s default web port. Check that the reverse proxy maps your domain on port 443 to http://localhost:5678. Make sure you’ve assigned the correct certificate under Security > Certificate.
5. Certificate errors or security warnings
If you haven’t set up a valid certificate, the browser will throw warnings. The right move is to use Let’s Encrypt or a trusted certificate. Always access over HTTPS, and if you have N8N_SECURE_COOKIE=true, you need an encrypted environment.
6. The container won’t start (it restarts constantly)
Check the logs in Container Manager. The most common causes are misconfigured variables (a non-existent database host, for instance) or port conflicts. If 5678 is in use, map another local port and adjust the variables to match.
7. Performance issues or freezes
If n8n is slow or eats a lot of resources, check for looping flows or too many simultaneous executions. Add RAM if you need to, or shut down other services. With heavy write loads, SQLite can lock up; consider migrating to PostgreSQL.
8. I can’t log in with my credentials after updating
If n8n asks you to create a new account after updating, you may not have mounted the folder correctly and lost the database. Check that database.sqlite and ~/.n8n/config are still on your volume. This is exactly why mounting the volume from the start and keeping backups is essential.
Frequently asked questions
Can you run n8n on a Synology NAS?
Yes. Any Docker-compatible Synology running DSM 7 or higher can run n8n through Container Manager. You pull the official n8nio/n8n image, map port 5678, mount a persistent folder to /home/node/.n8n, and start the container. No external tooling required.
Where does n8n store its data on the NAS?
Inside the container, everything lives in /home/node/.n8n: the SQLite database (database.sqlite), the encryption key (config), and other settings. You mount that path to a folder on your NAS (e.g. volume1/docker/n8n) so the data survives restarts and updates.
How do I update n8n on Synology without losing my workflows?
Back up the data folder first, pull the latest image in the Registry tab, then stop the container and use the Reset option. Reset deletes the container but keeps the configuration and mounted volumes, so your workflows and credentials stay intact. Start it again and it boots on the new image.
Why do I lose my workflows every time I restart the container?
Because the data folder isn’t mounted correctly. n8n keeps everything in /home/node/.n8n, and if that path isn’t mapped to a NAS folder, the data lives only inside the container and vanishes when it’s recreated. Map the volume, or set N8N_USER_FOLDER to a path you do mount.
Do I need HTTPS to run n8n on my NAS?
Not for LAN-only use; plain HTTP on port 5678 works inside your network. You need HTTPS once you expose n8n outside, or when N8N_SECURE_COOKIE is true. Set it up with a reverse proxy on the NAS using a synology.me or Let’s Encrypt certificate, with WebSocket enabled.
SQLite or PostgreSQL for n8n on a NAS?
SQLite is the default and fine for a single user with a moderate number of flows. If you have heavy write loads, many concurrent executions, or multi-user needs, SQLite can lock up; move to PostgreSQL by setting DB_TYPE=postgresdb and the related DB_POSTGRESDB_* variables.
Get the most out of your NAS
Continue reading about SEO & AI

LLM SEO With and Without RAG: A Practitioner’s Guide

NAS for SEO: How I Turn a Synology Into a 24/7 SEO Server

n8n for SEO: 6 Workflows I Run on My NAS (and the Data Limit That Breaks Them)

AI Agents for SEO: What They Are and How to Build One You Can Trust

How to use AI for SEO: the practical guide

