Guide to Installing N8N on VPS

VPTS Team Content has been moderated
Published date:17/6/2025 Update:17/6/2025 Views:108 Reviews: 5.0/5103reviews
VPTS on

Looking to automate workflows and connect numerous apps like Telegram, Google Sheets, Gmail, or Slack without writing too much code? N8N is the open-source platform...

Looking to automate workflows and connect numerous apps like Telegram, Google Sheets, Gmail, or Slack without writing too much code?
N8N is a powerful open-source platform that helps you build automation workflows with simple drag-and-drop operations.

In this tutorial,VPTSwill accompany you in installing n8n on a VPS easily, optimally, and securely. With stable infrastructure, high speed, and 24/7 support, VPTS provides the perfect solution for you to deploy n8n and start automating all workflows in the most professional way.

Technical requirements for VPS

When choosing a VPS to run n8n, you don't need to focus too much on CPU, but RAM is an important factor. Recommended configuration:

  • Minimum RAM: 4GB (to ensure stable operation of n8n).
  • Operating system: Ubuntu 22.04 (recommended version for deploying n8n).

You need to install the application:BvSshClient (1244 downloads) .

Install Docker

The installation process may vary depending on the distribution Linux you are using. You can find detailed instructions in the official documentation of Docker.

Below is the installation guide Docker on Ubuntu

Copy
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get 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-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

Install Docker-Compose

The installation process may vary depending on the distribution Linux you are using. You can find detailed instructions in the official documentation of Docker.

Below is the installation guide for Docker-Compose on Ubuntu

Copy
sudo apt-get install docker-compose-plugin

Create Docker Compose file

Create a file docker-compose.yml, then paste the following content into the file:

Copy
nano docker-compose.yml
version: "3.7"
services:
  n8n:
    image: docker.n8n.io/n8nio/n8n
    restart: always
    ports:
      - "${IP_ADDRESS}:80:5678"
    environment:
      - N8N_HOST=${IP_ADDRESS}
      - N8N_PORT=5678
      - N8N_PROTOCOL=http
      - NODE_ENV=production
      - WEBHOOK_URL=http://${IP_ADDRESS}/
      - GENERIC_TIMEZONE=Asia/Ho_Chi_Minh
      - N8N_SECURE_COOKIE=false
    volumes:
      - n8n_data:/home/node/.n8n
      - /local-files:/files
volumes:
  n8n_data:

After editing the file, press Ctrl O -> Enter ->Ctrl + X to exit the nano file.

Create a file docker-compose.yml, then paste the following content into the file:

Copy
nano .env
IP_ADDRESS=${IP_ADDRESS}

After editing the file, press Ctrl O -> Enter ->Ctrl + X to exit the nano file.

Create avolume namedn8n_datato store persistent data for Docker containers.

Copy
docker volume create n8n_data

Run containers defined in the filedocker-compose.yml in background mode.

Copy
docker compose up -d

After finishing the entire installation, access n8n at: http://${IP_ADDRESS}

access n8n

I have now guided you through installing N8N on your VPS.

AtVPTShas VPS pre-integrated with N8N, you can purchase and use it right away without performing the above steps.

Buy N8N VPS at VPTS

VPTS – Comprehensive Digital Infrastructure Solutions Provider

VPTS is a digital infrastructure solution provider in Vietnam, serving deployment, operation, and data storage needs for individuals, developers, and enterprises. The service ecosystem includesVietnam VPS, International VPS, VPS Anti DDoS, Hosting cPanel, dedicated server, Rack rental, Proxy IPv4/IPv6, S3 MinIOandCloud Storage.

Besides providing infrastructure resources, VPTS also focuses on assisting customers with deployment, configuration, and practical troubleshooting. Content on the VPTS Blog is drawn from common scenarios in operating VPS, servers, and online systems, helping readers understand root causes and apply clear solutions.

VPTS – Stable infrastructure, flexible solutions, and continuous partnership throughout operations.

VPTS Team Contact Information