---
title: "Deploy LocalAI"
description: "OpenAI-compatible API to run open models on CPU, with a web UI"
category: "AI/ML"
url: https://railway.com/deploy/localai-2
---

# Deploy LocalAI

OpenAI-compatible API to run open models on CPU, with a web UI

**[Deploy LocalAI on Railway](https://railway.com/template/localai-2)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/localai-2/manifest.json

- **Creator:** zer0person's Projects
- **Category:** AI/ML
- **Total deploys:** 1

## Template content

### LocalAI

- **Image:** localai/localai:latest
- **Public domain:** Yes

## Documentation

# Deploy and Host LocalAI on Railway

[LocalAI](https://github.com/mudler/LocalAI) is a self-hosted, OpenAI-compatible API for running open-source LLMs, image, audio and embedding models on your own hardware.

## About Hosting LocalAI

This template runs the official CPU image `localai/localai:latest` with a persistent volume at `/models`, so downloaded models survive redeploys. Railway has no GPU, so use small quantized models. On first visit open the web UI, go to the model gallery and install a model, then call it at `/v1/chat/completions` like any OpenAI endpoint.

## Common Use Cases

- Point OpenAI-compatible apps at your own endpoint
- Run small quantized models and embeddings without a third-party API
- Try models from the built-in gallery

## Dependencies for LocalAI Hosting

- One service with a volume; no external database

### Deployment Dependencies

- [LocalAI on GitHub](https://github.com/mudler/LocalAI)
- [Docker image](https://hub.docker.com/r/localai/localai)

## Why Deploy LocalAI on Railway?

Railway gives you a public HTTPS URL, automatic restarts and no server to maintain. Models are large: pick small ones, as CPU inference on Railway is slow.


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius v0.1 Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/localai-2
