Skip to content

Ollama on a VPS

Run LLMs locally

Author
Ollama
License
MIT
Version
0.35.0

The script is free · VPS from $13.30 per month · installs in about 2 minutes

Install over SSH

root@vps:~# curl -fsSL https://ollama.com/install.sh | sh

  • SystemUbuntu 24.04 · x86_64ok
  • Sourcegithub.com/ollama/ollamaok
  • Version0.35.0ok
  • Port11434/tcplisten

✓ Ollama 0.35.0 installed · about 2 minutes

root@vps:~#

Install command from the library. Output is shortened and may differ on your server.

What it is

  • LLM
  • AI
  • API
  • Self-hosted

Ollama runs open language models (Llama, Qwen, Gemma, Mistral and others) on your server with a single command and provides an OpenAI-compatible API for them.

Your own model on a VPS means AI for bots and automations with no per-token fees and no data sent to external services. On a server without a GPU, models run on the CPU, so choose small models with 1–8B parameters.

The official script installs Ollama as a systemd service.

  • Hundreds of models from the ollama.com library
  • OpenAI-compatible API
  • Runs on CPU without a GPU
  • Quantized models to save memory
  • Integration with Open WebUI, n8n and Flowise

Recommended plan

For Ollama: at least 4 vCPU, 8 GB RAM and 150 GB NVMe.

Minimum to run
2 vCPU · 4 GB RAM · 20 GB disk
Systems
Ubuntu 22.04 · Ubuntu 24.04 · Debian 11 · Debian 12 · AlmaLinux 9

How to install

Three steps in the bot or one command over SSH; installation takes about 2 minutes.

  1. 01

    Choose a plan in the bot

    Open @ExpressHost_bot and pay for a VPS. The server will be ready in about 60 seconds.

  2. 02

    Add Ollama

    At the “Add-ons” step pick the script from the library, or run it later: Server settings → Scripts.

  3. 03

    Download and run a model

    ollama run llama3.2:3b

Manually over SSH

Connect to the server as root and run the command. Supported systems: Ubuntu 22.04, Ubuntu 24.04, Debian 11, Debian 12, AlmaLinux 9.

Install command
curl -fsSL https://ollama.com/install.sh | sh

Ports

Ollama ports
PortProtocolPurpose
11434tcpAPI (127.0.0.1 only by default)

After installation

  1. 1.Download and run a model: ollama run llama3.2:3b
  2. 2.List models: ollama list; API: curl http://127.0.0.1:11434/api/tags
  3. 3.To let containers (Open WebUI, n8n) reach the API, set OLLAMA_HOST=0.0.0.0 in a service override (systemctl edit ollama) and block port 11434 from the outside with a firewall

Ollama FAQ

Didn’t find an answer? Message @ExpressHost_SupportBot.

What model can a plan handle?

Models with 3–4B parameters run on 4 GB RAM; 7–8B models need about 8 GB. Without a GPU, responses are slower than in cloud services.

How do I update Ollama?

Run the install script again.

Where are the models stored?

In /usr/share/ollama/.ollama/models. Models take up gigabytes, so keep an eye on disk space.

Ollama installs at checkout — in the bot.