
Experts in the artificial intelligence industry are embracing Ollama, a free platform for running improved large language models (LLMs) on local machines. If you’re also interested in this tool, you may wonder how to use Ollama.
In this article, you’ll find a step-by-step guide that shows how to install and use this tool. By the end, you’ll know how to install Ollama manually and automatically with a VPS template.
- Ollama is an open-source platform for running improved LLMs locally.
- This platform supports GPT-3.5, Mistra, and Llama.
- You can install Ollama automatically or manually, depending on your hosting provider.
- You can manage Ollama with the command line or graphical user interface.
What is Ollama?
Ollama is a free platform for running improved LLMs on your local machine. It’s excellent for any individual or business because it supports many popular LLMs, such as GPT-3.5, Mistra, and Llama 2.
This platform offers improved privacy and security and more control over your model’s performance. It does this by simply integrating artificial intelligence (AI) capacities in your local applications.

Ollama has a user-friendly interface for managing configurations, datasets, and model weights. Thus, it makes it easier to adjust language models to specific use cases.
You can easily integrate Ollama into your web applications without relying on third-party APIs. However, you must first set it up in your hosting environment before you can achieve this integration.
Prerequisites for Installing Ollama
You’ll need a few things before you start installing Olama on your VPS. The system requirements include:
VPS hosting: To run Ollama effectively, you’ll need a virtual private server (VPS) with at least 16GB of RAM, 12GB+ hard disk space, and 4 to 8 CPU cores. You’ll need more resources for an optimum setup, especially for models with more parameters. Choose the Hostinger VPS hosting for automatic installation.
Operating system: Ollama is designed to run on Linux systems. You’ll get the best results when your hosting environment runs on Ubuntu 22.04 or any current stable version of Debian.

Access and privileges: You need access to your VPS’s terminal or command line interface to install and configure Ollama. Similarly, you’ll need root access or an account with sudo-privileges on Linux.
How to Install Ollama Using a Template on Hostinger
Hostinger makes Ollama installation simple with the pre-configured Ubuntu 24.04 VPS template. This template comes standard with the Ollama, Open WebUI/ Ollama web UI, and Llama 3 installed.
You only need to select the template on your machine and allow the automatic installer to install the programs. Then, you’ll log into your server to verify the installation.
Follow the steps below to automatically install Ollama:
- Log into your Hostinger account and access the hPanel.
- Go to the VPS section and select your VPS instance.
- Tap the Operating System -> Ubuntu 24.04 with Ollama.
- Allow the installation to complete.
- Log into your VPS using SSH to verify the installation.
With that simple process, you can start powering your web application with Ollama running on your Hostinger VPS. You won’t need to dive into the LLMs anymore because the template has all the necessary tools and software pre-installed and configured.

How to Install Ollama Manually
You mustn’t run Ollama on Hostinger. However, if you want to use your VPS with a different provider, you must install Ollama manually. These five steps below will guide you to install Ollama manually:
1. Update System Packages
Always ensure your VPS is up-to-date before installing any new software. This will help you avoid compatibility issues and ensure a smooth installation process.
Run the commands shown below in your server’s command line to update your system packages:
sudo apt update sudo apt upgrade
- sudo apt update: This command updates the list of available packages from the repositories configured on your system. It collects the latest package information, with version numbers and dependencies.
- sudo apt upgrade: This command upgrades all installed packages to their latest version. It compares the currently installed versions with the ones available in the repositories and installs any newer versions.
2. Install Required Dependencies
Ollama requires certain dependencies to run smoothly. These include:
- Python 3: The programming language Ollama is written in.
- Python 3 Pip: A package manager for Python that allows you to install additional Python code libraries.
- Git: A version control system used to download the Ollama installation script.
Run the command below to install these dependencies:
sudo apt install python3 python3-pip git Upon completion, verify your installation by checking the versions of the installed software: python3 --version pip3 --version git --version
Note: If your VPS has an NVIDIA GPU, you’ll need to install additional CUDA drivers to use the GPU’s performance. The steps for installing CUDA drivers vary depending on your server configuration.

You’ll find detailed on-screen instructions for installing on Windows on the Official NVIDIA guide for downloading the CUDA Toolkit.
3. Download the Ollama Installation Package
After updating your system packages and installing the required dependencies, the next step is to download Ollama. You can download the Ollama installation package from Ollama’s official website.
Use the following command to initiate the download from the Ollama web:
curl -fsSL https://ollama.com/install.sh | sh
- curl -fsSL https://ollama.com/install.sh: This command uses the curl utility to download the installation script from the provided URL. The -fsSL flags ensure that the download is handled correctly, even if there are redirects or errors.
- | sh: This pipes the downloaded script to the sh command, which executes the script.
This command will download and execute the installation script, installing Ollama on your VPS.
4. Run and Configure Ollama

After installing Ollama, run it with the following command:
ollama --serve
This command starts the Ollama service, making it accessible on your VPS.
Use the command below to check the status of the Ollama service:
systemctl status ollama
This command displays information about the Ollama service. You can use it to learn whether Ollama is running and find any errors that may have occurred.
Also, you can create a systemd service file to ensure Ollama starts automatically every time you boot your VPS. Follow this command to create a systmed service file:
[Unit] Description=Ollama Service After=network.target [Service] ExecStart=/usr/local/bin/ollama --host 0.0.0.0 --port 11434 Restart=always User=root [Install] WantedBy=multi-user.target WantedBy=multi-user.target
- [Unit]: This section provides general information about the service.
- Description: A human-readable description of the service.
- After=network.target: Specifies that the Ollama service should start after the network is up and running.
- [Service]: This section configures how the service runs.
- ExecStart: The command to execute to start the service.
- Restart=always: Instructs systemd to always restart the service if it fails.
- User=root: Specifies that the service should run as the root user.
- [Install]: This section defines how the service is installed.
- WantedBy=multi-user.target: Specifies that the service should be started when the system enters the multi-user run level.

After saving the file, reload the system daemon to apply the changes:
sudo systemctl daemon-reload
Then, restart the Ollama service:
sudo systemctl restart ollama
After this, Ollama will now start automatically on boot.
5. Verify the Installation
Finally, verify the installation by checking the version of Ollama:
ollama --version
This command displays the version number of the installed Ollama software.
Managing Your Ollama Installation
Using and managing Ollama is pretty simple. The platform provides a command-line interface (CLI) and a graphical user interface (GUI) for interacting with it. You can use and manage Ollama with any of these interfaces.
Ollama’s CLI provides more advanced options and controls. It allows you to configure settings, run commands, and manage custom models. On the other hand, the GUI offers a more user-friendly option. It provides a visual representation of the models and their parameters.
You can use this command to pull a model from the Ollama library:
ollama pull
For example, to pull the “llama2” model, you would run:
ollama pull llama2
Once the model is downloaded, you can start a chat session with it using this command:
ollama run
Ollama also provides many configuration options to tune performance, modify model behavior, and change server settings. You can access these options through the CLI or the GUI.
Use Cases for Ollama
Ollama opens many possibilities for developers, researchers, and AI enthusiasts. It has earned wide and popular application due to its simplicity and ease of integration.
Below are some of the most common use cases for Ollama include:
Building Custom Chatbots and Virtual Assistants
You can leverage Ollama to create chatbots and virtual assistants tailored to your specific needs. For instance, you could build a coding assistant to help with mobile and web app development. You could also produce a brainstorming partner for design projects or try to run large language models in content strategy and creation.

Fine-tuning Open Source Models
Ollama allows you to improve existing LLMs on your training data to improve their performance on specific tasks. This can help in text summarization, translation, and question answering.
Running Large Language Models Locally
Ollama makes running LLMs locally on your machine possible. This eliminates cloud dependencies and reduces costs. This application benefits industries that need data confidentiality, like healthcare and finance.
Conclusion
Ollama is a powerful platform that makes it easy to run and improve large language models locally. With its user-friendly interface and support for a variety of LLMs, Ollama provides many possibilities and opportunities for developers, researchers, and AI lovers.
Whether you’re building custom chatbots, fine-tuning a local LLM for specific tasks, or exploring the possibilities of LLMs in content strategy and creation, Ollama provides the tools you need to get started.
Are you looking for a suitable VPS hosting service for running Ollama? Explore our list of the best VPS hosting companies to find your best fit.

