How to Set Up n8n on Hostinger VPS: Complete Guide
1. Install n8n on Your VPS
- Purchase any Hostinger VPS plan (KVM 2 is the most popular choice).
- After payment, you'll be redirected to the onboarding flow.
- Hostinger will automatically select the best server location for you.
- In the next step, search for the n8n template and select it.
- Create a root password for your VPS.
- Press Continue and wait for the setup to finish.
Hostinger's n8n template handles Docker and reverse proxy configuration, eliminating the need for manual server setup.
2. First Login to n8n
- Once setup is complete, open the n8n tool (via the link in your Hostinger dashboard).
- On first login, set up the owner account:
- Email address
- First name & last name
- Password
- You can now start creating workflows.
3. Workflow: Daily VPS Update Checker
A workflow that checks your VPS for package updates every day and emails you if any are found.
How It Works
Schedule Trigger (every day at midnight)
→ SSH into VPS → run: apt list --upgradable
→ Format the list as HTML
→ IF updates exist → Send email via SMTP
Steps to Build
- Schedule Trigger — Set to run every day at midnight.
- SSH Node — Connect to your VPS using SSH credentials and run:
bash
apt list --upgradable - HTML Formatter — Format the package list into readable HTML.
- IF Node — Check whether any upgradable packages were found.
- Email Node — Send the results to your email via your SMTP account.
This starter workflow keeps your VPS secure and introduces the basics of n8n triggers, SSH nodes, conditionals, and email sending.
4. Workflow: Self-Hosted Llama 3.2 AI Chatbot
Host your AI model on your VPS to chat directly inside n8n without external API keys.
Step 1: Set Up Ollama on Your VPS
Log into your VPS via SSH (use the browser terminal in hPanel).
Run a new Docker container with the Ollama image on the default network:
bashdocker run -d --name ollama --network bridge ollama/ollama
This may take a few minutes as it downloads the image. Connecting to the default network allows the n8n container to communicate with the Ollama container.
Step 2: Download and Run Llama 3.2
bashdocker exec -it ollama ollama run llama3.2
The model downloads and starts automatically.
Step 3: Connect Llama to n8n
- In n8n, add an AI Agent node to your workflow.
- Press the + button and choose Chat Model from the dropdown.
- Set up credentials:
- Base URL:
http://ollama - Port:
11434(default Ollama port)
- Base URL:
- Select model: llama3.2
- Set the trigger to On Chat Message Received.
- Press Chat and start talking to your private AI!
This example demonstrates the basics of connecting an AI agent to a private language model. You can extend it into customer support bots, content generators, data processors, and more — all running on your own infrastructure.
5. Workflow: Daily Hacker News Summary with AI
A workflow that scrapes the top 5 Hacker News stories, summarizes them with AI, and emails you the digest every afternoon.
How It Works
Schedule Trigger (every day at 4:00 PM)
→ HTTP Request (scrape Hacker News homepage)
→ Extract HTML content
→ Split & limit to top 5 stories
→ Aggregate into one request
→ AI Agent (OpenAI) summarizes each story
→ Send email via SMTP
Steps to Build
- Schedule Trigger — Run daily at 4:00 PM.
- HTTP Request Node — Fetch the Hacker News homepage.
- HTML Extract Node — Pull out the article data.
- Split + Limit Node — Keep only the top 5 stories.
- Aggregate Node — Combine into a single payload for the AI.
- AI Agent Node — Attach an OpenAI Chat Model (requires your OpenAI API key). The AI reads and summarizes each article.
- Email Node — Send the summary to your inbox.
Press the Test workflow button to run the workflow on demand. You'll see the data flow through each node in real time.
6. n8n Template Catalog
n8n includes a built-in catalog with 1,000+ ready-to-use templates.
How to Use
- Click the Templates link on the left sidebar in n8n.
- Browse or search for a workflow.
- Click Use workflow on any template.
- The template imports directly into your self-hosted instance.
- Set up the required credentials (the template tells you what's needed).
- Start using it immediately!
Quick Reference: Commands
bash# Run Ollama container
docker run -d --name ollama --network bridge ollama/ollama
# Download and run Llama 3.2
docker exec -it ollama ollama run llama3.2
Based on a tutorial by Valentinas, Head of VPS at Hostinger.