---
title: "Deploy campfire (with Postgres)"
description: "Self-hosted team chat app by Basecamp with PostgreSQL and S3 file storage."
category: "Other"
url: https://railway.com/deploy/once-campfire-with-postgres
---

# Deploy campfire (with Postgres)

Self-hosted team chat app by Basecamp with PostgreSQL and S3 file storage.

**[Deploy campfire (with Postgres) on Railway](https://railway.com/template/once-campfire-with-postgres)**

- **Creator:** yamato's Projects
- **Category:** Other
- **Total deploys:** 8

## Template content

### once-campfire https://once.com/assets/images/logo-campfire.webp

- **Source:** ymadd/campfire-railway-template
- **Health check:** /up
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:17

## Buckets

- **campfire-bucket**

## Documentation

# Deploy and Host once-campfire (with Postgres) on Railway

  ## What is once-campfire (with Postgres)?

  Campfire is a self-hosted, real-time team chat application from Basecamp's ONCE series. It provides multiple chat rooms with access controls, direct messaging, file
  attachments with previews, full-text search, Web Push notifications, @mentions, and API support for bot integrations. This template includes PostgreSQL for reliable data
   persistence and Railway Bucket for S3-compatible file storage.

  ## About Hosting once-campfire (with Postgres)

  Deploying Campfire on Railway involves provisioning three services: the Rails application, a PostgreSQL database, and Railway Bucket for file storage. The template
  automatically configures environment variables to connect these services. After deployment, visit your application URL to create an admin account and start inviting team
   members. Campfire is single-tenant, meaning each deployment serves one organization. SSL is handled by Railway, and the health check endpoint at `/up` ensures reliable
  container orchestration.

  ## Common Use Cases

  - **Team Communication**: Replace Slack or Discord with a private, self-hosted chat solution for internal team discussions.
  - **Client Projects**: Deploy separate Campfire instances for different clients to maintain data isolation and privacy.
  - **Open Source Communities**: Host a dedicated chat space for project contributors and maintainers.

  ## Dependencies for once-campfire (with Postgres) Hosting

  - **PostgreSQL**: Stores users, rooms, messages, and application data.
  - **Railway Bucket (S3)**: Handles file attachments, avatars, and Active Storage uploads.

  ### Deployment Dependencies

  - [Basecamp ONCE Campfire Repository](https://github.com/basecamp/once-campfire)
  - [Railway PostgreSQL Documentation](https://docs.railway.com/databases/postgresql)
  - [Railway Bucket Documentation](https://docs.railway.com/reference/services/buckets)

  ## Implementation Details

  **Health Check Configuration:**

  Healthcheck Path: /up

  **Required Environment Variables:**

  RAILS_ENV=production
  SECRET_KEY_BASE=${{secret(128)}}
  DATABASE_URL=${{Postgres.DATABASE_URL}}
  BUCKET_NAME=${{campfire-bucket.BUCKET}}
  BUCKET_ENDPOINT_URL=${{campfire-bucket.ENDPOINT}}
  BUCKET_ACCESS_KEY_ID=${{campfire-bucket.ACCESS_KEY_ID}}
  BUCKET_SECRET_ACCESS_KEY=${{campfire-bucket.SECRET_ACCESS_KEY}}
  AWS_DEFAULT_REGION=${{campfire-bucket.REGION}}

  ## Why Deploy once-campfire (with Postgres) 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 once-campfire (with Postgres) 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.

## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/once-campfire-with-postgres
