Campfire
Self-hosted, single-tenant group chat with real-time rooms, direct messages, Web Push, and file sharing — no subscriptions, no external services.
Campfire is a self-hosted group chat application built by 37signals (the makers of Basecamp) and released as an open-source ONCE product. It gives teams a complete, real-time messaging environment — including rooms with access controls, direct messages, file attachments with previews, @mentions, and Web Push notifications — without any recurring subscription fees and without giving up control of your data.
The application ships as a single Docker image that bundles everything needed for a production deployment: the Rails web app, embedded Redis, background workers, media processing via libvips and ffmpeg, and an HTTP proxy that handles HTTPS termination via Let’s Encrypt automatically. You run one command and you have a production-grade team chat server.
Campfire is single-tenant by design. Every deployment serves exactly one organization, and rooms designated “public” are accessible to all users on that instance. For teams with strict data sovereignty requirements, air-gapped networks, or tight budgets, this model offers an appealing alternative to cloud-hosted SaaS products. The codebase is straightforward, well-structured Rails — readable, extensible, and actively maintained by the team at 37signals with contributions from a growing open-source community.
What You Get
- Multiple room types with access controls - Create Open rooms (accessible to all users on the account), Closed rooms (invite-only), or Direct message threads between specific users, with fine-grained membership management.
- Real-time messaging via Action Cable - Messages, reactions (boosts), and typing indicators stream live to all connected users over WebSocket connections managed by Rails Action Cable — no polling, no refresh.
- File attachments with image and video previews - Upload images, videos, and documents directly in chat; images are thumbnail-processed via libvips and videos via ffmpeg, displayed inline with a built-in lightbox.
- Full-text message search - Search all message history using SQLite’s native FTS5 engine with saved search queries persisted in the sidebar for quick reuse — no external search service required.
- Web Push notifications - Receive real-time desktop and mobile push notifications via the Web Push API with VAPID keypairs; includes a service worker, PWA home-screen install support, and per-device subscription management.
- @mentions with rich text - Mention teammates using Action Text with autocomplete; mentionees receive targeted push notifications even when not actively in the room.
- Bot integration API - Extend Campfire with custom bots using per-bot secret keys to post messages via a dedicated REST endpoint, enabling webhook-driven automations and CI notifications.
- QR code and join-link onboarding - Invite new users by sharing a regenerable join URL or QR code; the QR code can be downloaded, copied, or shared natively via the Web Share API.
- Progressive Web App (PWA) support - Install Campfire on mobile devices as a home-screen app with push notifications, offline service worker caching, and a native-app feel without an app store.
Common Use Cases
- Internal team communication for cost-conscious organizations - A 30-person company replaces a $600/month Slack subscription by self-hosting Campfire on a $20/month VPS, retaining full message history and data ownership without per-seat pricing.
- Air-gapped or regulated environments - A government contractor deploys Campfire on an isolated internal network to meet data residency requirements, using DISABLE_SSL and an internal CA without any traffic leaving the perimeter.
- Conference or event attendee chat - Event organizers deploy a temporary Campfire instance, display the join QR code on the main screen, and let hundreds of attendees self-register and join real-time room discussions without pre-registration.
- Paid community chat for newsletter operators - A journalist running a paid membership newsletter hosts a Campfire instance for subscribers as a private community benefit, controlling membership and keeping conversations on owned infrastructure.
- Developer team communication with bot integrations - An engineering team sets up rooms for each project and connects CI/CD pipelines and monitoring tools via the bot API to post build results and alerts directly into relevant rooms.
Under The Hood
Architecture Campfire is a disciplined single-tenant Rails monolith organized around resource-centric routing and STI-based polymorphic room types — Open, Closed, and Direct — that cleanly separate access semantics at the model layer. Behavior is composed through focused concern modules on the Message model handling broadcasting, full-text search indexing, file attachments, and @mentions, keeping core classes lean without introducing service objects or domain layers. Action Cable channels provide real-time streaming, background Resque jobs handle async push delivery and webhook dispatching, and the job and model boundary is clearly maintained through Active Record commit callbacks. The architecture is deliberately conservative and comprehensible, following Rails conventions throughout rather than introducing novel abstractions — making the codebase highly predictable and accessible to any Rails developer.
Tech Stack The backend runs Ruby on Rails tracking the main branch, with SQLite serving both relational storage and full-text message search via a native FTS5 virtual table maintained by Active Record callbacks — eliminating the need for any external search service. Redis with Kredis manages caching and Resque handles background processing for push notifications and webhook delivery. The Hotwire stack (Turbo Streams over Action Cable, Stimulus) enables server-driven real-time updates, with more than three dozen purpose-built Stimulus controllers managing notifications, drag-and-drop file uploads, autocomplete, lightbox previews, presence detection, and PWA install prompts. Assets ship via Propshaft and Importmap without a JavaScript bundler. The entire stack is packaged into a single Docker image that embeds Redis, Thruster for HTTPS termination via Let’s Encrypt, and libvips plus ffmpeg for image and video processing.
Code Quality The test suite spans controller, model, system, Action Cable channel, and performance tests — covering the full application stack with Capybara and Selenium driving real browser end-to-end scenarios. Style is enforced by rubocop-rails-omakase (the 37signals Rubocop profile), while Brakeman and bundler-audit provide static security analysis. Naming is clear and consistently idiomatic across Ruby and JavaScript. Error handling follows Rails conventions with defensive checks at external integration points such as push subscription syncing and link unfurling. Some business logic accumulates in model callbacks and concern modules, which is idiomatic Rails but limits isolated unit testability. JavaScript controllers are plain ES6 classes following Stimulus conventions — no TypeScript.
What Makes It Unique The most technically distinctive aspect of Campfire is its radical operational self-containment: a single Docker image embeds the app server, Redis, background workers, HTTPS termination, and media processing — no external services or orchestration required to run in production. Search is powered directly by SQLite’s FTS5 engine maintained via Active Record callbacks, making it fast and zero-infrastructure. The Web Push pipeline is managed entirely by a single Stimulus controller that handles service worker registration, VAPID subscription lifecycle, permission prompts, retry logic, and PWA versus browser differentiation — a complete, SDK-free push notification implementation. Together, these choices reflect a philosophy of radical operational simplicity: a team can self-host capable, real-time team chat on a single server with a single command.
Self-Hosting
Campfire is released under the MIT License by 37signals. This is a permissive open-source license with no copyleft conditions: you are free to use, modify, distribute, and run Campfire commercially without restriction, and you are not required to open-source any modifications you make for private use. The only requirement is preserving the copyright notice. This makes it genuinely suitable for any organization — startup, enterprise, or nonprofit — without legal complications.
Running Campfire yourself means you are responsible for the full operational stack: server provisioning, uptime, backups, security patches, and Rails upgrades. The good news is that the deployment footprint is unusually small for a full-featured chat application — a single Docker container on a modest VPS (even a $20/month instance) is sufficient for most small-to-medium teams. The application stores data in SQLite and local file storage under /rails/storage, so backup is a matter of snapshotting that volume. There is no managed database, no external queue, and no search cluster to worry about. Rolling updates require a brief restart, and you will want to monitor for upstream Rails and Ruby security advisories to keep the stack current.
Campfire does not offer a paid cloud-hosted tier, managed hosting, or an enterprise support contract — it is strictly a self-hosted product. If you need SLAs, guaranteed uptime, managed upgrades, or cloud backup, you will need to build that operational capability yourself or use a managed platform like Heroku or Render. Compared to Slack or Microsoft Teams, you give up enterprise SSO (SAML/SCIM), compliance exports, audit logs, and a dedicated support team. The trade-off is straightforward: complete data ownership, no per-seat fees, and a codebase simple enough that a single Rails developer can understand and maintain it.
Related Apps
Zed
Developer Tools · Collaboration · Code Editors
High-performance, multiplayer code editor built in Rust by the creators of Atom and Tree-sitter, with native AI integration and real-time collaboration.
Zed
OtherAppFlowy
Productivity · Project Management · Collaboration
The open-source AI workspace that puts your data, your rules — with local LLMs, CRDT collaboration, and full self-hosting built in.
AppFlowy
AGPL 3.0AFFiNE
Productivity · Project Management · Note Taking
Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.