Download file to server

Hello guys.
i want to download files from direct links to server.
now i use this, but it has a problem :when writing it says permission denied.
rss >>> http get >>> write binary file

i am using n8n on linux server ( ubuntu 20 ) and run with docker.
what is the path to use with docker run ( or docker compose ) so i can save file outside docker.

docker run -d -v /root/hello:??? -v ~/.n8n:/home/node/.n8n -p 5678:5678–restart always n8nio/n8n

what sould i replace with ???

  • n8n version: latest
  • Database you’re using (default: SQLite): default
  • Running n8n with the execution process [own(default), main]: default
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker

thanks.

It says permission denied because you need to define the correct base path. Assuming that you mounted the volume like this -v ~/.n8n:/home/node/.n8n in the Write Binary Data node, the file name should be /home/node/.n8n/filename.extension. Then you should be able to find the file in ~/.n8n.

2 Likes

If possible please use however a different folder.

Nothing should ever write in the .n8n folder. Instead use literally any other folder as for example mentioned in the Server Setup Guide.

For example:

- /home/<YOUR USERNAME>/n8n-local-files:/files

You can then write to the folder /files

4 Likes

thanks guys.
Solved

1 Like