Are you looking to automate your business processes without paying high monthly subscription fees? Whether you want to connect apps, automate workflows, send notifications, or manage data across platforms, n8n is one of the most powerful automation tools available today.
The best part? You donât need to rely on expensive cloud plans. You can self-host n8n on your own VPS and enjoy full control, unlimited workflows, and predictable costs.
In this complete beginner-friendly guide, Iâll show you how to install n8n using Docker on a VPS, step by step, in simple language. This guide is especially useful for businesses and professionals looking for VPS hosting in Pakistan, using reliable infrastructure from CreativeON.

Why Self-Host n8n on a VPS?
Before we jump into the setup, letâs quickly understand why self-hosting n8n on a VPS makes sense.
When you use n8n Cloud, you are restricted by workflow execution limits. For example:
- The basic plan allows limited workflows and executions per month
Â
- Higher plans can cost $50 or more per month
Â
- Scaling automation means paying more every time you grow
Â
When you self-host n8n on your own VPS, there are no artificial limits. Your only limitation is your serverâs resources â which you can upgrade anytime.
Benefits of Running n8n on a VPS
- Unlimited workflows and executions (resource-based)
Â
- Full control over your data
Â
- Better performance for high-volume automation
Â
- No surprise bills
Â
- Custom integrations and configurations
Â
For example, if youâre sending thousands of automated messages, syncing customer data, or running marketing workflows, a VPS gives you the freedom to scale without restrictions.
đĄ Pro Tip: CreativeON is an Official Google Workspace Partner and Reseller in Pakistan, allowing us to offer competitive VPS pricing and trusted infrastructure for automation tools like n8n.
What You Need Before Installing n8n
Letâs make sure you have everything ready before starting.
VPS Server Requirements
- Operating System: Ubuntu 20.04 or 22.04
Â
- RAM: Minimum 4 GB (8 GB recommended for smooth performance)
Â
- CPU: At least 4 CPU cores
Â
- Storage: 10 GB minimum (expandable as workflows grow)
Â
- Docker: Pre-installed on CreativeON VPS plans
Â
Basic Knowledge Required
- Simple Linux commands (weâll guide you)
Â
- SSH access to your VPS
Â
- A domain name or server IP (domain recommended)
Â
â Good News: CreativeONâs VPS hosting in Pakistan comes with Docker pre-installed, saving you setup time.
Step-by-Step: Install n8n Using Docker on a VPS
Step 1: Connect to Your VPS via SSH
On macOS or Linux:
ssh root@your_server_ip
On Windows:
- Use PuTTY
Â
- Enter your server IP
Â
- Log in using your VPS credentials
Â
Once connected, update your server:
apt update && apt upgrade -y
Step 2: Verify Docker Installation
Check if Docker is installed:
docker –version
Start Docker if needed:
systemctl start docker
systemctl enable docker
Test Docker:
docker run hello-world
If you see âHello from Docker!â, everything is working.
Step 3: Install Docker Compose (If Needed)
Check Docker Compose:
docker-compose –version
If itâs not installed:
apt install docker-compose -y
đ Note: Some systems use Docker Compose v2. In that case, commands will look like:
docker compose up -d
Step 4: Create n8n Docker Configuration
Create a directory for n8n:
mkdir ~/n8n
cd ~/n8n
nano docker-compose.yml
Paste the following configuration:
version: “3”
services:
  n8n:
    image: n8nio/n8n
    ports:
      – “5678:5678”
    environment:
      – N8N_BASIC_AUTH_ACTIVE=true
      – N8N_BASIC_AUTH_USER=admin
      – N8N_BASIC_AUTH_PASSWORD=strong_password_here
      – N8N_HOST=yourdomain.com
      – N8N_PORT=5678
      – N8N_PROTOCOL=https
      – WEBHOOK_URL=https://yourdomain.com/
      – GENERIC_TIMEZONE=UTC
    volumes:
      – ~/.n8n:/home/node/.n8n
Replace:
- strong_password_here with a secure password
Â
- yourdomain.com with your actual domain or server IP
Â
Save the file:
- Ctrl + O â Enter
Â
- Ctrl + X
Â
Set correct permissions:
chown -R 1000:1000 ~/.n8n
chmod -R 755 ~/.n8n
Start n8n:
docker-compose up -d
Verify:
docker ps
Step 5: Access Your n8n Dashboard
Open your browser and visit:
- http://your_server_ip:5678
orÂ
- https://yourdomain.com (recommended with SSL)
Â
Log in using the credentials you set.
Youâll now see the n8n dashboard, where you can create and manage workflows.
Securing Your n8n Installation (Highly Recommended)
Change SSH Port (Optional)
nano /etc/ssh/sshd_config
Change:
#Port 22
to:
Port 2222
Restart SSH:
systemctl restart sshd
Enable SSL (HTTPS)
Install Certbot:
apt install certbot python3-certbot-nginx -y
Generate SSL certificate:
certbot –nginx -d yourdomain.com
Restart n8n:
docker-compose down && docker-compose up -d
đ For best security, use Nginx as a reverse proxy and avoid exposing port 5678 publicly.
Common Issues and Troubleshooting
Docker not running?
systemctl status docker
systemctl restart docker
Canât access n8n?
netstat -tuln | grep 5678
Check logs:
docker logs n8n
Maintenance Tips for Long-Term Stability
Backup n8n Data
tar -czf n8n_backup_$(date +%F).tar.gz ~/.n8n
Update n8n
docker-compose pull
docker-compose up -d
Monitor Resources
Use:
htop
Upgrade your CreativeON VPS anytime if needed.
What You Can Automate with n8n
- CRM & customer data syncing
Â
- Social media posting
Â
- Email automation
Â
- Data backups
Â
- Slack and WhatsApp notifications
Â
- Google Sheets integrations
Â
- Form processing
Â
With 400+ integrations, n8n works with almost every major platform.
Why Choose CreativeON for n8n VPS Hosting in Pakistan?
CreativeON has been serving Pakistani businesses for over 20 years, working with brands like City42, Channel 24, QTV, Chughtai Lab, and more.
We are:
- â
Official Google Workspace Partner
Â
- â
PKNIC Gold Partner (.PK domains)
Â
- â
Trusted VPS hosting provider in Pakistan
Â
Our VPS Hosting Offers:
- Affordable pricing
Â
- 99.9% uptime
Â
- Scalable resources
Â
- Local expert support
Â
- Docker-ready environments
Â
Frequently Asked Questions (FAQ)
Yes, the self-hosted version is completely free.
No. n8n is a no-code / low-code platform.
Yes, but we recommend at least 4 GB RAM and 4 CPU cores.
Yes, when secured with SSL, authentication, and firewall rules.
Ready to Get Started?
You now know how to install n8n using Docker on a VPS and run powerful automations without limits.
Next Steps:
- Choose a CreativeON VPS plan
- Follow this guide
- Start building workflows
- Scale as your automation grows
If you need help with setup, security, or performance tuning, CreativeONâs technical team is always here to help.