Home » n8n» Can n8n run on Raspberry Pi — Install and Run Guide

Can n8n run on Raspberry Pi?

Yes. n8n can run on a Raspberry Pi and this guide shows how to install and run n8n on Raspberry Pi using Docker. The steps use Docker and docker compose on a Raspberry Pi OS. You will get a working, self-hosted automation server.

What You Need

  • A Raspberry Pi 3 or newer (Pi 4 recommended).
  • Raspberry Pi OS 64-bit or 32-bit with internet access.
  • Sudo access on the Pi and basic terminal skills.
  • At least 2 GB free storage and a stable power supply.

Can n8n run on Raspberry Pi — How to Install

Step 1: Update the system and install Docker

Update packages and install Docker and the compose plugin.

sudo apt update && sudo apt upgrade -y
sudo apt install -y docker.io docker-compose-plugin
sudo systemctl enable --now docker
sudo usermod -aG docker $USER

Log out and back in to apply the docker group change or run with sudo.

Step 2: Create a folder for n8n

Make a simple project folder and set a safe owner.

mkdir -p ~/n8n-data
cd ~/n8n-data

Step 3: Create a docker-compose file

Create a docker-compose.yml file that stores data and exposes port 5678. The official image supports ARM and works on Pi.

cat > docker-compose.yml <<'YAML'
version: '3.8'
services:
  n8n:
    image: n8nio/n8n:latest
    restart: unless-stopped
    ports:
      - "5678:5678"
    environment:
      - N8N_PORT=5678
      - N8N_HOST=0.0.0.0
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER=admin
      - N8N_BASIC_AUTH_PASSWORD=change_this_password
    volumes:
      - ./data:/home/node/.n8n
YAML

Edit the basic auth user and password to strong credentials before starting.

Step 4: Start n8n

Start the service with docker compose. This will download the ARM image and run n8n.

docker compose up -d
docker compose ps

Open a browser to http://YOUR_PI_IP:5678 and log in with the basic auth user. Replace YOUR_PI_IP with the Pi address.

Step 5: Optional - run behind a reverse proxy

For HTTPS use a reverse proxy (nginx, Caddy) or a tunnel (ngrok, Cloudflare). Configure N8N_WEBHOOK_URL or WEBHOOK_TUNNEL_URL if you need webhooks to be reachable.

# Example env for webhook URL
# - WEBHOOK_URL=https://yourdomain.example

Update

To update n8n, pull the new image and restart the service. Keep a backup of the data folder first.

cd ~/n8n-data
docker compose pull
docker compose up -d
# Backup data folder before major upgrades
tar -czf n8n-data-backup-$(date +%F).tgz ./data

Security

  • Enable basic auth in the environment and use strong passwords.
  • Use HTTPS via a reverse proxy or a TLS-terminating service.
  • Restrict ports with ufw or your router. Allow only needed traffic.
  • Keep the OS and Docker updated. Regularly back up the ./data folder.
  • Run the Pi on a stable power supply and use a good SD card or SSD.

Done

You now have n8n running on your Raspberry Pi. The setup uses Docker and a persistent data folder. You can add automations and connect services.


If you need help with a specific step, share the Pi model and the OS version you run. That information helps with targeted advice.

Neil
Written by Neil

Neil is a true n8n geek who lives and breathes workflow automation. He dives deep into nodes, triggers, webhooks, custom logic, and self-hosting setups, sharing everything he learns about n8n on AutomationCompare.com. As part of a broader team of automation specialists, Neil focuses purely on mastering n8n and helping others unlock its full potential.

Keep Reading

Scroll to Top