Loading...

Bluehost Self-Managed VPS: Reimage Your Server for Ollama Installation

Ollama is a tool that lets you run large language models (LLMs) locally on your own computer, instead of relying on cloud-based AI services. Ollama makes it easy to download, run, and interact with AI models, such as chatbots, entirely offline.

How Ollama works

  • Runs AI models locally (Mac, Linux, Windows support)
  • No internet required after model download
  • Simple command-line interface
  • Privacy-friendly (your data stays on your machine)
  • Optimized for consumer hardware

What models can Ollama run?

Ollama supports many popular open-source LLMs, for example:

  • Llama 2 / Llama 3
  • Mistral
  • Gemma
  • Phi
  • Code-focused models (for programming help)

Install Ollama from the Bluehost Portal

  1. Log in to your Bluehost Portal.
  2. Click Hosting in the left-hand menu.

    Bluehost Portal - Hosting Tab
     

  1. Click the Manage button on the Self-Managed VPS package.

    BH AM - Select Server - Manage
     

  2. Navigate to the Server Image section, then click the Reimage button.

    BH AM - Manage Server - Server Image- Reimage
     

  3. In the Reimage server page, select Applications.

    BH AM - Manage Server - Applications tab
     

  4. From the list of available applications, find Ollama and click Select.

    BH AM - Install - Ollama
     

  5. On the pop-up message, type reimage in the field, then click Proceed.

    install ollama popup
     

  6. Wait for a few seconds to complete the installation.

How to Get and Set Up Ollama

  1. Log in to your server via SSH.
    When you log in to your server for the first time, you're greeted with a welcome message that includes all the essential commands and instructions for managing Ollama. The content looks like this:
    
    Welcome to Ubuntu 24.04.4 LTS (GNU/Linux 6.8.0-111-generic x86_64)
    ********************************************************************************
    Ollama is running on this server.
    
    The UFW firewall is enabled.
    All ports are BLOCKED except 22 (SSH) and 11434 (Ollama API).
    
    API endpoint:
      http://localhost:11434
    
    Common commands:
      ollama list                  # list downloaded models
      ollama pull llama3.2         # download a model (~2GB)
      ollama pull tinyllama        # download a small starter model (~637MB)
      ollama run tinyllama         # start an interactive chat session
    
    REST API examples:
      curl http://localhost:11434/api/version
      curl http://localhost:11434/api/tags
      curl -X POST http://localhost:11434/api/generate \
           -d '{"model":"tinyllama","prompt":"Hello","stream":false}'
    
    On the server:
      Models are stored in /var/lib/ollama/.ollama/models
      Service config: /etc/systemd/system/ollama.service.d/override.conf
    
    For more details please see /root/README.md
    
    To delete this message of the day: rm -rf /etc/update-motd.d/99-ollama
        
  2. Check installed and available models via the CLI.
    ollama list
    Example Output:
    
    NAME        	ID          	SIZE    MODIFIED
    tinyllama   	sha256:e5562a3b…	637 MB  3 minutes ago
        
  3. Pull a model (tinyllama is preinstalled on first boot):
    ollama pull llama3.2
    Example Output:
    
    pulling manifest
    pulling 2.0 GB model
    ...
    success
        
  4. Start an interactive session with a model:
    ollama run tinyllama
    Example Output:
    
    >>> Hello, how can I help you today?
    (type /exit to quit)
        
  5. Remove a model to free up disk space:
    ollama rm tinyllama
    Example Output:
    
    Deleted model 'tinyllama'
        
  6. Interact with the Ollama REST API
    • Check Ollama version:
      curl http://localhost:11434/api/version
      Example Output:
      
      {"version": "0.1.25"}
              
    • List available models (tags):
      curl http://localhost:11434/api/tags
      Example Output:
      
      {"models":[{"name":"tinyllama","modified_at":"2024-06-18T10:17:22.093Z"}]}
              
    • Generate a non-streaming completion:
      
      curl -X POST http://localhost:11434/api/generate \
           -H 'Content-Type: application/json' \
           -d '{"model":"tinyllama","prompt":"Why is the sky blue?","stream":false}'
              
      Example Output:
      
      {"response":"The sky looks blue because of the way sunlight interacts with Earth's atmosphere...","model":"tinyllama",...}
              
    • Start a chat session via API:
      
      curl -X POST http://localhost:11434/api/chat \
           -H 'Content-Type: application/json' \
           -d '{"model":"tinyllama","messages":[{"role":"user","content":"Hello"}]}'
              
      Example Output:
      
      {"message":{"role":"assistant","content":"Hello! How can I help you?"}, ...}
              
  7. Model storage location
    Models are stored in
    /var/lib/ollama/.ollama/models

    Before pulling large models, make sure you have sufficient disk space (7B models may need 4-8 GB free space).

  8. Service config and logs
    • Service configuration is at
      /etc/systemd/system/ollama.service.d/override.conf
    • For logs or troubleshooting, see:
      cat /root/README.md

Additional Information and Example Documentation Output

You can run cat /root/README.md to see more information and useful commands:

Example Output:

root@12-1-1-123:~# cat /root/README.md
# Ollama

## Description

Ollama is a platform that lets you run and manage AI models locally on
your server with full control and privacy. It makes it easy to
download, deploy, and interact with large language models, enabling
you to build AI-powered applications, automate tasks, and process data
without relying on external services.


## Services

Service    | Ports   | Purpose
-----------|---------|---------
ollama API | 11434   |
OpenSSH    | 22      | SSH

Ports are protected using ufw. Port 11434 is open to allow external API access.


## How-to-use

On first boot the image will automatically pull **tinyllama** (~637 MB) as a starter
model so the API is ready to use without any manual steps.

### Interacting via CLI

SSH into the server and use the `ollama` command:

```bash
ollama list                    # list downloaded models
ollama pull llama3.2           # pull a model (~2 GB)
ollama pull tinyllama          # pull a small model (~637 MB)
ollama run tinyllama           # start an interactive session
ollama rm tinyllama            # remove a model
```

### Interacting via REST API

The API is accessible from outside the server on port 11434:

```bash
# Check version
curl http://localhost:11434/api/version

# List available models
curl http://localhost:11434/api/tags

# Generate a completion (non-streaming)
curl -X POST http://localhost:11434/api/generate \
     -H 'Content-Type: application/json' \
     -d '{"model":"tinyllama","prompt":"Why is the sky blue?","stream":false}'

# Chat endpoint
curl -X POST http://localhost:11434/api/chat \
     -H 'Content-Type: application/json' \
     -d '{"model":"tinyllama","messages":[{"role":"user","content":"Hello"}]}'
```

### Model storage

Models are stored in `/var/lib/ollama/.ollama/models`. Ensure your volume has
sufficient space before pulling large models (7B parameter models are typically 4-8 GB).


## Links

Documentation: [https://docs.ollama.com/](https://docs.ollama.com/)

Summary

Ollama becomes even more powerful when paired with a Bluehost Self‑Managed VPS. Running models on a VPS gives you dedicated resources, full control over configuration, and the flexibility to scale beyond a local machine—while still keeping your AI environment private. With Ollama deployed on a self‑managed VPS, teams can experiment, prototype, or support internal tools with consistent performance and greater reliability. Together, Ollama and a Bluehost VPS create a practical path to owning your AI stack—secure, customizable, and built on infrastructure you control.

Loading...