SpaceBarChat is an open-source, self-hosted chat server that implements the Discord client-server protocol, allowing existing Discord clients and bots to connect without modification. It provides a complete communication platform for real-time messaging, voice, and video, all running on your own infrastructure with data stored in a PostgreSQL database that automatically synchronizes its schema with the application source code.
The platform is built on a three-service architecture that separates API, Gateway, and CDN processes, communicating via Unix domain sockets or RabbitMQ for coordination. It includes a config-driven customization system that adjusts every server parameter through configuration files and environment variables without code changes, alongside a secure cross-platform plugin system for adding new functionality. A rate-limit and throttle system protects server resources by limiting requests per user, IP, endpoint, and globally with sliding windows, while WebRTC enables real-time audio and video streaming between users.
Beyond core Discord compatibility, the server supports extending chat features with additional security, privacy, and configuration options while maintaining full API compatibility. It offers multi-instance client connectivity, allowing a single client to connect to several compatible servers simultaneously with support for themes and plugins. Deployment options include running as a systemd service, deploying on NixOS as a module, or serving behind a reverse proxy with automatic SSL certificate management.