Linux Setup

Deploy Locus agents on a Linux server with systemd.

This guide covers deploying Locus agents on Ubuntu/Debian with systemd services for automatic startup and background execution.


Requirements

  • Ubuntu 20.04+ or Debian 11+

  • sudo access

  • 2 GB+ disk space

  • Internet access for package installation


Automated Setup

Run the installer and follow the interactive prompts:

curl -fsSL https://locusai.dev/install.sh | bash

The script will guide you through configuring:

Setting
Description
Required

Repository URL

GitHub repository to clone

Yes

Branch

Branch to checkout (default: main)

No

Locus API Key

Your Locus API key

No

GitHub Token

GitHub personal access token

No

Telegram Bot Token

Token from @BotFather

No

Telegram Chat ID

Chat ID for authorization

No

Press Enter to skip any optional field.

chevron-rightNon-interactive usage (for scripted/automated deployments)hashtag

You can pass all parameters as flags to skip the interactive prompts:


What the Script Does

The setup script performs these steps in order:

  1. System dependencies — Installs build tools, curl, git

  2. Node.js — Installs via nvm

  3. Bun — Installs the Bun runtime

  4. GitHub CLI — Installs and authenticates gh

  5. Claude CLI — Installs Anthropic's Claude agent

  6. Locus CLI — Installs @locusai/cli globally

  7. Locus Telegram — Installs @locusai/telegram globally

  8. Clone repository — Clones your project to ~/locus-workspace/

  9. Initialize Locus — Runs locus init and locus config setup

  10. Telegram service — Creates systemd service for the bot

  11. Locus agent service — Creates systemd service for the agent


Systemd Services

Two services are created:

Telegram Bot Service

Locus Agent Service

circle-info

Both services are configured to start automatically on boot and restart on failure.


Manual Setup

If you prefer manual installation, follow these steps:

chevron-rightStep-by-step manual setuphashtag

Last updated