Running n8n on docker on Synology NAS, issues with authentication of Dropbox and LinkedIn

Hi there,

I am new to n8n so please be aware of my newbie status. I installed docker on my Synology NAS to experiment with n8n. I successfully ran the container and added security to the container using environment variables.

The Synology ds220+ Nas is running on my routers DMZ so it can be seen outside my network. As a result n8n is accessible to the world using this address

Http://N8n.myds.me:5678

I am having trouble though with using Dropbox and LinkedIn apps. After setting up Dropbox with an app and API key I cannot get the authentication to validate and am getting an error “Dropbox credentials are not valid”

I have confirmed them twice and the API key is correct.

I tried adding a LinkedIn app and I get the same error except here the authentication opens up a window that attempts to call the callback URL and my setup is using localhost:5678 for the oAuth url. Is there a way to reconfigure that in n8n?

Sorry to hear that you have problems! Yes, that is possible. This information and everything else you will find in the docs: https://docs.n8n.io

The specific setting you are talking about would be WEBHOOK_TUNNEL_URL:

This setting will however only be important for Webhooks and all third-party Trigger-Nodes. But even after setting the variable to the correct value, would the most of them still not work. The reason for that is, that they only do with SSL (so they expect an https URL) and port 443 (not 5678, as 443 is the default https port they expect no port to be set).

So to make that work via SSL it would be best to follow the Server Setup Guide here:

Anyway, the Dropbox issue you have does seem unrelated to all of the above. If you want to use the regular Dropbox node and authenticate via “Access Token” it would not care about any of that. So I am having a hard time thinking about what the problem could be here. The most obvious one, and really the only I can think of, that the authentication data is incorrect, you already ruled out.
This error message only appears if Dropbox returns with 401. Meaning n8n can apparently reach the Dropbox-Server. So unless something between n8n and Dropbox returns a 401 I have sadly no idea what could go wrong here.

Interesting. I tried a very simple open weather module and got this error with a valid api key. So I will try what you suggest and see if I can get the server running under port 443. Maybe that’s as easy as changing the remote port on the docker install and changing it to 443. I will have a look at the docs on server setup too. I would really like to write up a getting started guide for setting up n8n for testing with Synology. I think some people would prefer to use a resource like this rather than buying a droplet.

ERROR: 401 - {“cod”:401,“message”:“Invalid API key. Please see Frequently Asked Questions - OpenWeatherMap for more info.”}

StatusCodeError: 401 - {"cod":401,"message":"Invalid API key. Please see http://openweathermap.org/faq#error401 for more info."}
    at new StatusCodeError (/usr/local/lib/node_modules/n8n/node_modules/request-promise-core/lib/errors.js:32:15)
    at Request.plumbing.callback (/usr/local/lib/node_modules/n8n/node_modules/request-promise-core/lib/plumbing.js:104:33)
    at Request.RP$callback [as _callback] (/usr/local/lib/node_modules/n8n/node_modules/request-promise-core/lib/plumbing.js:46:31)
    at Request.self.callback (/usr/local/lib/node_modules/n8n/node_modules/request/request.js:185:22)
    at Request.emit (events.js:310:20)
    at Request.<anonymous> (/usr/local/lib/node_modules/n8n/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:310:20)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/n8n/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:416:28)

Hello :slight_smile: I have the same problem with Trello impossible to use it. @asirota, did you solve the problem with Synology Docker ? Did you write the guide for using n8n with Synology Docker ? Thank you for your help :slight_smile:

No unfortunately I ran out of time trying to debug it. It’s most likely better to run this on a proper docker install like at digital ocean or on the future hosted environment.

Hello!

I’ve got problems installing N8N on my Synology NAS with the docker-compose.yml. Can anybody provide me a working docker-compose.yml? I’ve installed the file, but the docker is restarting all the time. Here is my file:

version: ‘3.1’

services:

postgres:
image: postgres:11
restart: always
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
- POSTGRES_NON_ROOT_USER
- POSTGRES_NON_ROOT_PASSWORD
volumes:
- ./init-data.sh:/docker-entrypoint-initdb.d/init-data.sh

n8n:
image: n8nio/n8n
restart: always
environment:
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
- DB_POSTGRESDB_USER=${POSTGRES_NON_ROOT_USER}
- DB_POSTGRESDB_PASSWORD=${POSTGRES_NON_ROOT_PASSWORD}
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER
- N8N_BASIC_AUTH_PASSWORD
ports:
- 5678:5678
links:
- postgres
volumes:
- /volume1/docker/n8n:/home/node/.n8n
# Wait 5 seconds to start n8n to make sure that PostgreSQL is ready
# when n8n tries to connect to it
command: /bin/sh -c “sleep 5; n8n start”