Deploy Campfire Team Chat
Basecamp's group chat: rooms, DMs, files, search, bots. Slack alternative
Campfire
Just deployed
Deploy and Host Campfire Team Chat on Railway
Campfire is the group chat Basecamp (37signals) built and then open-sourced under the MIT licence: rooms with access controls, direct messages, file attachments with previews, search, @mentions, Web Push notifications and a bot API. It is a simple self-hosted alternative to Slack for a team or a community. This template runs Campfire 1.6.0 on Railway as one service with a volume, with the administrator ready on the first boot.
This is a community template, not made or supported by Basecamp or 37signals.
About Hosting Campfire Team Chat
Before deploying, set ADMIN_EMAIL to your email. Deploy, wait for the green check, open the Railway domain and sign in with that email and the password in the Campfire service's ADMIN_PASSWORD variable (generated for you). Change the password under your profile afterwards.
Inviting your team: open the account settings (the gear) and copy the join link. Anyone with that link can create an account; you can reset it to a new one there at any time. Without the link nobody can sign up.
Why the administrator is created for you: a fresh Campfire shows a first-run wizard to whoever opens it first, and that person becomes the administrator. On a public Railway address that could be a stranger, so this template creates your administrator on the first boot before the public port opens, and the wizard is closed from the start.
The sign-in page shows the administrator's email as the contact for people who forget their password. Use an address you're happy to show, or change it later in your profile.
Your data: the SQLite database, uploaded files and the Web Push keys are all on the service's volume at /rails/storage. Redeploys and upgrades keep them, and pending migrations run on boot.
Custom domain: add it under the Campfire service's Settings > Networking, then set BASE_URL=https://chat.example.com.
Email (optional): with SMTP_ADDRESS, SMTP_USERNAME, SMTP_PASSWORD and MAILER_FROM_ADDRESS set, people can reset their own passwords. Railway allows outbound SMTP on the Pro plan only. Without email, an administrator copies a sign-in link from the person's profile and sends it to them.
Common Use Cases
- A small team or company chatting in rooms and DMs without paying per seat for Slack
- A community, club or class with open rooms everyone joins and closed ones for organisers
- Bots posting deploy alerts, CI results or form submissions into a room through the bot API
- A private family or friends chat you host and control yourself
- Sharing files and screenshots with previews, and searching old conversations
Dependencies for Campfire Team Chat Hosting
- A Railway volume (included) for the database and files
- For email: SMTP on Railway's Pro plan (optional)
Deployment Dependencies
Implementation Details
- One service: Campfire's image runs the web server (Thruster in front of Rails), background jobs and its own Redis in one container; the database is SQLite on the volume. No separate database service to pay for.
- Image: upstream's official
ghcr.io/basecamp/once-campfire:1.6.0, pinned, plus a small entrypoint. - Secrets:
SECRET_KEY_BASEand the administrator password are generated per deploy; the Web Push key pair is generated on the first boot and kept on the volume, so browser notifications keep working across redeploys. SetVAPID_PUBLIC_KEYandVAPID_PRIVATE_KEYto use your own. - Sized for 0.5 GB: upstream starts web and job processes in proportion to the CPUs it sees, and each is a full copy of the app, which on Railway is more than a 0.5 GB service holds (it was killed mid-upload in testing). This template runs one web process with background jobs on threads inside it (
JOB_CONCURRENCY=0), a 16 MB page cache, YJIT off and image previews on one thread. Tested at 0.5 GB: about 150 MB idle and 350 MB at peak while posting 12-megapixel photos and loading 40 pages at once. From 1 GB up you can setJOB_CONCURRENCY=1for separate Resque workers (about 540 MB at the same peak), raiseWEB_CONCURRENCY, or setYJIT=true. With in-process jobs, a job still queued when the service restarts is dropped, which for Campfire's jobs means at most a missed notification. - Real visitor addresses: Campfire bans by IP address and limits sign-in attempts per address. Behind Railway's proxy Rails would see the proxy's address for every visitor, so one ban would lock out everyone; the template takes the visitor's address from the
X-Real-IPheader Railway's edge sets. - HTTPS: Railway serves the domain over HTTPS, and Campfire treats requests as secure (secure cookies) without trying to get its own certificate. Don't set
TLS_DOMAIN. - Never crash-looping on a variable: if
ADMIN_EMAILisn't an email address,ADMIN_PASSWORDis shorter than 12 characters,SECRET_KEY_BASEis too short, a worker count isn't a number,TLS_DOMAINis set or no volume is mounted, the service shows a page saying what to fix instead of restarting over and over, and the deploy logs say the same.
Why Deploy Campfire Team Chat on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Campfire Team Chat on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
Campfire
two-workspaces/campfire