Skip to content

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

    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/simplex
    VOLUME /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:

    VariableValue
    ADDRYour server address (e.g., smp.yourdomain.com)
    PASSOptional server password for registration

    Configure TCP Settings

    SimpleX uses TCP (not HTTP). Configure:

    • Traffic type: TCP
    • Internal port: 5223
    • External port: 5223

    Attach Persistent Storage

    Add persistent volumes:

    Mount PathRecommended SizePurpose
    /etc/opt/simplex100 MBServer configuration and keys
    /var/opt/simplex10 GBMessage 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.com

    Configure SimpleX App

    In your SimpleX Chat app:

    1. Go to Settings > Network & Servers
    2. Add your custom SMP server address
    3. Optionally disable preset servers for maximum privacy

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.com

Users 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/simplex directory

Additional Resources

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.