Deploy on Railway
Railway is the recommended host. Persistent process, simple billing, around $5/month.
Why Railway
- Always-on process (no cold starts) — important for the polling loop and liquidation trigger.
- Public HTTPS URL out of the box — buyers can reach your invitation pages.
- Auto-restart on crash — minimizes the window where your bot is unreachable.
- Simple deploys from the Railway CLI or GitHub integration.
- ~$5/month for a small project on the Hobby plan.
Prerequisites
- A Railway account (free signup at railway.app).
- A credit card on file (required for the Hobby plan, even if usage is under the free credit).
- The caput bundle you downloaded.
Steps
1. Create a new Railway project
Sign in to Railway. From your dashboard, click New Project → Empty Project.
Name the project something like caput-bot.
2. Upload your bundle
Two options:
Option A — Railway CLI (recommended).
Install the Railway CLI:
npm install -g @railway/cli
Log in:
railway login
In the directory where you extracted the bundle:
railway link
railway up
Railway uploads your project and starts deploying.
Option B — Push to GitHub, link to Railway.
Initialize a git repo in your bundle directory, push to a private GitHub repo, then in Railway click + New → GitHub Repo and select it.
3. Set environment variables
In the Railway project's Variables tab, add the contents of your config.env file as individual variables. The bundle's config.env is the source of truth — every line in there should become a Railway variable.
Important variables to verify or update:
XRPL_NETWORK— keep astestnetfor testing, change tomainnetwhen ready.PUBLIC_HOST— set to the Railway domain Railway gave you (visible in the Settings → Networking section). Looks likehttps://caput-bot-production.up.railway.app.LICENSE_TX_HASH— already baked from the configurator. Don't change.LICENSE_WALLET— already baked. Don't change.
4. Configure networking
In Settings → Networking:
- Generate Domain if Railway hasn't already.
- The domain is what buyers will reach when they click your invitation links.
The bot's internal admin UI runs on a separate port (default 7777) which is not exposed publicly. Only the public-facing invitation URLs are reachable from the internet.
5. Set up uptime monitoring
The bot must stay live for the full lifecycle of every active contract. Railway auto-restarts on crash, but a network partition or platform outage could still leave the bot unreachable.
Add an uptime monitor (UptimeRobot, BetterStack, or similar) hitting your bot's /health endpoint every 1–5 minutes. Configure it to alert you via email or push when the bot becomes unreachable.
6. First-run setup
Once deployed, find your Railway domain and reach the bot's admin UI:
- The admin UI is at
<your-domain>/adminand is protected by a one-time setup token printed in the deploy logs. - Open Railway's Deployments → View Logs and find the line that says "Admin setup token: XXXX-XXXX-XXXX."
- Visit
<your-domain>/admin?setup=XXXX-XXXX-XXXXto complete first-run setup. - Connect your wallet adapter (chosen when you configured your bundle).
- The bot verifies your license tx on the XRPL.
- Dashboard appears showing remaining uses (matches your tier).
7. Test on testnet
Before writing any real contract, generate a test invitation on testnet, deploy a small position, and watch it go through the full lifecycle. Some things to verify:
- Invitation URL is reachable from a separate browser.
- A counterparty wallet can complete the deploy bundle.
- The bot polls AMM correctly.
- Voluntary close works.
- Expiry settles correctly when the term elapses.
Only after successful testnet runs, set XRPL_NETWORK=mainnet and restart.
Costs
- Railway Hobby plan: $5/month base, plus $0.000463/GB-hour of compute.
- A typical caput bot uses well under 1GB of memory and minimal compute, so total monthly cost is usually $5–8.
- This does not include XRPL transaction fees (paid in XRP from your wallet, not the bot's host).
Updating
When a new caput release comes out, you re-deploy:
- Download the new bundle from caput.dev (with whatever uses you have left).
- Replace the bundle's contents in your Railway project.
- Run
railway upagain or trigger a redeploy from the dashboard.
The bot's state (open positions, uses consumed) lives in SQLite at the project's persistent volume. Railway preserves this across deploys.
Support
Railway-specific support: Railway's docs at docs.railway.app, or their Discord.
Caput-specific issues: read the source on GitHub. We do not provide support tickets.