I am using n8n via docker and would like to move env vars to file (if possible). I found some topics but most of useful docs links expired/has been moved.
I made file /home/simon/.n8n/conf.json with following content:
{
"WORKFLOWS_DEFAULT_NAME": "sadasdasd"
}
Just to see if it’s working
stopped and removed container
docker stop n8n && docker rm n8n
Run docker via this command (password I removed here)
It says that the file does not exist and looking at what you wrote, does it make sense as you seem to create a file named /home/simon/.n8n/conf/json and then tell it to use one with a different name/path /home/simon/.n8n/conf.json. To be clear conf/json vs. conf.json
Additionally does that file not set environment variables, it directly sets the keys. So it would not use the environment variables, it would use its actual name. In your example:
Also, not all of them are in Jan’s a link e.g. VUE_APP_URL_BASE_API aren’t there, I found this one here: Environment Variables | Docs but I am not sure how to
match this to JSON file (conf.json)
I have not played with the config too much but with the first part do you see an error?
It doesn’t look like the Vue app url is available as a config file option at the moment.
Password hashes are done using bcrypt so if you wanted a pass of CorrectHorseBatteryStaple the hashed result would be $2a$10$/7atEI9BUkYmRAANURJksu2C.f85IO/ITeTKcliTmUjqrKwHeOHNm
I am just surprised that nothing should be changed, mean same variable are set just in different place (correct me if I am wrong) and before docker output was
...
Editor is now accessible via:
https://n8n.hryszko.dev/
About password:
I cannot reproduce this: CyberChef
I checked via bcrypt parser that you use 10 rounds. It says, also sth about salt, so maybe I should to add this to somehow? Sorry if it’s basic question, it’s new for me
Btw. can you not simply use the docker-compose setup from the Server Setup Guide? Because that makes it very simple and everything will then work correctly.
I change it to docker_compose, and it works just fine
Could you please advise about hashing? I should put bcrypt hash in env var instead of password, right?
I used CyberChef to generate hash (10 rounds) but it did, not working ;/