perch setup needs an mxRaven API key to provision your workspace. mxRaven
uses ZITADEL for identity, so the key is a Personal
Access Token (PAT) on a ZITADEL service account.
This is a control-plane token, not a listener API key. perch uses it only during
setup to create the domain, listeners, routes, and listener credentials, and
never writes it to perch.yaml.
Before you start
- You can sign in to the mxRaven dashboard.
- You know your workspace slug, for example
my-workspace. It is the--workspacevalue you pass toperch setup. - You have administrator access to that workspace.
1. Open the ZITADEL console
Sign in at https://id.mxraven.com/ui/console with the same account you use for mxRaven. You can also open the dashboard user menu and choose Manage authentication.
2. Select the workspace organization
Use the organization switcher in the top-left corner and choose the
organization named exactly after your workspace slug, for example
my-workspace. mxRaven creates this organization when it provisions the
workspace.
If you see more than one organization, the slug in the switcher identifies the right one.
3. Create a service account
- Open Users in the left navigation.
- Select the Service Accounts tab.
- Choose New.
- Enter a username such as
perchand a name such asperch setup. - Leave Access Token Type set to Bearer and choose Create.
4. Grant the mxRaven roles
- Open the service account you just created.
- Select the Role Assignments tab and choose New.
- Choose the granted project mxRaven.
- Select the roles to grant and choose Save.
The simplest option is to select every role in the tenant group. If you want
the smallest set that perch setup needs, select:
tenant.readandtenant.writedomains.readanddomains.writelisteners.readandlisteners.writeapi_keys.writerules.readandrules.write
Add storage_integrations.read, storage_integrations.write, and
credentials.write if you use --storage s3.
5. Generate the API key
- In the service account, select the Personal Access Tokens tab.
- Choose New and optionally set an expiration date.
- Copy the token from the dialog and store it somewhere safe. ZITADEL shows it only once.
6. Use the key with perch
Export the token for the setup command:
export MXRAVEN_API_TOKEN='paste-the-token-here'Then run the quickstart. To check the token before running setup, ask the control plane for your workspace:
curl -fsS "https://api.mxraven.com/v2/tenants/my-workspace" \
-H "Authorization: Bearer $MXRAVEN_API_TOKEN"A JSON workspace response means the token and roles are working. A 401 means
the token is missing, invalid, or expired. A 403 usually means the token
belongs to a different workspace or is missing a required role.
Rotate or revoke
Create a replacement PAT on the same service account, update
MXRAVEN_API_TOKEN, then delete the old token. Deleting the service account
revokes all of its tokens.