Run AI on a VPS / Beginner's guide
Can't afford a powerful PC? Start running a local LLM on a VPS
A local LLM means running AI in your own environment: your data stays with you and there is no per-use charge. But a PC powerful enough to run it well (especially one with a GPU) tends to be expensive, and many people do not want to buy one just to try it. Another way to start is to rent a monthly VPS, try it, and stop if it does not suit you.
What works on a VPS, and what is hard
Works
- Chatting, summarizing, translating and rewriting with small to medium models
- Asking AI questions without sending your data outside
- Using it from a browser chat screen or your own apps
- Cleaning up just by canceling when you are done
Hard
- Running large models fast (there is no GPU)
- AI that generates images or video
- Matching the capability of large API models
- The initial setup: signing up, connecting over SSH, typing commands
How little you can start with
Small models fit on cheap plans. With our current data, the cheapest plans they fit on are (monthly billing):
| Model | Cheapest plan it fits | For a year |
|---|---|---|
| Llama 3.2 3B3.5 GB+ | ¥1,760/moKAGOYA CLOUD VPS · 4 GB | ¥21,120 |
| Llama 3.1 8B6.4 GB+ | ¥2,936/moABLENET VPS · 8 GB | ¥35,232 |
This compares fit and monthly price only, not speed. "For a year" is simply the monthly price × 12 and excludes setup fees, discounts and exchange rates. You pay every month even if you don't use it, so cancel when you stop.
The first three steps
1. Try a small model on the cheapest plan
Run a small model on the cheapest plan in the table above. It costs little and shows you whether it works and whether it is useful.
2. If it is not enough, move up one plan
If the model is heavy or long conversations stop partway, switch to a plan with more memory. Some providers let you upgrade without re-signing up. See a starting point for each model.
3. Cancel when you no longer use it
Since it is rented monthly, stopping ends the cost. The model files disappear with the server.
Words worth knowing
Short explanations of the terms used on our AI pages. You don't need to memorize them to start; come back when you meet one you don't know.
- VPS
- A slice of a large server that you rent monthly as your own. You choose the OS and install any software you like.
- LLM (large language model)
- An AI model trained on large amounts of text that generates text. ChatGPT runs on this kind of model.
- Local LLM
- Running an LLM in your own environment (your PC or a VPS you rent) instead of someone else's service. What you type does not leave it.
- Model
- The trained AI itself: a file of a few GB to tens of GB. You download it by name with Ollama. Larger models tend to be smarter but need more memory. More
- Parameters (8B etc.)
- The values inside a model that were tuned by training. "8B" in a model name means about 8 billion of them.
- Quantization
- Reducing the precision of a model's numbers to make the file smaller, sometimes at a small cost in answer quality. Our memory estimates use the size of the version Ollama distributes by default.
- Token
- The unit an AI uses to handle text: a chunk of a word or characters. How many characters make a token depends on the model.
- Context length
- How much (in tokens) the AI can read at once. Longer lets it handle long conversations and documents, but uses more memory.
- Ollama
- Software that downloads and runs models. On Linux it installs with one command. More
- GPU and CPU
- A GPU is a chip that is good at AI calculations. The VPSs we compare have no GPU, so the CPU does the work, which is much slower than a GPU.
- Memory (RAM)
- Where the model sits while it runs. If the model does not fit in memory, it will not run. This is the most important number when choosing a plan. More
- Swap
- Using disk in place of memory when memory runs short. It is a safety net against crashing, but makes things very slow.
- SSH
- A way to connect to and operate a server from your PC over an encrypted connection. You manage a VPS mostly through it.
- Port
- A number on a server's entrance. Ollama uses port 11434 by default.
- SSH tunnel
- Using an SSH connection to reach a UI or API that runs only inside the server from your own PC. No port needs to be opened, so our steps recommend this. More
- API
- An entry point for calling the AI from programs. Ollama can also be called in the same format as OpenAI, which makes it easy to use from existing apps. More
- Open WebUI
- Software that gives you a ChatGPT-like chat screen in the browser. More
- RAG
- Searching your own documents and passing only the relevant parts to the AI to answer from. The model that turns documents into searchable numbers is called an embedding model. More
Common worries
Do I need to know how to program?
If you can copy and run commands, you can follow along. The commands in our steps work once you replace the user name and IP address.
Will I waste money if it doesn't work out?
A VPS is rented monthly, so once you cancel there are no further charges. Start with the cheapest plan and a small model. Some providers also offer a trial (check each provider's official terms).
Will it be as fast as ChatGPT?
Not on a VPS without a GPU (the chip that is good at AI calculations). We do not measure speed, so we cannot say how many seconds it takes. Try a small model first and see whether the speed is acceptable for your use.
When is buying a powerful PC the better choice?
If you want to run large models fast or generate images, a PC with a GPU or a dedicated environment suits you better. This guide covers what runs on CPU and memory alone.