Skip to main content
Outcome: your agent installs Levelrail on a fresh server over SSH, you approve the sign-in yourself, and the agent then reads and deploys through MCP under a scoped token.
Before you start: a Linux server you can SSH into as root or a sudo user (What you need), an agent that can run shell commands (Claude Code, Cursor or similar), and ports 80 and 443 open. You choose the admin password. The agent never needs it.
1

Install on a fresh server over SSH

Paste this into your agent. Replace the address.
To check the script first, use the verified download in Getting started instead. Back up /var/lib/levelrail-data/master.key afterwards.
2

Sign in from your machine

On your own machine, with levelrail-cli installed (Installing just the CLI):
It prints a code. Approve it in the dashboard. The agent does not approve sign-ins for itself.
3

Create a read-only token for the agent

Copy the token once, it is not shown again. read is the default. Give an agent token an agent name so AI control can govern it. A fresh instance starts with agents off, so set a mode first:
4

Connect over MCP

Use cursor, vscode or zed for those clients. It prints a JSON block with a token placeholder and read-only mode. Paste it into the client’s MCP config and put your token in APP_API_TOKEN. Details: Connect an AI assistant safely and AI assistant integration.
5

Deploy a first app

Writes need a wider token and mode. Create a second token with --abilities read,deploy, set levelrail-cli ai-control set --mode operate, then paste:

Verify it works

Ask the agent to run whoami and list_apps through MCP. With a read-only token it should see read tools only. From a terminal:
Expected: the app is healthy and the audit log shows what the agent did.

Next steps

AI control

Set what agents may do on your instance.

Working with AI agents

The Levelrail skill and agent workflows.
Last modified on November 27, 2026