n8n is one of the most powerful workflow automation platforms available today. With n8n, you can automate repetitive tasks, connect APIs, build AI workflows, and create complex business automations without writing extensive code.
In this guide, you'll learn how to create a Virtual Machine on Neviri Cloud and deploy n8n using Docker and Docker Compose.
Step 1: Sign Up on Neviri
Visit Neviri and create your account.
New users receive $100 free credits to explore and deploy cloud resources.
After signing up, access your Neviri dashboard.
Creating Infrastructure on Neviri
Before deploying n8n, we need to create networking and a virtual machine.
Step 2: Create a Network/Subnet
Navigate to Network Management and click Create Network.
Fill in the following details:
Network Name
CIDR Block
Enable DHCP
After entering the required information, click Create Network.
This will create your private cloud network.
Step 3: Create a Router
Navigate to Routers and click Create Router.
Provide:
Name
Click Create Router.
Step 4: Attach the Subnet to the Router
Open the router you just created.
Attach the subnet created in the previous step to the router.
This allows traffic to flow between your network and external connectivity.
Step 5: Create a Virtual Machine
Navigate to Virtual Machines and click Create VM.
Fill in the following details:
Basic Configuration
VM Name
Quantity (VM Quantity)
Compute Configuration
Instance Type (Choose a Flavor)
Storage Configuration
Boot From: Fresh OS Image
Boot Disk Size
Operating System
Select your preferred operating system.
Recommended:
Ubuntu 22.04 LTS
Networking
Select your subnet
Authentication
Generate a new SSH Keypair
Security Group
Either:
Use the default security group, or
Create a custom security group
Make sure the following ports are allowed:
22 (SSH)
80 (HTTP)
443 (HTTPS)
5678 (n8n)
Click Create Virtual Machine.
Your private VM is now ready.
Step 6: Assign a Public IP Address
If you want to access the VM from the internet, you must assign a Floating IP.
Open your VM and navigate to:
Network → Floating IPs
Click:
Allocate New Floating IP
Then click:
Allocate & Associate
Your VM now has a public IP address.
You can connect using:
ssh ubuntu@YOUR_PUBLIC_IP
Deploying n8n
Prerequisites
Before continuing, ensure you have:
Ubuntu VPS
SSH access
Public IP address
Docker installed
Docker Compose installed
Step 7: Install Docker
Update your system:
sudo apt update
sudo apt upgrade -y
Install Docker:
curl -fsSL https://get.docker.com | sh
Verify installation:
docker --version
Install Docker Compose plugin:
sudo apt install docker-compose-plugin -y
Verify:
docker compose version
Step 8: Create the n8n Project Directory
mkdir ~/n8n
cd ~/n8n
Step 9: Create Docker Compose File
Create a file named:
nano docker-compose.yml
Paste:
services:
n8n:
image: docker.io/n8nio/n8n:latest
restart: always
ports:
- "5678:5678"
volumes:
- n8n_data:/home/node/.n8n
volumes:
n8n_data:
Save the file.
Step 10: Start n8n
Launch the container:
docker compose up -d
Verify:
docker ps
Expected output:
0.0.0.0:5678->5678/tcp
Step 11: Check Logs
View logs:
docker logs -f
Expected:
n8n ready on ::, port 5678
Editor is now accessible via:
http://localhost:5678
Remember:
localhost refers to the server itself, not your personal computer.
Step 12: Verify n8n is Running
On the server:
If HTML is returned, n8n is running successfully.
Troubleshooting Common Issues
ERR_CONNECTION_REFUSED
If visiting:
returns:
ERR_CONNECTION_REFUSED
Check Docker port mapping:
docker ps
Verify:
0.0.0.0:5678->5678/tcp
Check listening ports:
sudo ss -tulpn | grep 5678
Expected:
0.0.0.0:5678
Verify firewall:
sudo ufw status
If enabled:
sudo ufw allow 5678/tcp
Check your public IP:
curl -4 ifconfig.me
Ensure it matches your assigned Floating IP.
Secure Cookie Error
You may see:
Your n8n server is configured to use a secure cookie...
This happens when accessing n8n over HTTP while secure cookies are enabled.
For testing purposes only, update your compose file:
services:
n8n:
image: docker.io/n8nio/n8n:latest
restart: always
ports:
- "5678:5678"
environment:
- N8N_SECURE_COOKIE=false
volumes:
- n8n_data:/home/node/.n8n
volumes:
n8n_data:
Restart:
docker compose down
docker compose up -d
Production Deployment Recommendations
For production environments:
Use a domain name
Configure HTTPS
Use Nginx or Caddy as a reverse proxy
Install Let's Encrypt SSL certificates
Example:
This keeps secure cookies enabled and improves security.
Useful Commands
View logs:
docker logs -f n8n
Restart:
docker compose restart
Stop:
docker compose down
Update n8n:
docker compose pull
docker compose up -d
Conclusion
Deploying n8n on Neviri Cloud is straightforward. By creating a network, router, virtual machine, and floating IP, you can quickly provision infrastructure and launch n8n using Docker.
If you encounter connectivity issues, verify Docker port mappings, security groups, firewall settings, and public IP assignments. For production deployments, always secure your instance with HTTPS and a domain name.






Top comments (0)