Problems with configuration of npm installation of n8n

Hello everyone,

i have installed n8n via npm.
We also actively use this for our internal helpdesk.
So far we are really very satisfied!

However, I am currently encountering the first hurdles regarding the configuration.

I would like to authenticate myself with Dropbox using OAuth2, but the callback URL only shows the localhost.

According to the documentation I only have to change the configuration under /root/.n8n/config.
However, the set values are not applied here.

The current configuration looks like this:
“encryptionKey”: “xxxxx”,
“endpoints”: {
“webhook”: {
“format”: “String”,
“default”: “”,
“doc”: “URL for Webhook”
“host”: {
“format”: “String”,
“default”: “”,
“arg”: “host”,
“env”: “N8N_HOST”,
“doc”: “Host name n8n can be reached”

Hence my question.
Does anyone know how I can apply these settings?
At the moment these configurations seem to have no effect.

Many thanks in advance!!

Hey @razertechDE!

Welcome to the community :slightly_smiling_face:

Can you please share the link to the documentation that you are following? I am trying to replicate your issue and want to make sure I do it correctly. This will help me give you an accurate solution.

Hey @harshil1712,

thank you for your reply!
I’ve tried following this configuration:

Many thanks in advance!

Hey @razertechDE!

Did you run the command export N8N_CONFIG_FILES=PATH-TO-CONFIGURATION-FILE?

I followed the steps mentioned in the documentation, created a config.json file, and ran the above command, replacing PATH-TO-CONFIGURATION-FILE with the actual file path. These steps worked for me.

Let me know if this helps.

Hey @harshil1712,

thank you very much for your fast reply & help!

No, I’ve didn’t run the command.
Some time before I tried to make some adjustments via the export variables.
However, this never had any effect on the n8n.

To test if the json file is generally used, I put a bug in it & then entered the “n8n” command in the CLI.
n8n then reported that the /root/.n8n/config file is not a real JSON file.
From this I concluded that the file is loaded.

I will try it right now with the export variable you mentioned & then I will give you a feedback!

Many thanks!!

Hey @harshil1712,

so I’ve ran the following command:
export N8N_CONFIG_FILES=/home/n8n_config.json
(copied the file before to the mentioned path)

And restartet n8n by running pm2 restart n8n

But there has still nothing changed…

Any ideas?

Many thanks in advance!

Hey @razertechDE,

I don’t have a lot of experience with pm2 and my knowledge is very limited here. I will try to use pm2 and recreate the issue. I came across this documentation for pm2 that might help.

Hey @harshil1712,

got it!
So one point is pm2.
It seems, that it’s not loading the provided config under /home/n8n_config.json

The other point is, that when running n8n manually by using “n8n”-Command, I found out, that the config is invalid.

It should look like this:
“endpoints”: {
“webhook”: “h t t p s://”
“host”: “
(instead of my previously posted version.)
((h t t p s, because I am not allowed, to post more than two links…)

So I think, that maybe the documentation needs to be tuned here.
I’ve followed the instructions and opened up this link:

"All possible values which can be set and their defaults can be found here:"

Because there were no further instructions, I thought, that I need to copy the exact structure into my config file.
The working result really differes from these values. (github)

Many many thanks for your help!

@razertechDE I am assuming that you found the solution.

I can understand where the documentation can get confusing. I have added it to my To-Do list and will update the docs.

Thank you for the feedback :slightly_smiling_face:

1 Like