On the free Community plan, your Drupal admin talks straight to the Stagecoach server in your cluster. That's simple, but it means the server must be reachable from your site, and one token does everything. Pro SaaS keeps the deploy work in your cluster and changes the connection: everything goes through api.stagecoach.sh, the server only ever dials out, and every token does exactly one job. This post sets it up from start to finish.
If you followed the Community walkthrough, most of this will feel familiar: same Helm chart, same module, same dashboard. If you didn't, that's fine too; we explain each piece as we go. Set aside about half an hour.
Where Pro SaaS is today. Pro SaaS is in private beta, at $49 a month per project (one Drupal site with its dev, stage and prod), with up to three clusters. Request an invite from the pricing section. Already running Community? You can move without losing your releases, snapshots or history; see Coming from Community at the end.
What changes from Community
The work itself doesn't move. Deploys, snapshots and copy-downs are still done by the Stagecoach server inside your cluster, with the same permissions. Three things are different:
- The connection. Your Drupal admin sends its requests to
api.stagecoach.sh. The server in your cluster keeps a connection open to stagecoach.sh, picks those requests up, does the work and sends back the answer. Nothing reaches into your cluster, so there's no Service, ingress or firewall rule to open. The chart even blocks all incoming traffic to the server. - The tokens. Instead of one token that can do everything, you create three, each limited to one job (more below).
- The portal. stagecoach.sh lists your clusters, shows whether each server is connected, and lets you create and revoke tokens.
Before you start
You need the same things as on Community:
- A Drupal 10.3 or 11 site running in a Kubernetes cluster, as a Deployment (by default named
drupal), with one namespace per environment, for examplemysiteandmysite-dev. kubectlable to reach the cluster, and Helm 3.- Composer access to your site's codebase.
- An organization on Pro SaaS at stagecoach.sh. Once your invite is accepted, the portal shows a Pro SaaS badge next to its name.
The cluster also needs to make outgoing HTTPS connections to api.stagecoach.sh, which almost every cluster already can.
Three tokens, three jobs
Tokens are created in the portal under API tokens. When you create one, you say what it's for:
- Cluster token
- Goes to the Stagecoach server in your cluster. It registers the cluster with stagecoach.sh and takes your site's requests. It can't start a deploy itself.
- Site token
- Goes to your Drupal site's stage_coach module. It operates the one cluster you pick (deploys, copy-downs, snapshots) and can't register clusters or reach any other cluster.
- Release token
- Goes to your CI. It can record releases on the one cluster you pick, and do nothing else.
So if a token leaks, the damage is limited to its one job, and you revoke just that token. A cluster also belongs to the cluster token that registered it: another cluster's token can't take over its name or its requests.
1. Create a cluster token
In the portal, open your organization, go to API tokens, choose Cluster, give it a name such as prod-k3s-hetzner server, and press Generate token.
The token starts with stg_live_ and is shown only once. Copy it now. Rather than pasting it into a file, store it straight in a Kubernetes Secret, in the namespace the server will run in:
kubectl create namespace stagecoach
kubectl -n stagecoach create secret generic stagecoach-cluster-token \
--from-literal=token='stg_live_…'
2. Install the server in hosted mode
Create a values.yaml. It's the Community file with a different mode and a stagecoach section:
mode: hosted
stagecoach:
existingSecret: stagecoach-cluster-token # the Secret from step 1
clusterName: prod-k3s-hetzner # unique in your organization
provider: hetzner # optional, shown in the portal
region: fsn1 # optional
environments:
- {name: prod, namespace: mysite, host: www.example.com, rank: 30, production: true}
- {name: dev, namespace: mysite-dev, host: dev.example.com, rank: 10}
workload: drupal # your Drupal Deployment
container: drupal # and the container inside it
snapshots:
store: pvc://stage-coach-snapshots
The environments, workload, container and snapshots lines mean exactly what they do on Community; the Community walkthrough explains them line by line. Then install:
helm repo add stagecoach https://charts.stagecoach.sh
helm upgrade --install stagecoach stagecoach/stagecoach \
-n stagecoach -f values.yaml
Compared with Community, the chart leaves two things out: there's no Service for the server, and a NetworkPolicy denies all incoming traffic to it. It still creates a disk for the server's history, a backup disk in each environment's namespace, and permissions to update your Drupal Deployments and run jobs there. It never reads your Secrets.
Within a minute the server registers itself. Its log names the cluster's id, which you'll need for CI:
kubectl -n stagecoach logs deploy/stagecoach | grep registered
# 2026/10/31 14:30:02 stagecoach-agent: cluster "prod-k3s-hetzner" registered as cl_8c41e07d2a9b3f15
The cluster also appears on the portal's Clusters tab, with its provider, status and last heartbeat.
3. Create a site token and give it to your site
Back on API tokens, choose Site, pick the cluster you just connected, name the token after the site, and press Generate token.
The module reads its token from settings.php, never from configuration: configuration gets copied between environments by copy-downs, and a token shouldn't travel with it. Add this line to settings.php and commit it:
$settings['stage_coach_api_token'] = getenv('STAGECOACH_SITE_TOKEN');
Then give the variable to your Drupal pods:
for ns in mysite mysite-dev; do
kubectl -n "$ns" create secret generic stagecoach-site \
--from-literal=STAGECOACH_SITE_TOKEN='stg_live_…'
kubectl -n "$ns" set env deployment/drupal --from=secret/stagecoach-site
done
The last command restarts the pods. If your Deployments are defined in files in Git, add the same envFrom there, or your next manifest change will undo it. Any environment holding the site token can operate every environment on that cluster, production included; if you'd rather deploy only from one place, give the token only to that environment.
4. Add the module and choose Hosted
Add the module the usual way, then commit, build and deploy:
composer require 'drupal/stage_coach:^1.0@alpha'
drush en stage_coach -y
Open Configuration → Development → Stagecoach (/admin/config/development/stage_coach) and choose Hosted: through stagecoach.sh. The Cluster list shows the clusters your site token reaches, and whether each one's server is connected. Pick yours and press Save configuration.
The Status line should now read Connected to Stagecoach, followed by the server's version. If you see a text box asking for a cluster id instead of a list, the site doesn't have its token yet: check the settings.php line and that the pods were restarted.
Rather keep it in code? The same settings can go in settings.php, using the id from the server's log:
$config['stage_coach.settings']['mode'] = 'hosted';
$config['stage_coach.settings']['base_url'] = 'https://api.stagecoach.sh/v1/clusters/cl_8c41e07d2a9b3f15';
5. Let CI record releases
Stagecoach deploys releases: images it has been told about. On Pro SaaS your CI records them through stagecoach.sh, so it doesn't need to reach your cluster at all. Create a Release token for the cluster in the portal and save it as a secret in your CI, for example STAGECOACH_RELEASE_TOKEN in GitHub.
With GitHub Actions, add a step after the one that builds and pushes your image:
- uses: jtarleton/stagecoach-k8s-manifests/actions/record-release@main
with:
cluster: cl_8c41e07d2a9b3f15
token: ${{ secrets.STAGECOACH_RELEASE_TOKEN }}
image: registry.example.com/mysite@${{ steps.build.outputs.digest }}
It records the image with the commit and branch or tag it was built from. Any other CI can do the same with curl:
curl -fsS -X POST https://api.stagecoach.sh/v1/clusters/cl_8c41e07d2a9b3f15/api/releases \
-H "Authorization: Bearer $STAGECOACH_RELEASE_TOKEN" \
--data-urlencode "image=registry.example.com/mysite@sha256:…" \
--data-urlencode "ref=$GIT_REF" --data-urlencode "sha=$GIT_SHA"
Pin images by digest (@sha256:…), as above: a digest names one exact build, so what you tested on dev is exactly what reaches production.
6. Deploy
From here it's the same as on Community. Open Reports → Stagecoach (/admin/stage_coach), deploy a release to dev, check it, then deploy the same release to prod. Or use Drush:
drush stagecoach:releases
drush stagecoach:deploy dev --release=main
drush stagecoach:deploy prod --release=main
Every deploy takes a database snapshot first, swaps the image, runs database updates and configuration import behind maintenance mode, and ends with the site out of maintenance mode. Rollbacks (drush stagecoach:rollback prod), snapshots and sanitized copy-downs all work as before. The only difference is the route your request takes to the server.
Coming from Community
Your releases, snapshots, deploy log and history live in the Community server's database, and they can come with you:
- Install the hosted server as in steps 1 and 2, with the same environments.
- Export the old server's database and stop the old server, then import into the new one and restart it. The commands are in the Hosted setup reference.
- Switch the module to Hosted with a site token, and give CI a release token.
- Once
drush stagecoach:gridshows your environments, uninstall the old server and stop using its tokens.
Troubleshooting
- The cluster doesn't appear in the portal
- Check the server's log with
kubectl -n stagecoach logs deploy/stagecoach. A 401 means the token is wrong or revoked; a 403 means it isn't a cluster token. Connection errors mean the cluster can't reachapi.stagecoach.shon port 443. - The server says the cluster name is taken (409)
- Another cluster token already registered that name. Pick a different
clusterName, or, if you're replacing that token, revoke the old one in the portal; the server keeps retrying and takes the name over once it's free. - The module's list says "server not connected"
- stagecoach.sh knows the cluster, but its server isn't online right now. Check that the
stagecoachpod isRunningand look at its log as above. - The settings page asks for a cluster id instead of showing a list
- The site has no token, or stagecoach.sh refused it. The message under the field says which. Make sure it's a site token and that the pods were restarted after you added it.
Wrapping up
You now deploy from your own Drupal admin with nothing in your cluster open to the outside, and every token limited to one job: the cluster token stays with the server, the site token with your site, and the release token with your CI. The Hosted setup reference has every option on one page.
Questions about the beta, or something here didn't match what you saw? Tell us.