# spacebarchat/spacebarchat

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/spacebarchat-spacebarchat).**

6,575 stars · 217 forks · agpl-3.0

## Links

- GitHub: https://github.com/spacebarchat/spacebarchat
- Homepage: https://spacebar.chat
- awesome-repositories: https://awesome-repositories.com/repository/spacebarchat-spacebarchat.md

## Topics

`discord` `discord-open-source` `foss` `open-source` `opensource` `spacebarchat`

## Description

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.

## Tags

### DevOps & Infrastructure

- [Self-Hosted Chat Servers](https://awesome-repositories.com/f/devops-infrastructure/self-hosted-chat-servers.md) — Running a complete chat, voice, and video platform that speaks the Discord API for seamless client and bot compatibility on your own infrastructure. ([source](https://docs.spacebar.chat/setup/server))
- [Discord-Compatible Chat Servers](https://awesome-repositories.com/f/devops-infrastructure/self-hosted-chat-servers/discord-compatible-chat-servers.md) — Implements the Discord client-server protocol for self-hosted messaging, voice, and video. ([source](https://docs.spacebar.chat))
- [Client Connectivity Tools](https://awesome-repositories.com/f/devops-infrastructure/client-connectivity-tools.md) — Connect third-party clients to the server by providing connection details and authentication tokens. ([source](https://docs.spacebar.chat/setup/clients/))
- [Server-Side Feature Extensions](https://awesome-repositories.com/f/devops-infrastructure/self-hosted-chat-servers/server-side-feature-extensions.md) — Add security, privacy, and configuration options beyond Discord's standard feature set on the server. ([source](https://docs.spacebar.chat))
- [NixOS Deployments](https://awesome-repositories.com/f/devops-infrastructure/on-premise-deployment/nixos-deployments.md) — Installing and running the chat platform as a NixOS module with automatic systemd service setup and process management. ([source](https://docs.spacebar.chat/setup/server/installation/nixos/))
- [Error-Based IP Blocking](https://awesome-repositories.com/f/devops-infrastructure/traffic-management/traffic-throttling/error-based-ip-blocking.md) — Implements IP blocking triggered by excessive error responses to safeguard server stability. ([source](https://docs.spacebar.chat/setup/server/security/limits/))
- [Global Route Throttlers](https://awesome-repositories.com/f/devops-infrastructure/traffic-management/traffic-throttling/global-route-throttlers.md) — Limit the total number of requests to a route across all users within a time window, blocking excess traffic regardless of source. ([source](https://docs.spacebar.chat/setup/server/security/limits/))
- [Message Send Throttlers](https://awesome-repositories.com/f/devops-infrastructure/traffic-management/traffic-throttling/message-send-throttlers.md) — Limit the total number of messages sent instance-wide within a time window to control chat volume. ([source](https://docs.spacebar.chat/setup/server/security/limits/))
- [Per-Client Request Throttlers](https://awesome-repositories.com/f/devops-infrastructure/traffic-management/traffic-throttling/per-client-request-throttlers.md) — Restrict requests from a specific user or IP address to a configurable count within a sliding time window. ([source](https://docs.spacebar.chat/setup/server/security/limits/))

### Networking & Communication

- [Server Implementations](https://awesome-repositories.com/f/networking-communication/discord-integrations/server-implementations.md) — Implements the Discord client-server protocol exactly so existing clients and bots connect without modification.
- [Self-Hosted Messaging Platforms](https://awesome-repositories.com/f/networking-communication/self-hosted-messaging-platforms.md) — Provides a fully self-hosted chat server compatible with the Discord protocol. ([source](https://docs.spacebar.chat))
- [Multi-Server Chat Clients](https://awesome-repositories.com/f/networking-communication/multi-device-connection-managers/multi-instance-connection-managers/multi-server-chat-clients.md) — Connecting a single client to multiple compatible chat servers simultaneously with support for themes and plugins. ([source](https://docs.spacebar.chat/))
- [Real-Time Voice and Video Communication](https://awesome-repositories.com/f/networking-communication/real-time-voice-and-video-communication.md) — Activate real-time audio communication between users in guilds and direct messages through WebRTC. ([source](https://docs.spacebar.chat/setup/server/installation/generic/voice/))
- [Multi-Instance Connection Managers](https://awesome-repositories.com/f/networking-communication/multi-device-connection-managers/multi-instance-connection-managers.md) — Use clients that connect to multiple compatible servers simultaneously with rich theming and plugin support. ([source](https://docs.spacebar.chat))

### Data & Databases

- [Chat Servers](https://awesome-repositories.com/f/data-databases/postgresql-integrations/chat-servers.md) — Provides a self-hosted chat server with all data stored in PostgreSQL and automatic schema synchronization.
- [Schema Synchronizers](https://awesome-repositories.com/f/data-databases/schema-synchronizers.md) — Keeps the database schema automatically aligned with the application source code at startup.
- [Chat Feature Extenders](https://awesome-repositories.com/f/data-databases/database-extenders/chat-feature-extenders.md) — Add security, privacy, and configuration settings beyond standard Discord functionality while maintaining full API compatibility. ([source](https://docs.spacebar.chat))

### Development Tools & Productivity

- [Server](https://awesome-repositories.com/f/development-tools-productivity/plugin-systems/server.md) — Add new functionality through a secure, cross-platform plugin system. ([source](https://cdn.jsdelivr.net/gh/spacebarchat/spacebarchat@master/README.md))
- [Chat Feature Extensions](https://awesome-repositories.com/f/development-tools-productivity/project-configuration/modular-feature-sets/chat-feature-extensions.md) — Add extra security, privacy, and configuration options on top of the standard Discord API feature set. ([source](https://docs.spacebar.chat/))
- [Default Permission Presets](https://awesome-repositories.com/f/development-tools-productivity/configuration-defaults/default-permission-presets.md) — Set the default permissions for new registrations to match a specific platform's access model. ([source](https://docs.spacebar.chat/setup/server/security/rights/))

### Graphics & Multimedia

- [WebRTC Video Chat](https://awesome-repositories.com/f/graphics-multimedia/streaming-distribution/streaming-broadcasting/broadcasting-streaming/live-video-broadcasting/webrtc-video-chat.md) — Stream live video for direct messages, guild voice channels, and broadcasts using WebRTC connections. ([source](https://docs.spacebar.chat/setup/server/installation/generic/voice/))

### Programming Languages & Runtimes

- [Server Parameter Configurations](https://awesome-repositories.com/f/programming-languages-runtimes/config-driven-instantiation/server-parameter-configurations.md) — Adjusts every server parameter through configuration files and environment variables without code changes.

### Security & Cryptography

- [Rate Limiting & Abuse Prevention](https://awesome-repositories.com/f/security-cryptography/rate-limiting-abuse-prevention.md) — Throttling requests, registrations, and message sends per user, IP, or endpoint to protect server resources and prevent spam.
- [Self-Hosted Chat](https://awesome-repositories.com/f/security-cryptography/server-hardening/self-hosted-chat.md) — Provides security hardening measures tailored to self-hosted chat server deployments. ([source](https://docs.spacebar.chat/setup/server))
- [Security & HTTPS](https://awesome-repositories.com/f/security-cryptography/network-infrastructure-security/web-network-security/security-https.md) — Enforces HTTPS to encrypt data in transit between clients and the server. ([source](https://docs.spacebar.chat/setup/server/security/))
- [Endpoint-Specific Throttles](https://awesome-repositories.com/f/security-cryptography/request-size-limiters/request-limiters/request-throttling/endpoint-specific-throttles.md) — Applies distinct rate limits to specific API endpoints per user and IP. ([source](https://docs.spacebar.chat/setup/server/security/limits/))
- [Traffic Filtering](https://awesome-repositories.com/f/security-cryptography/traffic-filtering.md) — Implements request filtering to block malicious traffic based on attack patterns and blacklists. ([source](https://docs.spacebar.chat/setup/server/security/))

### Software Engineering & Architecture

- [Rate Limiting](https://awesome-repositories.com/f/software-engineering-architecture/request-throttling/rate-limiting.md) — Protects server resources by limiting requests per user, IP, endpoint, and globally with sliding windows.
- [Three-Service Decompositions](https://awesome-repositories.com/f/software-engineering-architecture/service-architectures/three-service-decompositions.md) — Splits the platform into separate API, Gateway, and CDN processes that communicate via a message broker.
- [Platform Limit Configurations](https://awesome-repositories.com/f/software-engineering-architecture/default-configuration-values/execution-parameter-configurations/application-parameter-configurators/runtime-parameter-configurators/resource-limit-configurations/platform-limit-configurations.md) — Adjust every aspect and limit of the platform to match specific deployment needs. ([source](https://cdn.jsdelivr.net/gh/spacebarchat/spacebarchat@master/README.md))
- [Hook-Based Plugin Systems](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/plugin-module-systems/modular-plugin-architectures/plugin-based-architectures/hook-based-plugin-systems.md) — Adds new features through a secure cross-platform plugin system that hooks into server internals.

### Artificial Intelligence & ML

- [Custom Server Connections](https://awesome-repositories.com/f/artificial-intelligence-ml/external-server-connectivity/server-connection-managers/custom-server-connections.md) — Point the client to a user-specified server instance by default for self-hosted or alternative deployments. ([source](https://docs.spacebar.chat/setup/clients/fermo/))

### Part of an Awesome List

- [Chat Server Plugins](https://awesome-repositories.com/f/awesome-lists/devtools/server-plugins-and-extensions/chat-server-plugins.md) — Provides a secure cross-platform plugin system for extending chat server functionality.

### Business & Productivity Software

- [Registration Rate Throttlers](https://awesome-repositories.com/f/business-productivity-software/user-registration-systems/registration-policies/registration-rate-throttlers.md) — Cap the total number of new account registrations across the entire instance within a time window to prevent spam. ([source](https://docs.spacebar.chat/setup/server/security/limits/))

### Web Development

- [Message Broker Routing](https://awesome-repositories.com/f/web-development/api-decoupling/message-broker-routing.md) — Implements a three-service architecture with message broker routing for real-time updates. ([source](https://docs.spacebar.chat/setup/server/installation/generic/ipc/rabbitmq/))
