Application Guides

How can we help?

Guides and technical documentation for your Server4You dedicated server or VPS.

n8n Logo

Install n8n with Docker

This guide shows how to install n8n, the workflow automation tool with 400+ integrations, manually with Docker Compose on your Linux server, including reverse proxy and owner account. Alternatively, Server4You offers n8n as a ready-to-use app template on Debian, accessible via SSH tunnel.

Prerequisites:
✓ A server running a current Linux distribution (e.g. Ubuntu 24.04 or Debian 13)
✓ Docker and Docker Compose installed on the server
✓ A domain name pointing to your server's IP address (required for production use)

Step 1: Create the Project Directory and Files

Log in to your server via SSH and create a directory for n8n. Inside it, create the Compose file and a .env file for your configuration variables:

Create Directory and Files
mkdir n8n && cd n8n && touch docker-compose.yml .env && nano docker-compose.yml

Paste the following content into the docker-compose.yml file:

docker-compose.yml
services: n8n: image: docker.n8n.io/n8nio/n8n restart: always ports: - '127.0.0.1:5678:5678' environment: - N8N_HOST=${N8N_HOST} - N8N_PORT=5678 - N8N_PROTOCOL=https - NODE_ENV=production - WEBHOOK_URL=${WEBHOOK_URL} - GENERIC_TIMEZONE=${GENERIC_TIMEZONE} volumes: - n8n_data:/home/node/.n8n volumes: n8n_data:

Binding to 127.0.0.1:5678 ensures n8n is only accessible locally for security reasons. External access is handled by the reverse proxy in Step 4. Your workflows and credentials are stored in the Docker volume n8n_data.

Step 2: Configure Environment Variables

Open the .env file with nano .env and paste the following content. Adjust the values to match your setup:

.env
# Timezone for workflow scheduling GENERIC_TIMEZONE=Europe/Berlin # Public URL of your n8n instance (required for webhooks) WEBHOOK_URL=https://n8n.yourdomain.com # Hostname for n8n N8N_HOST=n8n.yourdomain.com

Step 3: Start n8n

Start the n8n container with the following command. Docker will pull the image and start the container in the background.

Start Docker Compose
docker compose up -d

Step 4: Set Up a Reverse Proxy (Required)

Since n8n is only accessible locally by default (127.0.0.1:5678), you must set up a reverse proxy to access it from the internet via your domain. The reverse proxy forwards requests from your public domain (e.g. https://n8n.yourdomain.com) to the local n8n container and handles HTTPS termination.

Common tools for this are Nginx Proxy Manager, Traefik, or Caddy. All three can run as Docker containers and integrate well with this setup.

Step 5: First Access and Account Setup

Once your reverse proxy is configured, open your browser and navigate to your n8n domain (e.g. https://n8n.yourdomain.com).

On first load, you will be prompted to create an owner account — enter an email address and a secure password. This will be your main administrator account for n8n.

Further Documentation

For advanced configuration, workflow templates, and integration guides, refer to the official n8n documentation.