Skip to content

API Keys

Automation Keys authenticate CI/CD pipelines. Two settings control what a key can reach:

  • Operations are what the key can do: deploy an application, restart containers, run a shell command, read secrets.
  • Scope is what the key can act on: the servers, registry credentials, and secret projects on the key.

A key can also carry an IP allowlist and a rate limit.

Operation ids read as resource:verb. The dashboard groups them and marks each one with a risk level.

OperationDashboard labelWhat the key can doRisk
application:deployDeployDeploy an application.standard
deploy_session:openOpen a deploy sessionOpen a short-lived deploy session. A CI workflow that builds and runs the containers itself uses the session to sync proxy routes.elevated
container:restartRestart containersRestart the containers of an application.standard
server:execRun shell commandsRun a shell command on a server.critical
server:terminalOpen a terminalOpen an interactive terminal session on a server.critical
server:rebootReboot serversReboot a server. Every container on the server stops.critical
secret_session:openRead secretsOpen a short-lived, read-only secret session for one CI run.critical
registry:loginRegistry sign-inSign in to a container registry on a server.standard
registry:logoutRegistry sign-outSign out of a container registry at the end of a workflow run.standard

The risk level tells you what a leaked key costs you:

RiskMeaning
standardReads, and routine writes that a deployment does anyway.
elevatedChanges or destroys state that a person would want to review.
criticalRuns arbitrary code, or reads production credentials.

Two operations need more than the operation itself. registry:login reads the allowed registry credentials on the key. secret_session:open reads the secret projects granted to the key.

secret_session:open lets a key open a short-lived, read-only secret session for one CI run. The session reads only the secret projects granted to that key.

An automation key can never create, change, roll back, or delete a secret. Grant each secret project on its Access tab. See Secrets in CI.

The server scope does not narrow this operation, because a secret session targets no server.

Keys created before this change hold flat names such as deploy and exec. Reoclo accepts those names as aliases, so existing keys and workflow files keep working. The dashboard shows the canonical name.

Old nameCanonical operation
deployapplication:deploy
restartcontainer:restart
execserver:exec
rebootserver:reboot
terminalserver:terminal
registry_loginregistry:login
registry_logoutregistry:logout
external_deploydeploy_session:open

secret_session:open is new and has no old name.

The create form offers a preset as a starting point. Pick one, then add or remove operations.

PresetOperations
Deploy from GitHub Actionsapplication:deploy, container:restart, registry:login, registry:logout
Deploy a build you made yourselfdeploy_session:open, registry:login, registry:logout
Read secrets in CIsecret_session:open
Start from nothingnone
  1. Open Automation Keys in the dashboard sidebar.
  2. Click Create Automation Key.
  3. Enter a name, for example github-prod-deploy.
  4. Pick a preset, or start from nothing.
  5. Set the allowed operations. Add every operation the pipeline calls.
  6. Set the server scope. Select specific servers, or allow all.
  7. For registry:login, set the allowed registry credentials. An empty list allows every credential in the tenant.
  8. Optionally open Advanced Settings:
    • Expiration: 30 days, 90 days, 1 year, or Never.
    • IP Allowlist: restrict the key to specific IPs or CIDR ranges, such as GitHub runner IPs.
    • Rate Limit: requests each minute. The default is 100.
  9. Click Create.
  10. Copy the key now. Reoclo shows the plaintext key one time only.

If the key needs secret_session:open, grant each secret project separately. Open the project and add the key on its Access tab.

Use reoclo/run and reoclo/checkout:

steps:
- name: Checkout code on server
uses: reoclo/checkout@v2
with:
api_key: ${{ secrets.REOCLO_AUTOMATION_KEY }}
server_id: ${{ secrets.REOCLO_SERVER_ID }}
path: /srv/reoclo/myapp
token: ${{ github.token }}
- name: Build and deploy
uses: reoclo/run@v2
with:
api_key: ${{ secrets.REOCLO_AUTOMATION_KEY }}
server_id: ${{ secrets.REOCLO_SERVER_ID }}
working_directory: /srv/reoclo/myapp
command: |
docker compose -f docker-compose.prod.yml build
docker compose -f docker-compose.prod.yml up -d
timeout: 600

Both steps call /exec, so the key needs server:exec.

Terminal window
curl -X POST https://api.reoclo.com/api/automation/v1/exec \
-H "Authorization: Bearer rca_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"server_id": "your-server-id",
"command": "cd /srv/reoclo/myapp && docker compose -f docker-compose.prod.yml up -d",
"timeout_seconds": 300
}'

To use the full CLI rather than reoclo/run or reoclo/checkout, set REOCLO_AUTOMATION_KEY in the environment:

- name: Deploy via reoclo CLI
env:
REOCLO_AUTOMATION_KEY: ${{ secrets.REOCLO_AUTOMATION_KEY }}
run: |
npx -y @reoclo/cli apps deploy my-app --ref ${{ github.sha }}

The CLI honors REOCLO_AUTOMATION_KEY for unattended use without invoking OAuth.

Every integration method authenticates with the same Automation Key (rca_*). Only the variable name, the target identifier, and the operations differ. Use this table to pick the right secret and target for the method you are wiring up.

MethodKey passed asSecret / env varTarget identifierOperations needed
GitHub Action: reoclo/run, reoclo/checkoutapi_key inputsecret REOCLO_AUTOMATION_KEYserver_id input, from secret REOCLO_SERVER_IDserver:exec
GitHub Action: reoclo/docker-authapi_key inputsecret REOCLO_AUTOMATION_KEYserver_id inputregistry:login, registry:logout
GitHub Action: reoclo/deploy-syncapi_key inputsecret REOCLO_AUTOMATION_KEYnone, matches services by container namedeploy_session:open
Reoclo CLI in CIenvironment variableREOCLO_AUTOMATION_KEYCLI argument, --server <name> or apps deploy <app>depends on the command
REST Automation APIAuthorization: Bearer <key> headerheader valueserver_id in the body, or application_id for deployone per endpoint

Create separate keys for different environments and workflows:

Key nameServersOperationsUse case
github-prod-deployprod-1application:deploy, container:restartProduction deploys from the main branch
github-staging-allstaging-1server:exec, application:deploy, container:restartStaging, where a workflow needs full access
github-migrationsprod-1server:execDatabase migrations only
monitoring-restartprod-1, prod-2container:restartAutomated recovery scripts
ci-secretsnonesecret_session:openRead secrets in CI, with no deploy rights

The Automation Keys page lists every key with:

  • Name and prefix, which identify the key
  • Operations and scope
  • Last used timestamp
  • Status: Active, Expired, or Revoked

Open a key to change its name, operations, server scope, registry credentials, IP allowlist, rate limit, or expiry date. A change takes effect on the next request, so there is no need to rotate the key.

Editing the expiry date now works. Earlier versions reported success and changed nothing.

Click the revoke button on any key to invalidate it immediately. A revoked key fails every API call. Operations that already started finish, and Reoclo rejects every new request.

There is no in-place rotation. To rotate a key:

  1. Create a new key with the same operations and scope.
  2. Update the key in your CI secrets.
  3. Check that the new key works.
  4. Revoke the old key.
  1. Revoke the key immediately from the Automation Keys page.
  2. Create a replacement key.
  3. Update all CI secrets that used the old key.
  4. Read the Audit Log for unauthorized operations made with the compromised key.

For Claude Code, Cursor, VS Code, or any other MCP client, do not use an Automation Key. Run reoclo login and configure the CLI MCP server. See the MCP Setup guide.