A Railway template has been created Deploy Bluesky PDS | Railway
Thanks to @mkizka.dev for this!
Tips
The PDS will not auto-update on Railway. You need to re-deploy and then the new image will get fetched.
Running commands on your Railway PDS
Railway does not have a machine you can connect into, so you need to run commands remotely.
There are instructions on the Railway template page which talk about using git clone and editing the create account script. You don’t need to use this.
Instead, you can use the curl command embedded in the pdsadmin create-invite-script file:
curl \
--fail \
--silent \
--show-error \
--request POST \
--user "admin:${PDS_ADMIN_PASSWORD}" \
--header "Content-Type: application/json" \
--data '{"useCount": 1}' \
"https://${PDS_HOSTNAME}/xrpc/com.atproto.server.createInviteCode" | jq --raw-output '.code'
Replace the entirety of ${PDS_ADMIN_PASSWORD} with your admin password (this is generated, look in the Railway settings) and ${PDS_HOSTNAME} with your hostname mynewpdsdomain.com.
Now you can run this curl command on your own machine whenever you need an invite code created.
You can follow this same pattern for any of the other commands.