← Back to all posts

Using n8n for FREE using Oracle and Docker

16 March 2026

Using n8n for FREE using Oracle and Docker

My local setup is a MacBook Pro (13-inch, M1, 2020) equipped with the Apple M1 chip, 16 GB of Memory, and running macOS 14.5 (Build 23F79).

I’ve used n8n for several different projects but got annoyed that if you cancel their starter package you must export all your workflows. Starter subscription is £24pm, which if you’re a beginner will be a high barrier to entry (https://n8n.io/pricing/).

I decided to investigate hosting locally to save some pennies. This worked well for any workflows that I could manually trigger or would run in the daytime when I would have my laptop on. A problem that I encountered with the locally hosted instance was that if I had a time-based trigger and my laptop wasn’t on then the workflow would fail. A friend of mine had suggested to use Oracle Cloud’s Free Tier for a virtual machine. This would enable workflows to trigger 24/7. Oracle is one of the best free options for cloud servers and has more than enough memory and storage for my needs.

Whilst I have been able to setup this quite simple setup directed by Gemini, I’m cognisant that without the LLM help it would take a lot longer to setup. Additionally, ask me how to add something else to the cloud without the help of an LLM and I would not be able to do it.

Below is a step-by-step guide to getting n8n running locally on your Mac, followed by how to set it up on an Oracle Cloud Free Tier server with Docker.

Part 1: Setting Up a Locally Hosted n8n Instance on macOS

Prerequisites: Installing Docker for Mac

(https://docs.docker.com/desktop/setup/install/mac-install/)

Step 1: Create Your Project Folder

Using terminal in MacOS I needed to setup a folder where I could put all the files for the n8n instances. Step by step below:

  1. Open the Terminal app (search through spotlight)
  2. Choose where you want the folder to live. For example, to create it in your Documents folder, type the following command and hit Enter: mkdir -p ~/Documents/n8n-local
  3. Now, move inside that newly created folder by running cd ~/Documents/n8n-local

Step 2: Create the Docker-Compose File

Inside this folder, I added a file that tells Docker exactly how to build and run n8n. This file is called a docker-compose.yml file.

  1. In your Terminal (make sure you are still in the n8n-local directory), type nano docker-compose.yml to open a built-in text editor.
  2. Paste the following configuration exactly as written:

YAML

services:

n8n:

image: docker.n8n.io/n8nio/n8n

container_name: n8n_local

restart: always

ports:

- "5678:5678"

environment:

- N8N_HOST=localhost

- N8N_PORT=5678

- N8N_PROTOCOL=http

- NODE_ENV=production

volumes:

- ./n8n_data:/home/node/.n8n

  1. To save and exit, press Ctrl + O (letter O), press Enter to confirm the file name, and then Ctrl + X to exit the editor.

Step 3: Enable Folder Permissions

For security reasons, the n8n Docker image runs internally as a non-root user named node (which uses User ID 1000). On MacOS n8n will crash if I didn’t do this because it can't save your data.

  1. While still in my n8n-local folder in Terminal, I manually created the data directory by running: mkdir n8n_data
  2. Next, I granted the correct permissions by running: sudo chown -R 1000:1000 n8n_data

(Note: I was prompted to enter your Mac's administrator password in terminal)

Step 4: Start the Container

Now I could start the Docker container that holds the n8n instance so that n8n can launch locally on my browser.

  1. With my Terminal still open in the n8n-local directory, I executed the build command: docker compose up -d
  2. Docker downloaded the n8n image from the internet and start the container. The -d flag means "detached," allowing n8n to run quietly in the background so I could continue using my terminal.

Step 5: Access n8n

  1. I opened Firefox web browser.
  2. Went to http://localhost:5678 into the address bar.
  3. Then the n8n welcome screen was there prompting me to create your local owner account.

Local Setup Solution to Common Issues:

  • Ghost Port Conflicts ("Port already in use"): I had a problem with n8n crashes, so my Mac kept the 5678 port held hostage. The solution was to:
  1. Run docker stop $(docker ps -q) to force stop all containers.
  2. Run docker network prune -f to clear up any network hangs.
  3. Quit Docker Desktop from the top menu bar, reopen it, and run docker compose up -d again.

Part 2: Setting up n8n on Oracle Cloud Free Tier

Step 1: Setting up Oracle

  • Create the Instance

Signed up for the Oracle Cloud Free Tier. Compute > Instances > Create Instance. Changed the Image to Canonical Ubuntu and the Shape to Ampere A1 Flex (max out the free tier sliders to 4 OCPUs and 24 GB of RAM).

  • Saved my SSH Key

I generated a SSH key pair for me and downloaded the private .key file to my Mac. This file is needed to login.

  • Opened the Firewall

I went to my instance's subnet link, to the Default Security List, and added Ingress Rules. Set the Source CIDR to 0.0.0.0/0 and the Destination Port Range to 80,443,5678. Saved the rule.

  • Connected via Mac Terminal

Got my private SSH key then connected to my new cloud server by running:

Step 2: Project Directory

SSH'd into my Oracle Server using my my terminal (the prompt looked something like this [opc@your-instance-name ~]$), then navigated to the saved Docker files.

  1. Ran the command to enter my project directory: cd ~/n8n-docker.

Step 3: Accessed my hosted n8n

  1. Opened Firefox
  2. Navigated to my custom domain.
  3. Then came the "Create Owner Account" screen for your production instance.