Start here
Put Cabin online
Configure private mail and Stripe settings, deploy to your Cloudflare account, back up hosted data and remove a deployment.
Cabin runs locally without provider accounts. To let owners, cleaners and guests reach it from anywhere and receive email, deploy your own installation to Cloudflare. The hosted database starts separately from the one on your computer.
Prepare Cloudflare and email
- In your Cloudflare dashboard, open Workers & Pages and set your account’s
workers.devsubdomain if this is your first Worker. Cabin can use this address without a purchased domain. - Copy the Account ID. Under My Profile → API Tokens, create a custom token with account permissions Workers Scripts: Edit and D1: Edit, scoped to your account.
- Choose
MAIL_PROVIDER=noneto set up without email. To send mail, choosesendgrid,resendorcloudflare, verify your sender with that provider and obtain a sending API key. Receiving guest mail through Cloudflare Email Routing needs your own Cloudflare domain. See Guest inbox.
Save private deploy inputs
In the Cabin checkout create .env.cabin with your own values:
CLOUDFLARE_ACCOUNT_ID=your-account-id
CLOUDFLARE_API_TOKEN=your-scoped-deploy-token
OWNER_EMAIL=you@example.com
MAIL_PROVIDER=noneFor mail-enabled hosting, set MAIL_PROVIDER, MAIL_API_KEY and MAIL_FROM with your provider, key and verified sender in .env.cabin. Cloudflare mail also needs the plain MAIL_ACCOUNT_ID, and managed mail uses the plain MAIL_RELAY_URL. Move any old MAIL_PROVIDER and MAIL_FROM values from wrangler.jsonc to the environment file and leave their source defaults empty. Changing these settings requires another build and deploy.
Connect Stripe under Direct bookings → Connect Stripe, save a test key and complete the $1 test checkout, then save a live key when ready to charge real guests. See Direct bookings. STRIPE_TEST_SECRET_KEY and STRIPE_SECRET_KEY are also supported. Keep both private. Statement payout import currently supports paid automatic USD payouts in test mode only.
The remaining secret settings are optional; rer deploy lists the ones you have not set, and Cabin runs without them:
| Setting | What it turns on |
|---|---|
STRIPE_TEST_SECRET_KEY, STRIPE_SECRET_KEY |
Direct-booking payments, if you prefer server configuration to saving keys under Direct bookings → Connect Stripe. |
SEAM_API_KEY |
Smart-lock door codes through your Seam account (Turnovers). |
TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, TWILIO_FROM |
Texts to guests through your Twilio number (Guest inbox). |
CABIN_WORKER_NAME |
Only for a Cabin on your own domain: the Worker name (such as cabin-production) the Inbox setup card shows, since a custom address does not reveal it. A workers.dev address needs nothing. |
RER generates and privately saves SESSION_SECRET and SETUP_TOKEN; you do not have to create them. The initial setup token is used to claim the hosted owner and removed after that claim. Keep .rer/deploy private and retained for later updates and removal. .env* files are gitignored; do not force-add them.
Stop the local app first if it is running (rer dev --stop): a deploy refuses while rer dev owns this checkout.
chmod 600 .env.cabin
rer deploy --env-file .env.cabin --dry-run
rer deploy --env-file .env.cabinThe first command builds and checks locally without contacting providers. The second creates resources in your account, applies database migrations, uploads the Worker and secrets, checks health and claims OWNER_EMAIL as the hosted owner. If Cloudflare returns provider-http-500 or code 10500 during first deploy, run the same command again to resume. With mail off, run rer signin --env-file .env.cabin and open the private one-time link to finish setup. Email links, staff invitations, guest verification codes and outbound notices are unavailable. With mail enabled, request a sign-in email and confirm delivery before inviting staff.
The default environment is production: its Worker is cabin-production and D1 database is cabin-production-db. For another environment add --environment NAME to each deploy, sign-in, secret update and removal command. For example, environment trial uses Worker cabin-trial and database cabin-trial-db.
Update a private setting
Change the value in your private file, then apply it without rebuilding:
rer deploy --set-secret STRIPE_TEST_SECRET_KEY --env-file .env.cabinUse the same pattern with a different declared binding name, such as SEAM_API_KEY for smart locks or TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN and TWILIO_FROM for texts; the Turnovers and Inbox pages print the exact command with your Worker's environment. For local settings, edit .dev.vars instead and restart with rer dev --stop then rer dev. Mail remains suppressed locally.
Remove a deployment
Removal is irreversible: it deletes the recorded Worker and all D1, R2, KV and queues that RER created for this environment, with their data. First back up the hosted database, and retain your private settings separately. Local rer export does not back up hosted data.
From the same checkout that deployed it, with the same Cloudflare account and .rer/deploy records, remove the default production environment:
rer deploy --remove --yes --env-file .env.cabinFor a named environment:
rer deploy --environment trial --remove --yes --env-file .env.cabin--yes confirms permanent deletion. RER reads back every recorded resource and reports read back: none of them remains after successful removal. A deployment already empty removes nothing. If readback fails, follow the reported repair and rerun the same removal command; do not delete the local deployment records before confirmation. Other environments and the separate run-cabin.com site are outside this removal.