How To Install Ollama on Hostinger VPS: Free AI Models for n8n (No API Costs)
October 30, 2025 · Mike Murphy
Learn how to install Ollama in a Docker container on your Hostinger VPS with persistent storage. Perfect for using local AI models in n8n workflows without API costs. Complete beginner-friendly guide for non-developers.
Description
Learn how to install Ollama in a Docker container on your Hostinger VPS with persistent storage. Perfect for using local AI models in n8n workflows without API costs. Complete beginner-friendly guide for non-developers.
What You Will Learn (How):
Ollama is like a mini AI server that runs models locally. Think of it as your personal ChatGPT, but it lives on your VPS instead of OpenAI’s servers.
- Install Ollama in Docker with persistent model storage
- Create a private Docker network (so it can talk to other containers later)
- Downloading and manage Ollama AI Models
- Verify setup is not exposed to public internet
Why Install Ollama on VPS?
- Use Local & Private AI models in n8n Workflows for free!
- RAG Chat Interfaces, summaries, article writing, data extraction
- No API Costs!
- Beginner-friendly (no developer skills)
Heads Up:
- Ollama models are local (not connected to internet)
- Ollama models are pre-trained (knowledge contained
- Running a large language model will be resource-heavy on VPS
Prerequisites:
- Hostinger VPS with Ubuntu OS
- Docker & Docker Compose installed
- 5GB Free Hard Disk Space
Cheatsheet (Snippets):
📁 Tutorial Resources & Code:
https://dub.sh/ollama_1
Hostinger VPS:
https://mikemurphy.co/vps
Ollama:
https://olama.com
Tutorials:
How To Safely Update n8n on Hostinger VPS (Without Losing Your Workflows)
https://youtu.be/9-u3BGl0ubU
How To Update n8n:
https://youtu.be/tsSo9tC8J3g
Ollama Desktop App:
https://youtu.be/vkhuduZWOIw
Ollama Models:
llama 3.2:latest
qwen 2.5:0.5b (good for KVM1 Plan)
gemma2:2b
Chapters:
00:00 About The Tutorial
00:28 In Part 1 of Tutorial
01:15 In Part 2 of Tutorial
01:50 VPS Account + LLM Performance
02:54 Prerequisites For Tutorial
03:24 What Is Ollama?
04:04 Confirm Unbuntu OS
04:24 VPS + Network Overview
05:18 n8n Update Tutorial
05:51 VPS Browser Terminal
06:04 Step 1: Docker & Docker Compose
06:38 Ask Kodee (ChatBot)
07:06 Step 2: Create Project Folder
08:28 Step 3: Create Shared Docker Network
09:10 Verify Network Settings
09:33 Shared Docker Network Overview
09:53 Step 4: Create Docker-Compose YAML
10:17 pwd = print working directory
10:49 docker-compose.yml Overview
11:57 Create Docker-Compose File
12:25 Nano Text Editor
13:34 Write Out Sequence (Nano)
15:08 Verify File Was Created
15:37 Step 5: Start Docker Container
16:28 Step 6: Ollama Models
17:02 Pull (Download) Ollama Models
18:03 Pull llama3.2:latest
19:20 Fun Llama Facts!
20:03 /bye
20:37 qwen model (KVM1 Plans)
20:58 Name of Models
22:41 Remove (Delete) Models
23:58 Step 7: Security Check
24:38 Step 8: Inspect Setup
25:57 Docker Manager
26:59 Recap & Preview
Step-by-Step (Ollama Setup on VPS):
- Sign in to the Hostinger dashboard and open the Terminal.
- Confirm Docker and Docker Compose are installed
- Create a dedicated project folder for Ollama (mkdir)
- Navigate into Ollama Directory (cd)
- Create the shared Docker network called ‘App-Net’
- Create the docker-compose.yml file using Nano editor
- Paste the configuration content (defining the container, network settings, volume storage)
- Save (Write Out) of Nano (Control+O). Press Return. Exit (Control + X)
- Launch the Ollama Docker container in the background
- Confirm Ollama is running using docker.ps
- Pull in Llama 3.2 Models
- Run a security port check to ensure ports are not exposed externally