AI/ML

Host LocalAI on VeloxaHost

LocalAI is a self-hosted inference server with an OpenAI-compatible API: it runs language models, embeddings, image generation and speech-to-text on your own server, and existing OpenAI client libraries can talk to it by changing the base URL. Developers run it to keep prompts and data on their own infrastructure or to test against a local endpoint.

The one-click install downloads the LocalAI v4.11.0 binary from LocalAI's GitHub releases to /usr/local/bin/local-ai, creates a localai system user with /var/lib/local-ai and a models folder in it, and runs LocalAI as the localai systemd service under that user with local-ai run --address 0.0.0.0:8080 --models-path /var/lib/local-ai/models. The API and web interface are on port 8080. The service reads an API key from /etc/localai.env, a file only root can read, so every request needs the key. No model is installed yet. v4.11.0 was LocalAI's latest release at this page's check.

The API key

Without a key, LocalAI's API is open: anyone who reaches the port could run models on your server and install new ones. LocalAI's authentication docs describe API keys set with LOCALAI_API_KEY: once one is set, every request must carry it. The install sets one for you. The key is the generated password shown on the server's page: VeloxaHost replaces the install script's placeholder with a random value at deploy time and stores it encrypted; organization owners and admins can reveal it there, and every reveal is recorded in the audit log.

Clients send it as Authorization: Bearer <key>, the same header OpenAI's libraries use, and the web interface asks for it on its sign-in screen. A key set this way has full admin access, so treat it like a root password. To change it, edit /etc/localai.env and systemctl restart localai; several keys can be given, separated by commas.

Adding a model

LocalAI installs models from its gallery, from Hugging Face or from an OCI registry. The simplest route is the web interface's Models, Explore page: open LocalAI's address (see below), sign in with the key, and install a small model to start, such as llama-3.2-1b-instruct:q4_k_m from LocalAI's own examples. Models are stored in /var/lib/local-ai/models; delete a model's files there to remove it.

What it needs

VeloxaHost servers have no GPU, so inference runs on the CPU. LocalAI runs without one ("No GPU required"), but speed and memory depend on the model's size and quantisation, and LocalAI's docs give no fixed figures. A model's weights have to fit in memory with room to spare, so check each model's size in the gallery before installing it. The catalogue's minimum is 4 vCPU and 4 GB. The recommended 4 vCPU and 8 GB suits small quantised models: it is the Veloxa 4 size, with 4 vCPU, 8 GB RAM and 160 GB of disk for $30 a month, billed at $0.05 an hour and capped at the monthly price. For larger models, the Veloxa 8 has 8 vCPU and 16 GB for $60 a month ($0.09 an hour), and you can raise CPU and memory from the console: on a container the change applies without a restart.

Reaching it on VeloxaHost

Every server gets a block of ports (10 by default) on the region's shared IPv4 address. The first forwards to SSH; under How to connect on the server's page, forward another to 8080 and point an OpenAI client at http://<shared address>:<port>/v1. The connection is plain HTTP, so the key crosses the network unencrypted; for HTTPS on port 443, use a dedicated IPv4 address (a paid add-on with limited availability) with Caddy or Nginx in front of port 8080. IPv6 is not available in US East yet.

Backups and updates

Models and LocalAI's data are in /var/lib/local-ai. Models are large and can be downloaded again, so a snapshot mainly saves you the download time. Turn on automatic snapshots on the server page (hourly up to weekly, kept for 1 to 30 days) or scheduled backups (every 6 hours up to weekly, keeping 1 to 10).

To update, take a snapshot, download the newer local-ai-v<version>-linux-amd64 file from LocalAI's releases page over /usr/local/bin/local-ai, and systemctl restart localai. Read the release notes first.

FAQ

Can I use the OpenAI SDK with LocalAI?

Yes. LocalAI implements OpenAI's API, so point the SDK's base URL at your server's /v1 and pass your LocalAI key as the API key. Use the model name you installed.

Where do I find the API key?

On the server's page: it is the generated password VeloxaHost shows there. It is also in /etc/localai.env on the server.

How fast is it without a GPU?

It depends on the model's size and quantisation. LocalAI's docs give no figures and point to llama.cpp's benchmarks. Try a small model first and raise CPU from the console if you need more.

LocalAI or Ollama?

Both run models on your own server. LocalAI focuses on an OpenAI-compatible API across text, images, audio and embeddings; Ollama focuses on running language models with a simple command line. Both are one-click apps here.

What license is LocalAI under?

LocalAI is released under the MIT License. Each model you install has its own license.

Which VeloxaHost size fits LocalAI?

The recommended 4 vCPU and 8 GB of RAM is a Veloxa 4: 4 vCPU, 8 GB RAM and 160 GB of disk for $30 a month, billed at $0.05 an hour and capped at that price.