Noob: Completely Lost

Hello, I’v got the task to setup a n8n environment from a colleague. I don’t know really for what this is, what I really could do with it, but i understand that it is something like a website, which can do … something magic 8)

What is it making not easier for me, is that, my normal playground is windows, but I should set it up on linux. Which is okey, but the concepts there and terms there are a bit different and so its harder for me to interpret the meaning.

Then, there are 2 approaches to set up the thing. One per NPM and one to do it via docker. Docker is something like a container solution, which seems from outside, to be the easier approach. But …

  1. What do your mean: Am i right to do it with docker, is it the easier, better … way to set up the things, or could there also be disadvantages.

  2. At the moment I’m stuck. I’ve installed docker how its shown in the docs… make that n8n image … last Week i got the site running (a browser was able to show me the webpage). But, one week the server was off, turned on again and i thinked … what to type in to start it again?!

    docker compose up -d (i think this is the command to start it up?) but says. No configuration file provided: not found … hmmmmmm

  3. How can i setup to use https instead of http. Is in the docker image a nginx (as revproxy) or something equivalent incuded? Or must NGINX installed seperately? As NPM or is there also a Docker image? Certs are not the problem.

It seems that it’s not runing, when checking for open ports with SS:
ss -tln
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 128 [::]:22 [::]:*

There is no open Port 5678

Sorry, if my questions are too dumb?! Maybe is there something who can bring me on the other roadside 8)

Thx

Hey @wos welcome to the community and No your questions are not dumb

Let’s break it down @wos

What is n8n?
n8n is like a visual workflow automator. You connect different apps and services (like Gmail, Slack, or Google Sheets) using drag and drop blocks, called nodes, to create automated workflows. It’s pretty simple

Docker vs. NPM
You’re wondering whether to use Docker or NPM to run n8n. Docker is definitely the easier way to go, especially on Linux. With Docker, you can set up n8n with just one command, and it takes care of everything for you. Plus, it’s self contained, so you don’t have to worry about conflicts with other software.

Your Docker Problem
You’re getting an error that says “No configuration file provided: not found”. That’s because Docker is looking for a docker-compose.yml file, but it can’t find it. To fix this, just navigate to the folder where you saved the file and run docker compose up -d. If you don’t have the file, I can help you create a basic one.

Adding HTTPS with NGINX
You’re right that Docker alone doesn’t handle HTTPS. To add HTTPS, you’ll need to use NGINX as a reverse proxy. We can do this using Docker Compose, which makes it pretty easy. I’ll walk you through the steps.

Why Port 5678 Isn’t Showing
If you’re using NGINX in Docker, n8n’s port (5678) is only exposed internally between Docker containers. Only NGINX’s ports (80 and 443) are exposed to the outside world. Don’t worry, this is normal

Next Steps
Let’s get n8n running with a basic docker-compose.yml file. Once that’s up and running, we can add NGINX for HTTPS.

:handshake:

Or is the Problem that I’ve no .env file? But not shure in which location i should do it. The manual says: “Create a project directory to store your n8n environment configuration and Docker Compose files and navigate inside”.

Should this Project Directory be located in a special place? Or i’m getting lost with the .env file and it has nothing to do with it?!

Or was there not something with a yaml file? But on my whole hd, there is no compose.yaml file ….

Hi wos, how are you doing?

n8n itself is just a Node.js application – the official container exposes it on port 5678 over HTTP. Everything else (persistence, automatic restarts, HTTPS) is up to you.

1 / Docker vs. npm
The n8n docs recommend Docker for self‑hosting because it bundles all dependencies in a single image and avoids “dependency hell.” You run a single docker run command with some environment variables and a named volume and you have a working instance. With an npm installation you need to manage Node.js versions, process managers (PM2), file permissions, database drivers, etc., yourself. There aren’t really any feature disadvantages to the Docker image – it’s the same application – but you do need to be comfortable with container concepts (images, volumes and ports).

2 / Starting and restarting your container
If you used the one‑line docker run command from the docs, it creates a container called n8n and binds port 5678 on the host. To persist your data you should mount a volume (-v n8n_data:/home/node/.n8n). To make the container come back automatically after a reboot, add --restart unless-stopped. Then the full command looks like this (replace <YOUR_TIMEZONE> appropriately):

docker volume create n8n_data
docker run -d
–name n8n
–restart unless-stopped
-p 5678:5678
-e GENERIC_TIMEZONE=“<YOUR_TIMEZONE>”
-v n8n_data:/home/node/.n8n
n8nio/n8n:latest

When the machine reboots you don’t run docker compose up -d (there is no docker-compose.yml unless you created one); instead you can simply use docker start n8n. If you prefer docker‑compose, create a docker-compose.yml with the same configuration and then docker compose up -d will work.

3 / HTTPS and reverse proxies
The n8n container does not include a web server such as Nginx. There are two ways to get HTTPS:

  • Terminate TLS in n8n itself – n8n can serve HTTPS if you provide a certificate and key. The configuration is done via environment variables: set N8N_PROTOCOL=https, N8N_SSL_KEY to the path of your private key and N8N_SSL_CERT to the full certificate chain. An example from a deployment guide shows creating a directory for certs, placing the key and certificate there, then running n8n on port 443 with those variables. Mapping 443 on the host to 5678 in the container allows you to reach it over HTTPS.

  • Use a reverse proxy (recommended) – put Nginx, Traefik, Caddy or a cloud load balancer in front of the container. The proxy listens on 443, handles TLS termination and forwards traffic to http://<container-ip>:5678. When n8n is behind a proxy it still generates webhook URLs based on its internal settings. To ensure webhooks and OAuth callbacks use the correct public URL, set WEBHOOK_URL to your public HTTPS URL and N8N_PROXY_HOPS=1. The docs explain that n8n runs internally on port 5678 while the reverse proxy exposes it on 443, so setting WEBHOOK_URL and N8N_PROXY_HOPS ensures the correct webhook URLs are displayed in the Editor UI and registered with external servicesdocs.n8n.io.

If you’re new to Linux and Docker, the reverse‑proxy route is often simpler: tools like Traefik and Caddy can automatically fetch LetsEncrypt certificates and renew them. In both cases, the certificates themselves aren’t included – you either provide them via volumes or let your proxy obtain them.

In summary, running n8n in Docker with a named volume and the --restart flag will give you an easy‑to‑manage installation. A reverse proxy is recommended for TLS/SSL; n8n doesn’t include one by default, so you either configure your own Nginx/Traefik or enable HTTPS in n8n using the N8N_PROTOCOL, N8N_SSL_KEY and N8N_SSL_CERT variables.

First: Thx to you Zellte!

Ok, to use it with a docker container should be the right decision!

What I’m not understanding. Now, i got no more “No configuration file …”, now i got

root@linux:~# docker-compose up -d
-bash: docker-compose: Kommando nicht gefunden.
root@linux:~#

“Kommando nicht gefunden” means “Command not found”.

(Yes I know, dont work as root … but i dont like to have security related problems when I’m not able to walk straight on. After all, when in works, I’ll build that up 10 times again, from scratch, and maybe then also without root)

How could it be, minutes ago it could be found?!

I try to find those docker-compoese file ….

root@linux:~# find / -iname docker-compose
/usr/libexec/docker/cli-plugins/docker-compose
root@linux:~#

… and changed location in that dir, but this docker-compose is not a normal file - no text inside (seems to be an EXE or how the term in linux is to describe an executable).

root@linux:/usr/libexec/docker/cli-plugins# ls -l
insgesamt 150740
-rwxr-xr-x 1 root root 77793388 25. Jul 13:34 docker-buildx
-rwxr-xr-x 1 root root 76559029 25. Jul 13:34 docker-compose
root@linux:/usr/libexec/docker/cli-plugins#

Ahhh Ok, that would make sense, that the NGINX Thing would be included within the n8n Image. Wondering why this is not normally already?! I think everybody would need this? Ok, there might be some reasons …

Then I’ve searched for a compose.yaml file which is also , which I can’t (unfortunaly?) find:

root@linux:/usr/libexec/docker/cli-plugins# find / -iname compose.yaml
root@linux:/usr/libexec/docker/cli-plugins#

How the heck, did i run this last week. Dont know.

Thx to you, AlvLeoAI :grinning_face:

Ok i think you answered some of my questions which i had in my previous post. Thanx for that, I’m a bit neerer, what I’m doing wrong.

Cool to hear that i could give n8n the certs directly (and so need no nginx at all). But, i understand, using NGINX as a revproxy is the recommended approach!

Thanx for all those hints, given to me!

@wos It seems like your system has updated Docker, and now you’re using the built-in docker compose plugin instead of the standalone docker-compose binary.

What you do
Instead of using docker-compose up -d, try using docker compose up -d note the space instead of the hyphen. This should work

Your system updated Docker, and it switched from the standalone docker-compose to the built in plugin version. The plugin is there, but it’s meant to be called differently.

Now create an Alias
If you prefer the old way, you can create an alias: echo 'alias docker-compose="docker compose"' >> ~/.bashrc and then source ~/.bashrc. This way, both commands will work.

Let’s create a new project folder, create a docker-compose.yml file, and get n8n up and running. I’ll walk you through the steps.

  1. Create a new folder: mkdir ~/n8n-setup and cd ~/n8n-setup

  2. Create a docker-compose.yml file: nano docker-compose.yml

  3. Paste the basic version of the file:
    version: ‘3.8’
    services:
    n8n:
    image: n8nio/n8n
    ports:

    • “5678:5678”
      environment:
    • N8N_HOST=localhost
      volumes:
    • n8n_data:/home/node/.n8n
      volumes:
      n8n_data:
  4. Start it up: docker compose up -d

Run docker ps to see if the n8n container is up, and curl http://localhost:5678 to check if the login page is showing.

Once this is working, we can add NGINX for HTTPS.

Kindly mark as solution if you found this helpful to help others

@wos It seems like your system has updated Docker, and now you’re using the built-in docker compose plugin instead of the standalone docker-compose binary.

You’re absolutely right. There are many websites writing it always with the hyphen inbetween. But these commands not working by me:

root@linux:~# docker-compose up -d
-bash: docker-compose: Kommando nicht gefunden.
root@linux:~#
root@linux:~# docker compose up -d
no configuration file provided: not found

Confusing for me, why the command is sometimes so and somteimes so. Without the hyphen, command works (ok its saying config file is missing - but command itself works!)

Im unshure when/where bent off wrong. I’ll give it another try and will begin from scratch again, tomorrow. And write down every command it typed in. Aiming to set it up as an docker-compose solution with an yaml config file … i hope so … and I’ll report back here, for shure!

Alright g good luck

Hi, back again :grin:

As suggested, I set up a brand new ubuntu from scratch, followed the steps to install docker engine (including docker-compose). Then at the Step “Starting n8n#” of the manual, i was a little bit inattendive and CopyPast the command as its there:

docker volume create n8n_data

docker run -it --rm \
–name n8n \
-p 5678:5678 \
-e GENERIC_TIMEZONE=“<YOUR_TIMEZONE>” \
-e TZ=“<YOUR_TIMEZONE>” \
-e N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true \
-e N8N_RUNNERS_ENABLED=true \
-v n8n_data:/home/node/.n8n \ docker.n8n.io/n8nio/n8n

I forgot the YOURTIMEZONE Setting.

But it seems to work, or something … the volume was created (what is a “volume”, a file or what, and where is it located?)
Now i can access the website with a browser (showing me, that it will not work because no ssl).

I want to make a reboot and look if its again running … first, I’ve closed the ssh session.
Its Over! The service is not running anymore … ok, rebooting …

After reboot also not running. Ok.

Do i need to repeat all the commands? Also the “docker volume create n8n_data”? Or is it still there?

I guessed only to perform “docker run -it …” … because I’ve read something that the image is persistant. … And it worked. Website running again.

But, if i close SSH, its over. What is to do that this is running forerver, all the time, as a service or deamon, or how the proper term in linux is?

Is this command only, to try things? To look if they are basically working? At this point I’m, and a bit confused I’m afraid. Or comes at this point docker-compose in play? To act the container like a service? Puhhh …

As long running the image docker ps shows it, after ending it …

root@linux:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b7d345607492 docker.n8n.io/n8nio/n8n “tini – /docker-ent…” 13 seconds ago Up 12 seconds 0.0.0.0:5678->5678/tcp, [::]:5678->5678/tcp n8n
root@linux:~#
root@linux:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
root@linux:~#

… nothing is shown there. Ok, i guess it’s normal.
But is there not be a list of installed containers, or something … which is showing me … hey, there is a in past created volume. Or something that shows me things because of the past actions?!

root@linux:~# docker compose ps
no configuration file provided: not found
root@linux:~#

I think, this is also normal, that there is nothing yet?!

Gm @wos Don’t worry about what’s happening with your Docker container it’s totally normal. You’re just hitting a common learning moment :joy:

When you run docker run, it starts a temporary container that stops when you close your SSH connection. To keep it running in the background, you need to use docker run -d.

Volumes are like external hard drives for your container. They store your data even when the container is off. You’ve already created a volume called n8n_data, and it’s still there you can check by running docker volume ls.

You have two options to run n8n permanently:

  1. Use docker run -d with the -d flag to run in detached mode.
  2. Use Docker Compose to create a docker-compose.yml file that defines your service. This way you can easily manage your container and add more services later.

Here’s an example docker-compose.yml file for you:

version: '3.8'
services:
  n8n:
    image: docker.n8n.io/n8nio/n8n
    ports:
      - "5678:5678"
    environment:
      - TZ=Europe/Berlin
    volumes:
      - n8n_data:/home/node/.n8n
    restart: unless-stopped
volumes:
  n8n_data:

Then, run docker compose up -d to start your service.

What to do next:

  1. Stop the current container (if it’s still running).
  2. Create a docker-compose.yml file.
  3. Run docker compose up -d to start your service.
  4. Verify that it’s running with docker ps.

Once you’ve got this working we can add NGINX to the same docker-compose.yml file for HTTPS. But first let’s get n8n running

I’ve created the docker-compose.yml file in roots home. Or should i try in different location?!

Great, this works as described! Also after rebooting … what is confusing me, is that i want to take a look to the volume, which is (as by docker-compose.yml) located in /home/node … i thought :blush:

root@linux:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7cba99a98d85 docker.n8n.io/n8nio/n8n “tini – /docker-ent…” 6 minutes ago Up 5 minutes 0.0.0.0:5678->5678/tcp, [::]:5678->5678/tcp root-n8n-1
root@linux:~#
root@linux:~# ls -l /home/node
ls: Zugriff auf ‘/home/node’ nicht möglich: Datei oder Verzeichnis nicht gefunden
root@linux:~#
root@linux:~# ls -l /home
insgesamt 4
drwx------ 13 user user 4096 27. Aug 08:47 user
root@linux:~#

But the file is not there. Hmmm. But … ok … i don’t have to understand every concept from the beginning … it’s up an running, yipee!

The next task, as i understand, is to modify the yml file, so that nginx (or a containter of enginge x?) is included and will be started also, right? Is it in an extra container (and both talking again) or in the same?

@wos kindly mark as the solution if it worked

Happy for you bud :call_me_hand:

@wos can you create a new topic, let’s continue from there.

Ok, yes thats better …:+1: