n8n is a workflow automation tool and a platform for building AI agents. This guide is the setup I used on my own Synology DS1522+ with Container Manager, made more cautious than most guides out there: persistent data, a pinned version, access over VPN or HTTPS, and no container running as root.
I last reviewed it on October 20, 2026 against n8n’s and Synology’s current official documentation. The screenshots are still useful to find your way around DSM; if a button label has changed, keep the technical reasoning I give at each step.
Stuck on a step? Send me a message on LinkedIn with the step and the error you see. 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.
My setup: what I ran and what tripped me up
- Hardware and system: Synology DS1522+ (AMD Ryzen Embedded R1600, 4 threads, 16 GB of RAM) on DSM 7.4.1 at my last check, in September 2026.
- How I ran n8n: as a Compose project in its own
dockersubfolder, pinned ton8nio/n8n:2.7.5and published through a DSM reverse proxy rule. - Where I am now: I’m not running n8n on the NAS at the moment, so for this update I re-checked every step against n8n’s and Synology’s official documentation instead of trusting my memory.
Two things caught me out on this NAS:
- The proxy isn’t “localhost” from the container’s point of view. Behind DSM’s reverse proxy, a container sees requests coming from the gateway of its Docker bridge network (an address like
172.25.0.1), not from127.0.0.1. I measured it on the Gitea instance that sits behind the same DSM proxy: a trusted-proxy rule set to loopback never matched. That’s why for n8n I’d rather setN8N_PROXY_HOPS=1than guess IP addresses. - Old images pile up. Each n8n image weighs about 1 GB. In March 2026 my unused images, an old n8n one among them, were taking around 3 GB. Check the Images tab after every update (step 4 of the update section below).
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 happy 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 AmazonAffiliate disclosure: the Amazon link above is an affiliate link. If you buy through it, I may earn a small commission at no extra cost to you. It doesn’t change what I recommend: it’s the NAS I actually use.
Privileges
You’ll need an account with permission to install and configure Container Manager. Use it only for the deployment and then go back to your everyday account: n8n doesn’t need you to keep an admin session open, and the container doesn’t need to run as root or in privileged mode.
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 internal port 5678 (n8n’s default) is free, but don’t open it or forward it from the internet. To reach n8n from outside your home, my first choice is a VPN. If you need public webhooks or access through a domain, publish only HTTPS on port 443 through DSM’s reverse proxy with a valid certificate (Let’s Encrypt, for example); port 5678 should stay limited to the NAS and your trusted local network.
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 an explicit stable version. As of this review, the stable release is
2.44.4, so downloadn8nio/n8n:2.44.4. Don’t rely on a moving tag that always points to the newest release: pinning the version makes a re-creation or a rollback reproducible. Before you install, check n8n’s official releases to confirm it’s still the stable version you want to deploy. - 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 a free host port. Restrict access to it with DSM’s firewall to your LAN or your VPN network. Don’t create a public port forward to it on your router.
Note: if you use the HTTPS reverse proxy, the destination will be
http://localhost:5678and the only public entry point will be port 443. In DSM 7 you’ll find the reverse proxy under Control Panel → Login Portal → Advanced → Reverse Proxy. Assign the certificate to the hostname, enable WebSocket, and follow n8n’s official reverse proxy configuration.
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 unprivileged user, node, has read and write access only to the dedicated folder you mounted. The official n8n image finishes its startup as that user, not as root.
If you get
permission denied, check that the volume is set to read/write in Container Manager and that the File Station permissions match. Fix only thedocker/n8nsubfolder: don’t grant broad permissions on the whole shared folder, don’t usechmod 777, and don’t switch the container to root or privileged mode.
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:
"http"for the internal hop between the proxy and the container. Public HTTPS terminates at DSM’s reverse proxy. - N8N_WEBHOOK_URL: the full public HTTPS URL n8n will use to register webhooks (for example,
https://n8n.yourdomain.synology.me/). It replacesWEBHOOK_URL, deprecated since n8n 2.35.0. - N8N_PROXY_HOPS: set it to
1when DSM is the only proxy in front of n8n, so it trusts a single layer of forwarded headers. - 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 settings (recommended)
- Authentication: don’t add the old basic auth variables (
N8N_BASIC_AUTH_*). n8n removed basic auth in version 1.0, so they no longer protect anything. On first start n8n shows the owner account sign-up; after that, each person should use their own account. - 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. - 2FA: after your first login, go to Settings → Personal → Enable 2FA, scan the QR code with an authenticator app, and store the recovery codes somewhere other than the NAS. n8n’s official 2FA guide walks through the flow. If you manage several users on a version that supports a global policy, you can enforce it with
N8N_SECURITY_POLICY_MANAGED_BY_ENV=trueandN8N_MFA_ENFORCED_ENABLED=true.

(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: if you need public webhooks, set up the Reverse Proxy under Control Panel → Login Portal → Advanced to map your domain (for example,
https://n8n.yourdomain.synology.me) tohttp://localhost:5678. Enable WebSocket and expose only port 443 on your router.
9. n8n initialization
The first time you open it, n8n shows the owner account sign-up. Create a unique password and turn on 2FA under Settings → Personal. The old N8N_BASIC_AUTH_* settings don’t protect modern n8n versions; if your container still has them from an older guide, remove them.

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, check two layers: that Container Manager mounts the folder read/write, and that File Station allows writing to that dedicated subfolder. Keep the scope to docker/n8n, not the whole shared folder. The official image runs n8n as the node user; don’t use root, privileged mode, or 777 permissions as a shortcut.
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, write down the version you’re running and secure your data. According to n8n’s official backup and restore documentation, a full backup includes the persistent .n8n folder (SQLite database, configuration and encryption key) plus any external storage you use. If you’re on SQLite, stop the container before copying the folder so you don’t end up with an inconsistent database.
- Open File Station on your Synology.
- Navigate to the folder where you keep your n8n data (e.g.
docker/n8n). - With the container stopped, copy the
n8nfolder to a backup location or include it in a versioned Hyper Backup task. Also export the container settings from Container Manager.- 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, pick a specific stable version up front. Read the release notes and avoid jumping several major versions at once; n8n recommends updating often and testing first when you can.

- 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, type the specific stable version you reviewed, for example
2.44.4as of this guide. Keep the number of the previous version too, for the rollback.- Note: if the system warns 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 re-creates the container from the selected image, and your data should survive because it lives outside the container, on the persistent volume. Before you confirm, check that the ports, the volume and variables such as
N8N_WEBHOOK_URLandN8N_PROXY_HOPSare still there.
- What does this do? It re-creates the container from the selected image, and your data should survive because it lives outside the container, on the persistent volume. Before you confirm, check that the ports, the volume and variables such as
- Once the reset is done, select the container and hit Start.

Step 4: Verification, rollback 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.
- Test before cleaning up: open a workflow, run a non-destructive one, and check credentials, webhooks and logs. Don’t delete the previous image until this check is done.
- Rollback: if the new version fails, stop the container, restore the consistent copy of
.n8n, and re-create the container with the exact previous tag. Going back to the old image alone, after a new version has already migrated the database, is not a full rollback. - Clean up old images (optional):
- Go to the Images tab. If you see n8n images tagged “None” or “<none>”, those are 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, forwarded-header or URL issue. Check that DSM forwards X-Forwarded-For, X-Forwarded-Host and X-Forwarded-Proto, that N8N_WEBHOOK_URL points to the public HTTPS URL, and that N8N_PROXY_HOPS=1 when there’s only one proxy.
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 from outside, and if you have N8N_SECURE_COOKIE=true, you need an encrypted connection.
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 download the official n8nio/n8n image with a pinned version, mount a persistent folder to /home/node/.n8n, keep port 5678 inside your network 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?
Write down your current version, stop the container and copy the data folder. Download the specific stable version you reviewed, then use Container Manager’s Reset option and start the container again. If something breaks, restore the copy and re-create the container with the previous tag.
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 re-created. Map the volume, or set N8N_USER_FOLDER to a path you do mount.
Should I open port 5678 on my router to use n8n from outside?
No. Keep 5678 limited to the NAS and your local network. To reach n8n from outside, use a VPN; if you need public webhooks, publish only HTTPS on port 443 through DSM’s reverse proxy with a valid certificate.
Do I need HTTPS to run n8n on my NAS?
Not for access from your own LAN or over a VPN, where plain HTTP on port 5678 stays inside your network. You need HTTPS for any access from the internet, including public webhooks, and whenever N8N_SECURE_COOKIE is true. Set it up with DSM’s reverse proxy, a Let’s Encrypt certificate and WebSocket enabled.
How do I protect the n8n login now that basic auth is gone?
n8n removed basic auth in version 1.0. On first start you create the owner account; use a unique password, turn on two-factor authentication under Settings > Personal and keep the recovery codes off the NAS.
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.
Continue reading about SEO & AI

LLM SEO: A Guide to LLMO With Real Tests in ChatGPT, Claude and Perplexity

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: Real Use Cases and How to Implement Them

How to use AI for SEO: the practical guide

