Hey! Today I bring you a tutorial that I know you are going to like. We are going to set up n8n on a server totally free, without paying a penny for subscriptions. Yes, you read that right: FREE! If you are interested in automating processes and connecting applications without needing to know how to program, stay because this is going to change your life (or at least save you time and money).
The youtube video where I talk about this topic:
What is n8n and why should you pay attention to it?
Let’s get to the point: n8n is an open source workflow automation platform. In plain English: you can connect applications and services to perform automatic tasks without having to touch a line of code (although if you know some JavaScript, you can flip out even more).
Why is it so cool?
- Open source: It is free and you can modify it to your liking, without absurd limitations.
- Flexibility at another level: If you control some JavaScript, you can customize the flows however you want.
- Visual interface: You assemble everything by dragging and dropping nodes, as if you were playing with Lego.
Practical examples (or how it can make your life easier)
- Automatically post on social networks when you upload a video to YouTube.
- Automate administrative tasks, such as sending invoices or reminders.
- Connect your favorite tools and make them work as a team without lifting a finger.
What differentiates it from others like Zapier or Integromat?
- No strict limits: Forget about flow or execution limits, here you are in charge.
- Self-hosted: You install it on your own server, so you have control of your data (and you don’t depend on third parties).
Installing n8n FREE (yes, FREE) on an Oracle Server
Okay, let’s get to it. The first thing we need is a server, and before you say “but that costs money”, I warn you: NO! You can get a free server from Oracle. In fact, I already made a tutorial about this, check it out if you haven’t seen it yet.
Step 1: Connect to the server via SSH
The first thing is to connect to the server via SSH. How? Very easy:
ssh -i name_of_your_private_key user@server_ip
Note: The private key is the one you saved when creating the instance in Oracle. If it gives you problems, make sure to give it the correct permissions with:
chmod 600 name_of_your_private_key
Or if you are on Windows
icacls "C:\path\to\your\private_key.pem" /inheritance:r
icacls "C:\path\to\your\private_key.pem" /grant:r "%USERNAME%:R"
Step 2: Configure the server and open ports
First of all, you have to open ports 80 and 443 in Oracle so that our server is accessible via HTTP and HTTPS. If you don’t know how to do it, in the Oracle tutorial I explain step by step how to configure this.
Step 3: Update the operating system
Once connected to the server, we update the operating system:
sudo apt update && sudo apt upgrade -y
Step 4: Install Docker
We are going to use Docker to mount n8n. We install Docker with the following commands:
sudo apt install ca-certificates curl gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin
Step 5: Install Caddy (Reverse Proxy)
We will use Caddy as a reverse proxy so that our Docker container is accessible from the outside. This is what you have to do:
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
Step 6: Configure Docker Compose for n8n
We create the n8n folder and the docker-compose.yml file:
mkdir n8n
cd n8n
nano docker-compose.yml
We add the following content:
version: '2'
services:
n8n:
image: n8nio/n8n:latest
restart: unless-stopped
ports:
- 5678:5678
environment:
- GENERIC_TIMEZONE=Europe/Berlin
- WEBHOOK_URL=https://your-domain/
volumes:
- ./n8n_data:/home/node/.n8n
We create the folder for persistent data and give it permissions:
mkdir n8n_data
sudo chown -R 1000:1000 ./n8n_data
sudo chmod -R 755 ./n8n_data
We start the container:
sudo docker compose up -d
remove iptables sudo apt remove iptables-persistent
restart
sudo reboot now
Step 7: Configure Caddy for Public Access
We edit the Caddy configuration file:
sudo nano /etc/caddy/Caddyfile
We add this configuration:
your-domain.com {
reverse_proxy localhost:5678 {
flush_interval -1
}
}
We validate the configuration and restart Caddy:
sudo caddy validate --config /etc/caddy/Caddyfile
sudo systemctl restart caddy
Step 8: Link the domain with the server
We go to our domain provider (in my case I use Cloudflare) and add a DNS record that links our domain with the server IP.
How to update n8n when a new version comes out?
One of the advantages of using Docker is that updating is super simple. When n8n releases a new version, you just have to follow these steps:
Step 1: Connect to the server
Connect to your server via SSH as we did at the beginning:
ssh -i name_of_your_private_key user@server_ip
Step 2: Go to the n8n folder
We navigate to the folder where our docker-compose.yml is:
cd n8n
Step 3: Stop the current container
We stop the container that is running:
sudo docker compose down
Step 4: Download the new image
Docker will automatically download the latest version of n8n:
sudo docker compose pull
Step 5: Raise the container with the new version
We start the container again with the updated version:
sudo docker compose up -d
And that’s it! As easy as that. Docker will take care of downloading the latest n8n image and updating your installation. Your data and workflows will remain intact because they are saved in the n8n_data volume.
Verify the installed version
If you want to check which version of n8n you are using, you can do so by accessing n8n from your browser and going to Settings > About n8n, or by running:
sudo docker exec -it n8n-n8n-1 n8n --version
Pro Tip: I recommend you make a backup of the
n8n_datafolder before updating, just in case. It never hurts to have a backup:
sudo tar -czf n8n_backup_$(date +%Y%m%d).tar.gz n8n_data/
Ready! You already have n8n running on your server!
If you have followed all the steps, you should be able to access n8n from your domain and start automating tasks like a pro. And now that you know how to update it, you will always have the latest features available. What are you waiting for to try it?



What do you think?
Leave your opinion, question or suggestion. Comments are synced with GitHub Discussions .