Deploying SimpleX Chat
Introduction
SimpleX Chat is a revolutionary privacy-first messaging platform that takes a fundamentally different approach to private communication. Unlike other messengers that rely on user identifiers like phone numbers, emails, or usernames, SimpleX has no user identifiers at all. Messages are routed through a network of relay servers without any central authority knowing who communicates with whom.
This architecture makes SimpleX resistant to surveillance and metadata analysis in ways that traditional encrypted messengers cannot match. Even if servers are compromised, the attacker cannot determine the communication graph because no user identities exist on the servers.
Key features of SimpleX Chat include:
- No User Identifiers: No phone numbers, usernames, or any persistent identity
- Decentralized Network: Users can run their own relay servers
- End-to-End Encryption: Double ratchet algorithm for all messages
- Perfect Forward Secrecy: Past messages remain secure even if keys are compromised
- No Central Server: Federated design with no single point of failure
- Metadata Protection: Servers cannot correlate senders and recipients
- Open Protocol: Fully documented for independent implementation
- Cross-Platform: Native apps for iOS, Android, desktop, and terminal
- Group Chats: Private groups with the same security guarantees
- Voice and Video: Encrypted calls through WebRTC
- File Sharing: Secure file transfer with encryption
- Tor Support: Additional anonymity through onion routing
- Open Source: Complete transparency with AGPLv3 license
This guide walks through deploying a SimpleX SMP (Simplex Messaging Protocol) server on Klutch.sh.
Why Deploy Your Own SimpleX Server
Running your own SimpleX server provides several benefits:
Enhanced Privacy: Control over the relay infrastructure you and your contacts use.
Reduced Trust: Less reliance on third-party servers for message routing.
Performance: Dedicated resources for your communication needs.
Decentralization: Contribute to the network’s resilience and censorship resistance.
Learning: Understand how privacy-preserving communication works.
Prerequisites
Before deploying SimpleX on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your configuration
- A custom domain with DNS access
- Basic familiarity with Docker and networking
- SimpleX Chat app installed on your device
Understanding SimpleX Architecture
SimpleX uses two types of servers:
- SMP Servers: Route messages between users
- XFTP Servers: Handle file transfers
This guide focuses on deploying an SMP server, which is the core messaging component.
Deploying SimpleX SMP Server on Klutch.sh
- Traffic type: TCP
- Internal port: 5223
- External port: 5223
- Go to Settings > Network & Servers
- Add your custom SMP server address
- Optionally disable preset servers for maximum privacy
Create a GitHub Repository
Create a new GitHub repository for your SimpleX server configuration.
Create Your Dockerfile
Create a Dockerfile:
FROM simplexchat/smp-server:latest
ENV ADDR=${ADDR}ENV PASS=${PASS:-}
VOLUME /etc/opt/simplexVOLUME /var/opt/simplex
EXPOSE 5223
ENTRYPOINT ["/usr/bin/smp-server"]CMD ["start"]Push Your Repository to GitHub
Commit and push your Dockerfile.
Create a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project.
Create a New App
Create a new app and connect your GitHub repository.
Configure Environment Variables
Add the following environment variables:
| Variable | Value |
|---|---|
ADDR | Your server address (e.g., smp.yourdomain.com) |
PASS | Optional server password for registration |
Configure TCP Settings
SimpleX uses TCP (not HTTP). Configure:
Attach Persistent Storage
Add persistent volumes:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/etc/opt/simplex | 100 MB | Server configuration and keys |
/var/opt/simplex | 10 GB | Message queue storage |
Configure Custom Domain
Set up a custom domain for your SMP server (e.g., smp.yourdomain.com).
Deploy Your Application
Click Deploy to start the build process.
Get Server Address
After deployment, retrieve your server’s fingerprint by checking the logs. You’ll see output like:
Server address: smp://fingerprint@smp.yourdomain.comConfigure SimpleX App
In your SimpleX Chat app:
Server Configuration
The SMP server generates its cryptographic identity on first run. The fingerprint is derived from the server’s public key and cannot be changed without generating new keys.
To configure additional options, you can mount a custom configuration file or pass environment variables.
Connecting to Your Server
Share your server address with contacts who want to use it:
smp://fingerprint@smp.yourdomain.comUsers can add this server in their SimpleX app settings.
Security Considerations
- Keep your server configuration and keys secure
- Regularly update to the latest SimpleX version
- Consider enabling server password to restrict new connections
- Monitor server logs for unusual activity
- Back up your
/etc/opt/simplexdirectory
Additional Resources
- SimpleX Chat GitHub Repository
- SimpleX Official Website
- Server Documentation
- SimpleX Protocol Specification
- Klutch.sh Persistent Volumes
- Klutch.sh Deployments
Conclusion
Deploying your own SimpleX SMP server on Klutch.sh contributes to a more decentralized and privacy-respecting communication network. While SimpleX works well with the default public servers, running your own infrastructure provides additional control and reduces reliance on third parties.
SimpleX’s unique approach to privacy—eliminating user identifiers entirely—represents a significant advancement in private communication. By self-hosting, you can fully embrace this privacy-first philosophy while maintaining complete control over your messaging infrastructure.