---
title: "Deploy Agent Zero"
description: "Self-hosted general-purpose AI agent with its own Linux sandbox"
category: "AI/ML"
url: https://railway.com/deploy/agent-zero-1
---

# Deploy Agent Zero

Self-hosted general-purpose AI agent with its own Linux sandbox

**[Deploy Agent Zero on Railway](https://railway.com/template/agent-zero-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/agent-zero-1/manifest.json

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

## Template content

### Agent Zero

- **Image:** agent0ai/agent-zero:latest
- **Public domain:** Yes

## Documentation

# Deploy and Host Agent Zero on Railway

[Agent Zero](https://github.com/agent0ai/agent-zero) is an open-source, general-purpose AI agent. It runs tasks by writing and executing code in its own Linux environment, searches the web, keeps memory between chats and can use tools and sub-agents.

## About Hosting Agent Zero

This template runs the official `agent0ai/agent-zero` image with a persistent volume at `/a0/usr` for settings, memory, chats and your files. The agent can run shell commands inside its container, so the web UI is protected by a login that is generated for you: open the service in Railway, go to Variables and read `AUTH_LOGIN` and `AUTH_PASSWORD`, then sign in with them. Do not remove these variables.

After signing in, open Settings and choose an LLM provider and enter its API key (OpenAI, Anthropic, OpenRouter, a local Ollama endpoint, etc.). No model key is included.

## Common Use Cases

- Automate research, scripting and data tasks with an agent that has a real shell
- Build long-running assistants with persistent memory
- Experiment with multi-agent workflows

## Dependencies for Agent Zero Hosting

- One service with a volume; an API key from an LLM provider (entered in the UI)

### Deployment Dependencies

- [Agent Zero on GitHub](https://github.com/agent0ai/agent-zero)
- [Docker image](https://hub.docker.com/r/agent0ai/agent-zero)

## Why Deploy Agent Zero on Railway?

Railway gives you a public HTTPS URL, a persistent volume and automatic restarts with no server to maintain, and keeps the agent in an isolated container away from your own machine.


## 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/agent-zero-1
