Skip to content

The OpsCrew guide

One topic per page. Start with the Quickstart if you have not deployed an app yet.

npx opscrew providers lists the cloud server providers, Cloudflare and the domain registrars OpsCrew works with, one line each, with the variables each one needs. npx opscrew providers --json prints them as a catalogue for tools, such as a guided start:

  • For each provider: its kind, name, sign-up, console, pricing and guide pages, and its credentials: the variables, which ones are secrets, where to create them and how, in the words npx opscrew init uses.
  • For a cloud server provider: its currency, how it bills, its locations, and its sizes with their prices from OpsCrew’s dated built-in price list.
  • Suggestions: the size design picks on each cloud provider for a small web app with PostgreSQL, and where it sends a static site.

It reads no token, no project and no network, so one OpsCrew version always prints the same catalogue. Its schema is provider-catalogue.schema.json.

Everything OpsCrew sets up is a plain file in your repository, which you can read, change and keep. For an app deployed to a new server, the main ones are:

your-app/
├── Dockerfile your app's image, when OpsCrew writes one
├── .github/
│ ├── workflows/opscrew-deploy.yml the deploy workflow
│ ├── workflows/opscrew-check.yml the scheduled check
│ └── dependabot.yml Dependabot's update proposals
└── opscrew/
├── architecture.json what analyze found in your app
├── ARCHITECTURE.md the same, for people
├── plan.yaml the setup you chose
├── infra/prod/ the server, firewall and DNS as OpenTofu code
├── runtime/compose.yaml what runs on the server
├── secrets.sops.json the recovery copy of your secrets, encrypted to your key
├── SECURITY_REPORT.md the last security check
└── RUNBOOK.md how to reach, back up and remove the deployment

Another environment keeps its own plan, runbook, security report, runtime files and recovery copy under opscrew/environments/<env>/, and its infrastructure code under opscrew/infra/<env>/ (environments).

Commit the plan with the files that come from it: npx opscrew drift reports generated files whose plan isn’t committed. Keep the project in a folder that isn’t temporary: npx opscrew provision warns when it runs from the system’s temporary folder, which the system may clear.

The plan records which OpsCrew version last wrote the generated files (deployment.generatedBy), and npx opscrew drift shows it as a note. A build of OpsCrew between two releases names itself <version>-dev.<commit>, so its files never pass for a release’s. The generated files themselves don’t name the version, so upgrading OpsCrew alone changes none of them.