You can install Ollama on a Hostinger VPS two ways: with Hostinger’s one-click Ollama template, or manually with the official install script. The template is fastest — it provisions Docker, Ollama, and Open WebUI with the Llama 3.1 model preconfigured. The manual route gives you full control over versions and models.
Ollama runs large language models locally on your server, so your prompts never leave your VPS and there are no per-token API bills. The trade-off is hardware: models need plenty of RAM, and bigger models need a lot of it. This guide covers both install methods, how to pull models, how much RAM you actually need, and how to keep your Ollama instance secure.
Prerequisites
- A Hostinger VPS with Ubuntu (22.04 or 24.04). For the template method you will switch the OS to the Ollama application template; for the manual method any Ubuntu install works.
- Enough RAM for the models you want (see the sizing table below). As a rule of thumb, Hostinger’s own tutorial recommends a KVM 4 plan (4 vCPU, 16 GB RAM) for comfortable LLM hosting.
- At least 5–10 GB of free disk space for the first models; model files range from about 2 GB for small models to 40+ GB for large ones.
Method 1 – One-click Ollama template (easiest)
- Log in to your Hostinger dashboard and go to VPS, then click Manage on your server.
- In the left sidebar, go to OS & Panel → Operating System.
- In the Change OS section, open the Application tab and choose Ollama.
- Confirm the change in the pop-up (acknowledge that the OS will be replaced) and set a new password for the template when asked.
- Wait for the installation to complete — Hostinger’s guide notes this takes around 10 minutes.
- Once done, open the Manage App option to reach Open WebUI, then access the dashboard at
http://YOUR-VPS-IP:8080in your browser. - Create your Open WebUI account on first visit and store the credentials somewhere safe.
Method 2 – Manual install with the official script
Use this method when you already have a VPS with data on it, or you want a specific Ollama version. Connect via SSH or the browser terminal in your VPS dashboard, then:
- Update your package lists:
sudo apt update - Download and run Ollama’s official installer:
The install usually finishes in under a minute. On a CPU-only VPS you may see a warning that no GPU was detected — that is normal and just means responses will rely on the CPU.curl -fsSL https://ollama.com/install.sh | sh - Verify the installation:
ollama --version - Check that the Ollama service is running:
If it is not active, start it withsystemctl status ollamasudo systemctl start ollamaand enable it at boot withsudo systemctl enable ollama.
Pulling your first model
Ollama ships without models — you download (“pull”) the ones you want from Ollama’s model library:
- Pull a model, for example Llama 3.2:
The download size depends on the model; small models are a couple of gigabytes.ollama pull llama3.2 - List installed models:
ollama list - Run a quick test conversation:
Then type a short prompt, such as “Write a haiku about web hosting,” and press Enter. Typeollama run llama3.2/byeto exit the chat.
Popular starting models include llama3.2 (general purpose), gemma3 (efficient), deepseek-r1 (reasoning), and qwen3 (multilingual). Model names on Ollama’s library page sometimes include size tags like llama3.2:3b or llama3.1:8b — the number is the parameter count, and bigger means smarter but hungrier.
RAM guidance: which VPS for which model
Model size is the main thing that decides your VPS plan. Use this as a starting point:
| Model size | Example models | RAM needed | Suggested VPS |
|---|---|---|---|
| 1–3B parameters | llama3.2:1b, qwen3:1.7b | 4 GB | KVM 1 and up |
| 7–8B parameters | llama3.1:8b, gemma3:4b | 8 GB | KVM 2 and up |
| 13–14B parameters | qwen3:14b | 16 GB | KVM 4 |
| 27B+ parameters | gemma3:27b | 32 GB+ | KVM 8 or GPU plans |
These are practical minimums for usable speed, not bare boot minimums — a model that technically loads on 4 GB may still answer painfully slowly. CPU-only inference is much slower than GPU inference, so keep expectations realistic: a VPS is great for chat, drafting, and automation, but not for serving a busy public app. If responses are too slow, drop to a smaller quantized model rather than fighting the hardware.
Secure your Ollama instance
Ollama’s API listens on port 11434, and an exposed Ollama server can be abused by strangers to run models on your bill of electricity — so lock it down:
- Do not expose port 11434 to the internet. By default, keep Ollama bound to localhost so only processes on the VPS itself can reach it.
- Use the VPS firewall. In your VPS dashboard, confirm that only the ports you actually need (SSH, and 8080 if you run Open WebUI behind a login) are open to the world.
- Put Open WebUI behind authentication. The template’s Open WebUI asks you to create an account — do not skip this, and use a strong password.
- Keep the system updated with regular
apt update && apt upgraderuns, and update Ollama itself by re-running the install script when new releases come out.
Optional: add the Open WebUI dashboard
If you installed manually and want the browser interface the template includes, you can add Open WebUI yourself with Docker:
docker run -d -p 8080:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
Then open http://YOUR-VPS-IP:8080, create your admin account, and connect it to your local Ollama instance. This is the same dashboard the one-click template provisions for you.
Troubleshooting
“Error: could not connect to Ollama” when running a model. The service is not running. Start it with sudo systemctl start ollama and check status again.
Model downloads are extremely slow. Model files are large and come from Ollama’s CDN; speed varies. Let it finish rather than interrupting — partial downloads resume.
Out of memory / killed process. Your model is too big for the VPS RAM. Pull a smaller model (e.g. switch from an 8B to a 3B) or upgrade the VPS plan. Check free memory with free -h before pulling.
Open WebUI shows a blank page. Confirm the container is running (docker ps), that port 8080 is open in the VPS firewall, and that you are using http://, not https://, for the IP address URL.
FAQ
Can I install Ollama on Hostinger shared hosting?
No. Ollama needs root access and significant RAM, so it requires a VPS. Shared hosting does not give you the server-level access or resources to run language models.
How much does it cost to run Ollama on a Hostinger VPS?
Ollama itself is free and open source — you only pay for the VPS. Small models run fine on entry-level VPS plans, while 8B+ models realistically need a plan with 8 GB of RAM or more. There are no per-token fees since everything runs locally.
Do I need a GPU to run Ollama on a VPS?
No, Ollama runs on CPU-only servers, but responses are slower than on GPU hardware. For casual chat, drafting, and automation workloads a CPU VPS is perfectly usable; just choose smaller models to keep speed reasonable.
Is it safe to expose my Ollama server to the internet?
Not without protection. Keep port 11434 bound to localhost, use the VPS firewall to limit open ports, and if you run Open WebUI, protect it with its built-in account login. An open Ollama API lets anyone run models on your server.
