N8n docker setup on synology ds920+

I have a synology ds920+, and the docker package let me set up n8n with a few clicks. None of the cmd stuff at all.

It runs even. But I have a few issues:

  1. I set up the local & cont port to 5678, and set up my router port forwarding. I can’t access n8n via my ddns name (I can access dsm fine)

The error is “Rejected request from RFC1918 IP to public server address”
My router is Deco M5. I’m not sure the issue.

  1. should I be mapping a folder to the nas? I thought I was supposed to have a config file. But I don’t know what path to map to inside the docker

  2. I tried adding gmail. I made an oauth following your help. But you said to put OAuth Redirect URL = http://localhost:5678/rest/oauth2-credential/callback

Obs this doesn’t work, because it tries to go http://localhost at the end then fails.

Hi @bally, welcome to the community!

  1. I set up the local & cont port to 5678, and set up my router port forwarding. I can’t access n8n via my ddns name (I can access dsm fine)
    The error is “Rejected request from RFC1918 IP to public server address”

The error Rejected request from RFC1918 IP to public server address wouldn’t be an error thrown by n8n, so I suspect this might require some configuration in your router which I am not familiar with unfortunately.

  1. should I be mapping a folder to the nas? I thought I was supposed to have a config file. But I don’t know what path to map to inside the docker

This depends on what you want to do with n8n. For many use cases n8n doesn’t need access to the local file system. But if you want to work with files on your NAS you would need to mount the respective path inside your n8n docker container. Not sure how exactly Synology manages docker containers, but for a docker compose setup this would involve simply adding a line to the volumes section like so:

    volumes:
      - /local/folder:/container/folder

In this example the /local/folder would become available inside the container as /container/folder.

  1. I tried adding gmail. I made an oauth following your help. But you said to put OAuth Redirect URL = http://localhost:5678/rest/oauth2-credential/callback

If your n8n instance isn’t available at localhost you would need to set the WEBHOOK_URL environment variable to your public hostname.

Hope this helps!

1 Like

Rejected request from RFC1918 IP to public server address - I feel this is perhaps a security error with the cert. Is there a setting that tells n8n to use or not use ssl?

I also get a

This site can’t be reached

myds.me** unexpectedly closed the connection.
which feels like it’s a docker setting thing.

I added WEBHOOK_URL environment variable, which works! Thanks

Now the final page is myds.me/rest/oauth2-credential/callback, which bring the same RFC1918 etc errors as before.

or

This site can’t provide a secure connection

myds.me** sent an invalid response.

Rejected request from RFC1918 IP to public server address - I feel this is perhaps a security error with the cert. Is there a setting that tells n8n to use or not use ssl?

I doubt it, as the usual component complaining about certificate problems would be the browser - this does, however, sound like a server-side problem. Might be worth checking which component exactly is sending this error (the NAS or your router) and then checking with their support teams or communites.

This site can’t provide a secure connection
myds.me** sent an invalid response.

So “This site can’t provide a secure connection” suggests that your browser is trying to open an SSL connection but n8n isn’t using SSL by default. In most deployments you’d have a reverse proxy in front of n8n (or other services) taking care of SSL termination, but it seems your router or NAS don’t handle that.

You can either:

  • Set up a reverse proxy yourself
  • Configure SSL in your router/NAS
  • Have n8n available on the internet without any encryption (but I would strongly suggest you don’t do this)
  • Have n8n serve an SSL certificate for your domain. To do so, you’d need to have the N8N_SSL_KEY and N8N_SSL_CERT environment variables point to the certificate and the private key for your certificate (both would need to be available in your n8n docker container)

It might also be worth waiting a bit longer to see if someone else with a Synology NAS (and perhaps even your specific router) might have had similar problems and can share some first hand experience here. I have neither unfortunately, so don’t know any specifics of your system.

Edit: If you don’t care where exactly n8n runs, you could alternatively consider hosting it externally which might make things easier (unless you want to work with local files). I wrote a tutorial on how to set up n8n on Oracle Cloud a while back (the offer a rather generous free tier) and here is the official documentation for deploying n8n on Digital Ocean if you prefer them. We’re also working on tutorials for other popular cloud providers.

Sorry for delay. I finally got it set up as docker in DS920+
I put in reverse proxy, so I could go https mydomain.com and get the interface

I saw it said I’m on old ver.
So I went DL the new docker image from latest
duplicate the docker in DS920+ to copy settings
start.

This is the instructions I saw for updating.

But now it’s actually dead.
I get

http://192.168.1.153:5678/
192.168.1.153 refused to connect.

What does this mean?

Hey @bally,

That tends to mean either the connection is being blocked on the network or the service is not actually running. I would maybe start by making sure the container has started, If you have copied the container the old one might still be running.

Normally for a container update it would be a case of pulling the latest image then restarting the container and it would pick up the image if you are using the :latest tag.