Why Self-Host?
Why self-hosting Locus agents is recommended and how to get started.
The Problem with Running AI Agents Locally
When you run AI coding agents like Claude or Codex on your development machine, they typically operate in interactive mode — you see what they're doing, approve file changes, and maintain control.
But on a server, these agents need to run autonomously. This means:
Claude CLI and Codex CLI skip permission prompts and run in dangerous mode by default when running non-interactively. This means they can read, write, and execute anything on the machine without asking for approval.
This is powerful for automation, but it also means you need to control the environment carefully.
Why Self-Host?
Self-hosting gives you:
Full Control Over Your Code
Your source code stays on your infrastructure. Locus only syncs task metadata (titles, descriptions, statuses) with the cloud — never your codebase.
24/7 Agent Availability
With self-hosted agents, you can:
Dispatch tasks from the dashboard and have them executed automatically
Control everything from Telegram while away from your desk
Run agents around the clock without keeping your laptop open
Isolated Environment
Running on a dedicated server means:
Agents can't interfere with your local development environment
You can limit filesystem access and network permissions
Crashes or runaway processes don't affect your workstation
Security Considerations
Since AI agents run in dangerous mode (no permission prompts) on servers, follow these practices:
Dedicated user account — Run agents under a restricted user, not root
Repository-scoped access — Only give agents access to the specific repository they need
GitHub token scope — Use fine-grained tokens with minimum required permissions
Network restrictions — Consider firewall rules to limit outbound access
Monitor logs — Review agent output regularly via Telegram or log files
Chat ID restriction — Always configure the Telegram bot's chat ID to restrict access to your account only
Getting Started
Locus provides automated setup scripts for:
Quick Install
The installer is interactive — just run the command and follow the prompts:
You'll be guided through entering your repository URL, API key, GitHub token, and optional Telegram configuration. The installer auto-detects your OS (Linux or macOS) and runs the appropriate setup script.
You can also pass all parameters as flags for non-interactive (scripted) usage:
What Gets Installed
Node.js 22+
JavaScript runtime
Bun
Fast JavaScript bundler/runtime
GitHub CLI (gh)
GitHub operations
Claude CLI
Anthropic's AI agent
Locus CLI
@locusai/cli
Locus Telegram
@locusai/telegram (if configured)
Repository clone
Your project code
System services
Background processes for agent and bot
Last updated