[ AGENTIC AI · AUTOMATION ]How to Install n8n on a Hostinger VPS: A Step-by-Step Guide (2025)

Blog / How to Install n8n on a Hostinger VPS: A Step-by-Step Guide (2025)

How to Install n8n on a Hostinger VPS: A Step-by-Step Guide (2025)

Share

n8n is the workflow automation tool that has quietly become the backbone of serious AI automation work. Unlike Zapier or Make, you can self-host it — which means no per-execution pricing, no task limits, and your data never leaves a server you control. The cheapest reliable way to do that is a small VPS.

This guide walks through installing n8n on a Hostinger VPS from scratch: the one-click template route (5 minutes), the manual Docker route (full control), then HTTPS and the security settings most tutorials leave out.

Why self-host n8n instead of using n8n Cloud?

n8n CloudSelf-hosted on a VPS
Cost modelMonthly fee, capped executionsFlat VPS cost, unlimited executions
Data residencyn8n's serversYour server, your jurisdiction
Credentials & API keysStored by the vendorStored in your own database
Community nodesRestrictedInstall anything
Setup effortNone~15 minutes (this guide)

For anyone handling client data, internal company records, or anything covered by PDPA, the data-residency column is usually the deciding one. That is why most corporate automation teams we train end up self-hosting.

What you need before you start

  • A VPS. Minimum 1 vCPU / 1 GB RAM (KVM 1). We recommend 2 vCPU / 2 GB RAM (KVM 2) — n8n gets sluggish on 1 GB once you run AI nodes or a few concurrent workflows. Grab one here: Hostinger VPS (20% off with our link)
  • Ubuntu as the operating system
  • A domain or subdomain (e.g. n8n.yourdomain.com) if you want HTTPS — and you do, because webhooks from most services require it
  • SSH access, or just the hPanel browser terminal

Method 1: The one-click n8n template (fastest)

Hostinger ships a prebuilt n8n VPS template. If you just want n8n running, use this.

  1. Log in to hPanel and open the VPS section
  2. Click Manage on your VPS
  3. Open the OS & Panel dropdown and choose Operating System
  4. Search for and select the n8n template
  5. Confirm the OS-overwrite warning — this wipes the server, so only do it on a fresh VPS
  6. Set your root password and wait for the build to finish
  7. Click Panel accessLogin URL
  8. Create your owner account (email + strong password) and the n8n dashboard loads

That is a working n8n. Skip to securing it — do not leave it on the default settings.

Method 2: Manual install with Docker (recommended for production)

Docker is the route we use in our own workshops: it upgrades cleanly, isolates n8n from the host, and keeps your workflows in a mounted volume that survives container rebuilds.

Step 1 — Update the server

sudo apt-get update && sudo apt-get upgrade -y

Step 2 — Install Docker

sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
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
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
docker --version

Step 3 — Pull and run n8n

docker pull n8nio/n8n
docker run -d --name n8n -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8nio/n8n

The -v ~/.n8n:/home/node/.n8n volume mount is the important part — that is where your workflows and credentials live. Without it, rebuilding the container wipes everything.

Visit http://your-server-ip:5678 and create your owner account.

Step 4 — Fix permissions (if the container will not start)

The single most common failure. If docker logs n8n shows permission errors:

sudo chown -R 1000:1000 ~/.n8n
sudo chmod -R 755 ~/.n8n
docker start n8n

Step 5 — Secure your instance

An n8n instance on a public IP with no auth is an open door to your connected accounts. Stop the container and relaunch it with authentication and your domain configured:

docker stop n8n && docker rm n8n
docker run -d --name n8n \\
  -p 5678:5678 \\
  -e N8N_BASIC_AUTH_ACTIVE=true \\
  -e N8N_BASIC_AUTH_USER=your_username \\
  -e N8N_BASIC_AUTH_PASSWORD=your_strong_password \\
  -e N8N_HOST=n8n.yourdomain.com \\
  -e N8N_PORT=5678 \\
  -e WEBHOOK_URL=https://n8n.yourdomain.com/ \\
  -e GENERIC_TIMEZONE=Asia/Singapore \\
  -v ~/.n8n:/home/node/.n8n \\
  n8nio/n8n

Set GENERIC_TIMEZONE to Asia/Singapore if you are scheduling workflows for Singapore business hours — leaving it on UTC is why so many "my cron fired at the wrong time" questions get posted.

Step 6 — Add HTTPS with a free Let's Encrypt certificate

Point your subdomain's DNS A record at your VPS IP first, then:

sudo apt update && sudo apt install nginx certbot python3-certbot-nginx -y
sudo systemctl enable nginx
sudo systemctl start nginx
sudo nano /etc/nginx/sites-available/n8n

Paste this reverse-proxy configuration:

server {
    server_name n8n.yourdomain.com;
    location / {
        proxy_pass http://localhost:5678;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
    listen 80;
}

Enable the site and issue the certificate:

sudo ln -s /etc/nginx/sites-available/n8n /etc/nginx/sites-enabled/
sudo systemctl restart nginx
sudo certbot --nginx -d n8n.yourdomain.com

Your instance is now live at https://n8n.yourdomain.com.

Auto-renew the certificate

Let's Encrypt certificates expire every 90 days. Automate the renewal:

sudo crontab -e

Add this line:

0 2 * * * certbot renew --quiet --post-hook "systemctl restart nginx"

Common problems and fixes

SymptomLikely causeFix
Container exits immediatelyVolume permissionssudo chown -R 1000:1000 ~/.n8n
Webhooks never fireNo HTTPS, or WEBHOOK_URL not setComplete Step 6 and set WEBHOOK_URL
Workflows vanish after restartMissing volume mountAlways run with -v ~/.n8n:/home/node/.n8n
Scheduled runs at odd hoursTimezone left as UTCSet GENERIC_TIMEZONE=Asia/Singapore
Sluggish with AI nodes1 GB RAM planUpgrade to 2 GB (KVM 2) or higher

You have n8n running. Now what?

Installing n8n is the easy part — the value is in what you build with it. The teams getting real returns are the ones building agentic workflows: automations that call an LLM, make decisions, use tools, and handle exceptions without a human in the loop.

That is exactly what we teach, hands-on, in Singapore:

Browse every WSQ agentic AI course to check funding and upcoming dates.

Frequently asked questions

How much does it cost to self-host n8n?

Just the VPS. A 2 vCPU / 2 GB plan is a few dollars a month and runs unlimited workflow executions — which is why self-hosting pays for itself quickly compared with per-task pricing. You can start with 20% off a Hostinger VPS here.

Is self-hosted n8n free?

n8n's Community Edition is source-available and free to self-host for internal business use. Some enterprise features (SSO, advanced permissions) require a paid licence. For most teams the community edition is more than enough.

Do I need to know Linux?

For Method 1 (the one-click template), no — it is all point-and-click in hPanel. For Method 2 you only need to paste the commands above. Nothing here requires prior Linux experience.

Can I move my workflows from n8n Cloud to my own server?

Yes. Export your workflows as JSON from the cloud instance and import them into the self-hosted one. You will need to re-enter credentials, since those are deliberately not included in exports.

Will my automations keep running if I close my browser?

Yes — with the Docker method the container runs as a background service and survives reboots. (If you used the npm install method with screen, that is far less reliable for production; use Docker.)

Which n8n course should I start with in Singapore?

If you are new to n8n, start with WSQ - Agentic AI Automation with n8n — it covers the fundamentals and moves into agentic workflows, and it is WSQ-funded so most learners pay a fraction of the listed fee.

Next steps

  1. Spin up a Hostinger VPS at 20% off (2 GB plan recommended)
  2. Follow Method 1 or Method 2 above — you will be running in about 15 minutes
  3. Secure it with basic auth and HTTPS (Steps 5 and 6)
  4. Join our next WSQ n8n class and build agentic automations you can put straight into production

Disclosure: the Hostinger links in this article are referral links — using them costs you nothing extra and gets you 20% off, while supporting our free tutorials. Commands and steps were correct at time of writing; check Hostinger's and n8n's official documentation for the latest.