Campfire is a self-hosted, open-source group chat platform designed as a subscription-free alternative to Slack and Microsoft Teams. It’s built for teams that want to own their communication infrastructure—offering real-time messaging, room-based conversations, file sharing, and mobile-friendly access via PWA—all without monthly fees. Ideal for small to large organizations seeking data sovereignty and cost control.
Built with Ruby on Rails, Campfire runs in Docker containers with built-in support for SSL via Let’s Encrypt, Web Push notifications using VAPID, and persistent storage via mounted volumes. It includes a REST API for bot integrations, background job processing, and caching, making it a complete, production-ready solution deployable on any server—local, cloud, or shared.
What You Get
- Multiple rooms with access controls - Create private rooms restricted to specific users or public rooms accessible to all members, enabling fine-grained team communication.
- Direct messages (DMs) - Enable private one-on-one conversations between users, separate from public room channels.
- File attachments with previews - Upload and view file previews (images, PDFs, documents) directly in the chat interface without leaving the app.
- Search functionality - Search through chat history, messages, and files with saved search queries in the sidebar for quick recall.
- Web Push notifications - Receive real-time desktop and mobile notifications via the Web Push API, configurable with VAPID keypairs for secure delivery.
- API for bot integrations - Extend functionality with custom bots and automated tools using the built-in REST API.
- Progressive Web App (PWA) support - Install Campfire on mobile devices as a home-screen app with push notifications and offline capabilities.
- Dark mode - Toggle between light and dark themes for improved readability and reduced eye strain in low-light environments.
Common Use Cases
- Running a paid membership newsletter - A journalist uses Campfire to host private chat rooms for paying subscribers, keeping discussions separate from public forums and avoiding SaaS fees.
- Internal team communication for startups - A 50-person startup replaces Slack with Campfire to eliminate $500/month subscription costs while retaining full data control and auditability.
- Conference attendee chat system - Event organizers deploy Campfire on a local server, share a QR code on stage, and let attendees instantly join real-time discussions without registration.
- Board-level secure communication - A nonprofit sets up an air-gapped Campfire instance for its board of directors, ensuring sensitive discussions remain isolated from the main company chat.
Under The Hood
Architecture
- Monolithic Rails structure with tightly coupled MVC components, lacking service or repository layers to encapsulate business logic
- Real-time features via Action Cable embed business rules directly in channel classes, limiting reusability and testability
- Stimulus controllers manage complex client-side interactions but lack dependency injection or modular abstractions
- Model concerns introduce implicit dependencies and violate single-responsibility principles
- Frontend logic is fragmented across controllers and helpers without component-based encapsulation
- Hardcoded dependencies on Redis, Resque, and WebPush hinder test isolation and extensibility
Tech Stack
- Ruby on Rails backend with modern asset pipeline (Propshaft, Importmap) and Ruby 3.4.5-slim for optimized containerization
- Hotwire stack (Turbo, Stimulus) enables server-driven interactivity without full SPA complexity
- Puma with Docker multi-stage builds and jemalloc for memory-efficient production deployment
- Redis with Kredis for session and caching, Resque for background processing
- Comprehensive testing tooling including Capybara, Selenium, and WebMock, paired with Rails-centric linting
- Sentry for error tracking and WebPush for browser notifications in a secure, non-root container environment
Code Quality
- Extensive test coverage across integration, model, and performance domains with robust mocking of external systems
- Clear separation of concerns through service objects that isolate complex external interactions
- Strong error handling with custom exceptions, network guards, and precise validation of HTTP responses
- Consistent idiomatic Rails patterns, descriptive naming, and well-structured test organization
- Deep security awareness evident in edge case handling, including DNS rebinding protection and redirect loop detection
- Code quality maintained through Rails conventions and test-driven practices rather than explicit linters
What Makes It Unique
- Native Web Push with automatic subscription and user-agent tracking enables seamless browser notifications without third-party services
- Dynamic logo generation with intelligent caching and fallbacks creates a zero-dependency asset pipeline
- QR code and web share integration directly in the invite UI enables frictionless cross-platform room joining
- Turbo Streams and Stimulus collaborate to deliver real-time updates while preserving server-side rendering
- Join codes with regenerable links replace traditional auth flows, enabling novel guest collaboration patterns
- Copy-to-clipboard and zoomable QR functionality are deeply embedded as first-class UI features, not add-ons