Set up OpsCrew, step by step
Written for someone who has never set up a server.
Written for someone who has never set up a server.
OpsCrew opens pull requests there for you to review, and your app deploys from GitHub Actions (opens in a new tab).
An account at Hetzner Cloud (opens in a new tab), DigitalOcean (opens in a new tab) or Contabo (opens in a new tab), where OpsCrew creates a server for you. Or a server you already have, or a Portainer (opens in a new tab) you already run.
A Cloudflare (opens in a new tab) account with your domain on it gives your app its own address. No domain yet? OpsCrew can buy one once you confirm the price.
Claude Code (opens in a new tab) with your own Claude (opens in a new tab) plan, or an Anthropic (opens in a new tab) API key for the terminal. Without either, OpsCrew still works.
Each installs on Windows, macOS and Linux. In Claude Code you need Node.js (opens in a new tab) 22 or newer with npm (opens in a new tab), and the plugin installs OpsCrew for you.
Runs OpsCrew. It comes with npx, which fetches OpsCrew for you each time.
Download Node.js (opens in a new tab)Keeps your app’s history. OpsCrew uses it to put its changes on their own branch.
Download git (opens in a new tab)Creates your server from the plan you approve, and keeps that plan as code in your repository.
Install OpenTofu (opens in a new tab)OpsCrew works in your accounts with access keys (tokens) you create there, and reads them from your terminal.
HCLOUD_TOKENHetzner Cloud
In the Hetzner Cloud Console, open your project, then Security → API tokens, and create a Read & Write token.
DIGITALOCEAN_TOKENDigitalOcean, instead of Hetzner
A personal access token with custom scopes. npx opscrew init lists the scopes to tick.
CNTB_OAUTH2_*Contabo, instead of Hetzner
Four values: the client ID and secret, your login email and an API password, from Account → Security in Contabo’s Customer Control Panel. The four values
CLOUDFLARE_API_TOKENCloudflare, for your domain
Create it in your Cloudflare profile’s API tokens, with the zone permissions the guide lists. The permissions
GITHUB_TOKENLog in once with the GitHub CLI (gh auth login), or create a fine-grained token for this repository only. The permissions
ANTHROPIC_API_KEYAnthropic, optional
For the AI steps in the terminal. Claude Code needs no extra key.
export HCLOUD_TOKEN="your token" # macOS and Linux$env:HCLOUD_TOKEN = "your token" # Windows PowerShell
Never paste a key into a chat, Claude Code’s included. OpsCrew’s plugin reads keys only from the environment.
Pick the way you like. Both work on the same files in your repository, so you can switch at any point.
Add OpsCrew’s plugin inside a Claude Code session:
/plugin marketplace add softzer0/opscrew /plugin install opscrew@opscrew
Then ask Claude to deploy your app.
Open a terminal in your app’s folder and type:
npx opscrew init
It checks what is installed and which keys are set. Each line marked ✗ says how to fix it.
The full command list is in the Quickstart, and every topic has its own page in the docs.