Close Menu
Content DistilledContent Distilled
  • Tech
    • Ai Gen
    • N8N
    • MCP
  • Javascript
  • Business Ideas
  • Startup Ideas
  • Tech Opinion
  • Blog

Subscribe to Updates

Get the latest creative news from FooBar about art, design and business.

What's Hot

Turn Any GitHub Repo Into AI Tutorials in 5 Minutes

July 14, 2025

5 New NotebookLM Features That Will Transform Your Learning

July 13, 2025

Build SaaS Image Generator: React, Convex & OpenAI Tutorial

July 12, 2025
Facebook X (Twitter) Instagram
  • Tech
    • Ai Gen
    • N8N
    • MCP
  • Javascript
  • Business Ideas
  • Startup Ideas
  • Tech Opinion
  • Blog
Facebook X (Twitter) Instagram Pinterest
Content DistilledContent Distilled
  • Tech
    • Ai Gen
    • N8N
    • MCP
  • Javascript
  • Business Ideas
  • Startup Ideas
  • Tech Opinion
  • Blog
Content DistilledContent Distilled
Home»Tech»N8N»Complete Guide: Installing n8n Automation Platform on Ubuntu VPS
N8N

Complete Guide: Installing n8n Automation Platform on Ubuntu VPS

PeterBy PeterJune 30, 2025No Comments7 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
Share
Facebook Twitter LinkedIn Pinterest Email

Based on a tutorial by Minh – AI & Automation Specialist

Struggling with setting up n8n automation platform on your own server? I totally get it – the installation process can feel overwhelming, especially if you’re not familiar with Linux commands.

n8n is an incredibly powerful open-source automation platform that’s completely free, making it a fantastic alternative to expensive tools like Zapier. However, getting it properly configured on Ubuntu VPS requires some technical know-how.

That’s why I’ve created this comprehensive summary of Minh’s excellent tutorial. You’ll get a clear roadmap of the entire process before diving into the actual implementation.

Quick Navigation

  • System Requirements & Preparation (00:00-05:30)
  • Setting Up VPS and Domain with Vietnix (05:31-12:45)
  • Connecting to VPS via PuTTY (12:46-15:20)
  • Installing Docker & Docker Compose (15:21-18:45)
  • DNS Configuration & Subdomain Setup (18:46-22:30)
  • Installing and Configuring n8n (22:31-28:15)
  • License Activation & Final Setup (28:16-30:00)

System Requirements & Preparation (00:00-05:30)

Before jumping into the installation, it’s crucial to understand what you’ll need. n8n has specific requirements that you can’t ignore if you want a smooth experience.

What You’ll Need:

  • Ubuntu VPS 22.04 with minimum 4GB RAM (6GB+ recommended)
  • Domain name for accessing n8n
  • PuTTY software for SSH connection
  • Basic Linux knowledge (we’ll guide you through commands)
  • Email address for SSL certificate registration

My Take:

Don’t skimp on RAM! While n8n doesn’t need a powerful CPU, it’s memory-hungry. I’ve seen too many failed installations because people chose VPS plans with insufficient RAM.

Setting Up VPS and Domain with Vietnix (05:31-12:45)

Minh recommends Vietnix for its competitive pricing and reliable support. While you can use any VPS provider, the process remains similar across platforms.

Registration Steps:

  • Create account on Vietnix homepage
  • Register your desired domain (e.g., business.vn)
  • Choose VPS plan with minimum 6GB RAM (VPS Chip 4 recommended)
  • Select Ubuntu Server 22.04 x64 as operating system
  • Configure subdomain for n8n (e.g., n8n.business.vn)
  • Add phone number for 24/7 support (optional but recommended)

VPS Information You’ll Receive:


IP Address: 14.225.xxx.xxx
Username: root  
Password: [sent via email]
SSH Port: 22
CPU: 4 cores
RAM: 6GB
Storage: 60GB SSD
        

Pro Tip:

Choose longer billing cycles to get better discounts. Also, consider adding backup services – your automation workflows are valuable!

Connecting to VPS via PuTTY (12:46-15:20)

PuTTY is your gateway to the server. It’s a free tool that lets you control your VPS remotely through SSH connection.

Connection Process:

  • Download and install PuTTY 64-bit from official website
  • Launch PuTTY and enter your VPS IP address
  • Click Open to establish connection
  • Login with username: root
  • Enter password (right-click to paste, characters won’t display)

Don’t Panic:

Ubuntu doesn’t show password characters when you type – this is normal security behavior. Just paste the correct password and hit Enter.

Installing Docker & Docker Compose (15:21-18:45)

Docker is the foundation that’ll run n8n in containers. This installation needs to be done step-by-step to avoid conflicts.

Docker Installation Commands:


# Remove old Docker installations (if any)
sudo apt-get remove docker docker-engine docker.io containerd runc

# Update system packages
sudo apt-get update

# Install required packages
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release

# Add Docker's official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

# Add Docker repository
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

# Install Docker Engine
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

# Install Docker Compose
sudo curl -L "https://github.com/docker/compose/releases/download/v2.0.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
        

Important Notes:

  • Run each command separately – don’t copy multiple lines at once
  • When system asks for confirmation, type y and press Enter
  • Wait for each step to complete before moving to the next
  • The installation process may take several minutes

DNS Configuration & Subdomain Setup (18:46-22:30)

To access n8n through your domain, you need to create a DNS record pointing to your VPS IP. This process varies depending on your domain provider.

DNS Record Setup:

  • Access your domain management panel
  • Create new A Record
  • Record name: n8n (or your preferred subdomain)
  • Point to: Your VPS IP address
  • TTL: Leave as default (usually 3600)

Example DNS Record:


Type: A
Name: n8n
Value: 14.225.xxx.xxx
TTL: 3600
Result: n8n.yourdomain.com → Your VPS IP
        

Patience Required:

DNS propagation can take 15-30 minutes globally. Don’t worry if your subdomain doesn’t work immediately – grab a coffee and wait!

Installing and Configuring n8n (22:31-28:15)

This is where the magic happens. We’ll create configuration files and launch n8n with proper SSL and webhook support.

Create docker-compose.yml file:


nano docker-compose.yml
        

docker-compose.yml content:


version: '3.8'

services:
  traefik:
    image: traefik:v2.9
    command:
      - --api=true
      - --api.insecure=true
      - --providers.docker=true
      - --providers.docker.exposedbydefault=false
      - --entrypoints.web.address=:80
      - --entrypoints.web.http.redirections.entrypoint.to=websecure
      - --entrypoints.web.http.redirections.entrypoint.scheme=https
      - --entrypoints.websecure.address=:443
      - --certificatesresolvers.mytlschallenge.acme.tlschallenge=true
      - --certificatesresolvers.mytlschallenge.acme.email=${SSL_EMAIL}
      - --certificatesresolvers.mytlschallenge.acme.storage=/letsencrypt/acme.json
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ${DATA_FOLDER}/letsencrypt:/letsencrypt
      - /var/run/docker.sock:/var/run/docker.sock:ro

  n8n:
    image: n8nio/n8n
    environment:
      - N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - NODE_ENV=production
      - WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
      - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
      - N8N_BASIC_AUTH_ACTIVE=false
      - N8N_PERSISTED_BINARY_DATA_TTL=${N8N_PERSISTED_BINARY_DATA_TTL}
    ports:
      - "127.0.0.1:5678:5678"
    labels:
      - traefik.enable=true
      - traefik.http.routers.n8n.rule=Host(`${SUBDOMAIN}.${DOMAIN_NAME}`)
      - traefik.http.routers.n8n.tls=true
      - traefik.http.routers.n8n.entrypoints=websecure
      - traefik.http.routers.n8n.tls.certresolver=mytlschallenge
      - traefik.http.middlewares.n8n.headers.SSLRedirect=true
      - traefik.http.middlewares.n8n.headers.STSSeconds=315360000
      - traefik.http.middlewares.n8n.headers.browserXSSFilter=true
      - traefik.http.middlewares.n8n.headers.contentTypeNosniff=true
      - traefik.http.middlewares.n8n.headers.forceSTSHeader=true
      - traefik.http.middlewares.n8n.headers.SSLHost=${SUBDOMAIN}.${DOMAIN_NAME}
      - traefik.http.middlewares.n8n.headers.STSIncludeSubdomains=true
      - traefik.http.middlewares.n8n.headers.STSPreload=true
    volumes:
      - ${DATA_FOLDER}/.n8n:/home/node/.n8n
    depends_on:
      - traefik
        

Create environment file:


nano .env
        

.env file content:


# Domain Configuration
DOMAIN_NAME=business.vn
SUBDOMAIN=n8n

# Timezone (adjust to your location)
GENERIC_TIMEZONE=Asia/Ho_Chi_Minh

# Authentication (disabled for initial setup)
N8N_BASIC_AUTH_ACTIVE=false
N8N_BASIC_AUTH_USER=
N8N_BASIC_AUTH_PASSWORD=

# Binary Data Storage (filesystem for low RAM VPS)
DEFAULT_BINARY_DATA_MODE=filesystem
N8N_PERSISTED_BINARY_DATA_TTL=168

# SSL Certificate Email
SSL_EMAIL=your-email@example.com

# Data Storage Location
DATA_FOLDER=./data
        

Create data directories:

  • mkdir -p data/.n8n
  • mkdir -p data/letsencrypt

Launch n8n:


sudo docker-compose up -d
        

Critical Configuration:

Make sure to replace the email and domain name in the .env file with your actual values. The filesystem mode for binary data is essential for VPS with limited RAM.

License Activation & Final Setup (28:16-30:00)

Once n8n is running, you’ll need to create an admin account and activate the free license to unlock all features including webhooks and integrations.

Final Steps:

  • Navigate to https://n8n.yourdomain.com (replace with your domain)
  • Bypass SSL warning if present (click “Advanced” → “Proceed to site”)
  • Create admin account with strong email and password
  • Request free license key via email
  • Go to Settings → Usage and Plan → Enter activation key
  • Paste license key and click Activate

You’re Done!

Congratulations! You now have a fully functional n8n instance with HTTPS, webhooks, and all premium features – completely free. Start building powerful automation workflows!

Essential Management Commands

Here are the Docker Compose commands you’ll need for ongoing management of your n8n installation:

Common Docker Compose Commands:


# Stop n8n services
sudo docker-compose stop

# Start n8n services
sudo docker-compose start

# Restart services
sudo docker-compose restart

# Update n8n to latest version
sudo docker-compose pull
sudo docker-compose up -d

# View logs
sudo docker-compose logs -f

# View logs for specific service
sudo docker-compose logs -f n8n

# Complete removal (use with caution!)
sudo docker-compose down
        

Maintenance Tips:

  • Run updates monthly to get latest features and security patches
  • Monitor logs regularly for any issues
  • Backup your data folder periodically
  • Keep your VPS system updated with sudo apt update && sudo apt upgrade

Common Issues & Solutions

If n8n won’t start:

  • Check if ports 80 and 443 are available: sudo netstat -tlnp | grep :80
  • Verify Docker is running: sudo systemctl status docker
  • Check logs for errors: sudo docker-compose logs

If domain doesn’t resolve:

  • Wait 30 minutes for DNS propagation
  • Check DNS record with: nslookup n8n.yourdomain.com
  • Verify IP address matches your VPS

This article summarizes the excellent tutorial created by Minh – AI & Automation Specialist. If you found this summary helpful, please support the creator by watching the full video and subscribing to their YouTube channel.

Join the Community: If you’re interested in AI and automation, consider joining Minh’s “AI Automation Learning Community” to connect with like-minded individuals and share experiences.

Need Help? If you encounter any issues during installation, feel free to ask questions in the comments section of the original video or in the community group mentioned above.

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Peter
  • Website

Related Posts

How to Create Zalo Chatbot with N8N – Complete Tutorial

July 10, 2025

Create AI Chatbots Without Code: N8N, Loom & Vercel Guide

May 27, 2025

Deploy Self-Hosted Content Apps with Coolify & Strapi on Vultr

May 24, 2025

Essential n8n Enterprise Features: Advanced Workflow Management

May 16, 2025
Add A Comment
Leave A Reply Cancel Reply

Editors Picks
Top Reviews
Advertisement
Content Distilled
Facebook Instagram Pinterest YouTube
  • Home
  • Tech
  • Buy Now
© 2025 Contentdistilled.com Contentdistilled.

Type above and press Enter to search. Press Esc to cancel.