How to Deploy Simplex Chat Server on Ubuntu VPS
Last Updated: January 18, 2026 | Reading Time: 15 minutes
Secure, private messaging has become increasingly critical in our interconnected world. While mainstream messaging platforms offer convenience, they often compromise user privacy through data collection and centralized control. SimpleX Chat provides a compelling alternative—a truly decentralized messaging protocol that prioritizes user privacy above all else.
In this comprehensive guide, I’ll walk you through deploying your own SimpleX Chat server on an Ubuntu VPS. Whether you’re a privacy advocate, system administrator, or developer exploring decentralized communications, this tutorial provides everything you need to establish a self-hosted messaging infrastructure.
What is SimpleX Chat? {#what-is-simplex}
SimpleX Chat represents a new generation of messaging protocols designed from the ground up for maximum privacy. Unlike traditional messaging platforms that rely on user identifiers (phone numbers, usernames, or email addresses), SimpleX operates on a fundamentally different principle: no persistent user identifiers whatsoever.
Key Features That Set SimpleX Apart
True Decentralization: SimpleX doesn’t use any centralized servers for message routing. Each user connects to multiple messaging servers, and no single server has visibility into your complete communication patterns.
No User Identifiers: There are no phone numbers, usernames, email addresses, or even cryptographic identities tied to your account. Each connection between users operates on separate queue pairs, making traffic analysis virtually impossible.
End-to-End Encryption: All messages are encrypted on your device before transmission, ensuring that even server operators (including your own self-hosted server) cannot read message contents.
Protection Against Metadata Analysis: Because SimpleX uses separate message queues for each connection and no persistent identifiers, it’s extremely resistant to metadata analysis—a significant advantage over alternatives like Signal or Matrix.
How SimpleX Differs from Other Secure Messengers
Unlike Signal (which requires phone numbers) or Matrix (which uses server-based identities), SimpleX Chat’s architecture makes it nearly impossible to build a social graph of user connections. This design choice prioritizes privacy over convenience in ways that other platforms cannot match due to their architectural foundations.
Why Self-Host a SimpleX Server? {#why-self-host}
While SimpleX Chat clients can use the publicly available servers provided by the SimpleX development team, self-hosting your own server offers several compelling advantages:
Complete Control Over Your Data
When you operate your own SimpleX server, you maintain full control over where message queues are stored and how they’re managed. This is particularly valuable for organizations with strict data sovereignty requirements or individuals who want absolute certainty about their communication infrastructure.
Reduced Reliance on Public Infrastructure
Public SimpleX servers handle traffic from thousands of users. By deploying your own server, you eliminate dependency on third-party infrastructure and potential bottlenecks during high-traffic periods.
Enhanced Privacy Through Diversity
SimpleX’s architecture encourages running multiple servers across different operators. When you add your own server to the network, you increase the overall diversity of the SimpleX ecosystem, making network-wide surveillance more difficult.
Learning Opportunity
Deploying and maintaining a SimpleX server provides valuable hands-on experience with modern Docker containerization, networking, and secure communications protocols. These skills translate directly to professional system administration and DevOps roles.
Cost Considerations
A basic SimpleX server can run efficiently on a $5-10/month VPS, making it an affordable privacy investment compared to premium messaging services. For small teams or families, this represents excellent value for enhanced communication privacy.
Prerequisites and Requirements {#prerequisites}
Before beginning the deployment process, ensure you have the following resources and knowledge prepared:
Technical Requirements
VPS or Dedicated Server: You’ll need an Ubuntu 22.04 LTS server with the following minimum specifications:
- 1 GB RAM (2 GB recommended for production use)
- 20 GB storage (SSD preferred for better I/O performance)
- 1 CPU core (2+ cores recommended)
- Stable network connection with dedicated IP address
Domain Name (Optional but Recommended): While you can use a raw IP address, a domain name provides better usability and enables easier SSL/TLS certificate management. Services like Cloudflare, Namecheap, or your preferred domain registrar can provide this.
SSH Access: You must have root or sudo access to your Ubuntu server via SSH. Basic familiarity with Linux command-line operations is essential.
Knowledge Prerequisites
Basic Linux Administration: You should understand how to navigate the Linux command line, edit files using text editors like nano or vim, and manage system permissions.
Docker Fundamentals: While this tutorial explains each Docker command, basic familiarity with containerization concepts will help you understand the underlying architecture.
Networking Basics: Understanding ports, firewalls, and IP addresses will help you troubleshoot potential connectivity issues.
Recommended Preparatory Steps
- Backup Your VPS: If using an existing server, create a snapshot before proceeding
- Update System Packages: Ensure your Ubuntu installation is fully updated
- Configure Firewall: Plan your firewall rules to allow necessary traffic while blocking unauthorized access
- Secure SSH Access: Implement key-based authentication and disable password login for enhanced security
Understanding the Architecture {#architecture}
Before diving into the deployment commands, understanding how SimpleX Chat server architecture works will help you make informed decisions and troubleshoot issues effectively.
The SimpleX Messaging Queue (SMP) Server
The core component we’re deploying is the SMP (SimpleX Messaging Protocol) server. This server manages message queues—temporary storage locations where encrypted messages wait for recipients to retrieve them.
How Message Queues Work:
- When Alice wants to communicate with Bob, they establish a connection through queue pairs
- Alice’s SimpleX client creates a sending queue on one server and a receiving queue on another
- Bob’s client does the same with his preferred servers
- Messages flow through these queues without any server knowing both participants’ identities
Docker Containerization Strategy
We’re using Docker to deploy the SimpleX server for several critical reasons:
Isolation: The containerized server runs in an isolated environment, preventing conflicts with other system services and enhancing security through process separation.
Reproducibility: Docker ensures consistent deployment across different Ubuntu versions and hardware configurations. The build process creates an identical environment every time.
Easy Updates: Updating your SimpleX server becomes as simple as pulling a new container image and restarting the service—no complex package management required.
Resource Management: Docker allows precise control over CPU, memory, and network resources allocated to your SimpleX server.
Port Configuration
The default SimpleX server listens on port 5223. This port handles:
- Client connections for queue creation
- Message submission from senders
- Message retrieval by recipients
- Server-to-server federation (if you enable it)
Understanding port configurations becomes crucial when configuring firewalls and network policies.
Step-by-Step Deployment {#deployment}
Now let’s proceed with the actual deployment process. I’ll explain each command’s purpose and what happens behind the scenes.
Step 1: Update System Packages
sudo apt-get update
What this does: This command refreshes the package index from Ubuntu’s repositories, ensuring you have access to the latest versions of all available software. Running this before installing new packages prevents version conflicts and security vulnerabilities.
Expected output: You should see Ubuntu downloading package lists. The process typically takes 10-30 seconds depending on your network speed.
Step 2: Install Docker Dependencies
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
What this does: This installs essential packages required for Docker installation:
ca-certificates: SSL certificate authorities for secure HTTPS connectionscurl: Command-line tool for transferring data from URLsgnupg: GNU Privacy Guard for cryptographic verificationlsb-release: Provides Linux distribution information
Why it matters: These packages enable secure software installation by verifying package signatures and establishing encrypted connections to Docker’s repositories.
Step 3: Create Docker Keyring Directory
sudo mkdir -m 0755 -p /etc/apt/keyrings
What this does: Creates a directory with specific permissions (755) where Docker’s GPG signing keys will be stored. The -p flag ensures parent directories are created if they don’t exist, and -m 0755 sets read and execute permissions for all users, but write permission only for root.
Security note: Proper key management is critical for maintaining system security. This directory structure follows Linux security best practices.
Step 4: Add Docker’s Official GPG Key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
What this does: Downloads Docker’s official GPG key and saves it in the keyring directory. The flags mean:
-f: Fail silently on server errors-s: Silent mode (no progress bars)-S: Show errors if they occur-L: Follow redirects
Why it matters: GPG keys verify that packages truly come from Docker and haven’t been tampered with during transmission—essential for security.
Step 5: Add Docker Repository
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
What this does: Adds Docker’s official repository to your system’s software sources. The command dynamically detects your system architecture and Ubuntu version to configure the appropriate repository.
Breaking it down:
dpkg --print-architecture: Determines if you’re running amd64, arm64, etc.lsb_release -cs: Gets your Ubuntu version codename (e.g., “jammy” for 22.04)tee: Writes output to the file while suppressing terminal display
Step 6: Refresh Package Index
sudo apt-get update
What this does: Updates the package index again, this time including Docker’s repository. This makes Docker packages available for installation.
Step 7: Install Docker
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
What this does: Installs the complete Docker suite:
docker-ce: Docker Community Edition enginedocker-ce-cli: Command-line interface for Dockercontainerd.io: Industry-standard container runtimedocker-buildx-plugin: Extended build capabilitiesdocker-compose-plugin: Multi-container orchestration
Time estimate: This step typically takes 2-5 minutes depending on your connection speed. You’ll see progress indicators as packages download and install.
Step 8: Clone SimpleX Repository
git clone https://github.com/simplex-chat/simplexmq
What this does: Downloads the complete SimpleX MQ source code repository from GitHub to your server. This includes the Dockerfile needed for building the server container.
Storage note: The repository is approximately 50-100 MB. Ensure you have adequate free space on your system drive.
Step 9: Enter Repository Directory
cd simplexmq
What this does: Changes your working directory to the newly cloned repository folder. All subsequent commands will execute from this location.
Step 10: Switch to Stable Branch
git checkout stable
What this does: Switches to the stable release branch of SimpleX. This ensures you’re building a tested, production-ready version rather than experimental development code.
Best practice: Always use the stable branch for production deployments. The main branch may contain untested features or breaking changes.
Step 11: Build Docker Image
DOCKER_BUILDKIT=1 docker build -t smp-server -f ./build.Dockerfile .
What this does: Builds a Docker image named “smp-server” using BuildKit, Docker’s enhanced build engine. The process:
- Reads instructions from
build.Dockerfile - Downloads base images and dependencies
- Compiles the SimpleX server binary
- Creates a minimal runtime container
Time estimate: First-time builds take 5-15 minutes depending on your server’s CPU and internet connection. BuildKit caches layers, making subsequent builds much faster.
What’s happening inside:
- Haskell compilation environment setup
- Dependency resolution and installation
- SimpleX server compilation
- Multi-stage build optimization for minimal image size
Step 12: Create Configuration Directories
mkdir -p ~/simplex/{config,logs}
What this does: Creates two directories in your home folder:
~/simplex/config: Stores server configuration and cryptographic keys~/simplex/logs: Contains server operation logs
Permissions note: These directories inherit your user permissions. Docker will map these as volumes, allowing persistent storage across container restarts.
Step 13: Run SimpleX Server Container
docker run -d \
-e addr="YOUR_SERVER_IP_HERE" \
-p 5223:5223 \
-v $HOME/simplex/config:/etc/opt/simplex:z \
-v $HOME/simplex/logs:/var/opt/simplex:z \
smp-server
CRITICAL: Replace YOUR_SERVER_IP_HERE with your actual server’s public IP address or domain name.
What this does: Launches the SimpleX server container with specific configuration:
-d: Detached mode (runs in background)-e addr: Sets the server’s advertised address-p 5223:5223: Maps container port 5223 to host port 5223-v: Mounts host directories into container (:zenables SELinux labeling)smp-server: The image name we built earlier
What happens next: The container starts, generates cryptographic keys, and begins listening for connections. The server is now operational but requires initialization.
Step 14: Verify Container Status
docker ps
What this does: Lists running Docker containers. You should see your smp-server container with status “Up X seconds/minutes”.
Expected output:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
abc123def456 smp-server "..." 30 seconds ago Up 29 seconds 0.0.0.0:5223->5223/tcp romantic_name
Note the Container ID (abc123def456 in this example)—you’ll need it for the next step.
Step 15: Initialize Server
docker exec -it YOUR_CONTAINER_ID sh -c "smp-server start"
Replace YOUR_CONTAINER_ID with the actual container ID from the previous step.
What this does: Executes the server initialization command inside the running container. This:
- Completes server configuration
- Generates queue management keys
- Activates the message queue system
- Displays your server’s connection fingerprint
Expected output: You’ll see server initialization logs and importantly, your server fingerprint. This fingerprint is required for clients to connect securely. Save it in a secure location.
Example fingerprint format:
SimpleX server fingerprint: k8qf5jdK/xDPPKpPpXq5q9...
Security Hardening {#security}
A basic deployment is functional but not production-ready. Implementing these security measures is crucial for protecting your server and users.
Firewall Configuration
Install and configure UFW (Uncomplicated Firewall):
sudo apt-get install ufw
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow 22/tcp # SSH
sudo ufw allow 5223/tcp # SimpleX
sudo ufw enable
This creates a restrictive firewall that only allows necessary traffic. Always ensure SSH (port 22) remains open before enabling the firewall to avoid locking yourself out.
SSL/TLS Implementation
While SimpleX encrypts messages end-to-end, adding TLS to the transport layer provides additional security:
- Install Certbot for Let’s Encrypt certificates
- Obtain a certificate for your domain
- Configure the SimpleX server to use TLS
- Set up automatic certificate renewal
Resource: Official Let’s Encrypt Certbot documentation
Regular Security Updates
Create a weekly cron job to update system packages:
sudo crontab -e
# Add this line:
0 3 * * 1 apt-get update && apt-get upgrade -y
For Docker image updates, periodically rebuild from the latest stable branch:
cd ~/simplexmq
git pull origin stable
DOCKER_BUILDKIT=1 docker build -t smp-server -f ./build.Dockerfile .
docker stop CONTAINER_ID
docker rm CONTAINER_ID
# Re-run the docker run command from Step 13
Monitoring and Logging
Implement log rotation to prevent disk space exhaustion:
sudo nano /etc/logrotate.d/simplex
Add the following configuration:
/home/youruser/simplex/logs/*.log {
daily
rotate 7
compress
delaycompress
missingok
notifempty
}
Intrusion Detection
Consider installing fail2ban to automatically block IP addresses showing malicious behavior:
sudo apt-get install fail2ban
sudo systemctl enable fail2ban
sudo systemctl start fail2ban
Testing Your Server {#testing}
After deployment, verify your server functions correctly:
Connection Testing
- Download SimpleX Chat on your mobile device from simplex.chat
- Navigate to Settings → Network & Servers → SMP Servers
- Add your server using the format:
smp://YOUR_FINGERPRINT@YOUR_SERVER_IP:5223 - Verify connection by checking the server status indicator
Performance Verification
Monitor server logs to confirm message processing:
tail -f ~/simplex/logs/smp-server.log
You should see connection logs and queue operations. Look for error messages or unusual patterns.
Load Testing
For production deployments, consider basic load testing to verify server stability:
- Create multiple client connections
- Send test messages through various queues
- Monitor system resources (CPU, RAM, network)
- Verify message delivery reliability
Troubleshooting Guide {#troubleshooting}
Common issues and their solutions:
Issue: Container Won’t Start
Symptoms: Docker container immediately exits after starting
Diagnosis:
docker logs CONTAINER_ID
Common causes:
- Incorrect IP address in
-e addrparameter - Port 5223 already in use by another service
- Insufficient permissions on mounted directories
Solution:
# Check port availability
sudo netstat -tulpn | grep 5223
# Fix directory permissions
sudo chown -R $USER:$USER ~/simplex
Issue: Clients Can’t Connect
Symptoms: SimpleX clients timeout when attempting to connect
Diagnosis checklist:
- Verify firewall rules allow port 5223
- Confirm server IP address is publicly accessible
- Check if your hosting provider blocks port 5223
- Verify container is running (
docker ps)
Solution:
# Test external connectivity
curl -v telnet://YOUR_SERVER_IP:5223
# Review firewall rules
sudo ufw status verbose
Issue: High Memory Usage
Symptoms: Server consuming excessive RAM
Diagnosis:
docker stats CONTAINER_ID
Solution: Implement memory limits in Docker:
docker run -d \
--memory="512m" \
--memory-swap="1g" \
# ... other parameters ...
smp-server
Issue: Certificate Errors
Symptoms: SSL/TLS verification failures
Solution:
- Verify certificate validity
- Ensure proper certificate chain installation
- Check certificate renewal automation
- Confirm correct domain name in certificate
Performance Optimization {#optimization}
Enhance your server’s efficiency with these optimizations:
Docker Resource Allocation
Adjust CPU and memory allocation based on expected load:
docker run -d \
--cpus="2" \
--memory="1g" \
# ... existing parameters ...
smp-server
System Tuning
Optimize network stack for messaging workloads:
# Increase network buffer sizes
sudo sysctl -w net.core.rmem_max=26214400
sudo sysctl -w net.core.wmem_max=26214400
Make these changes permanent by adding them to /etc/sysctl.conf.
Storage Optimization
Use SSD storage for the logs directory to improve I/O performance. Implement aggressive log rotation to minimize disk usage.
Maintenance and Updates {#maintenance}
Weekly Maintenance Checklist
- Review server logs for errors or unusual activity
- Check disk space usage
- Verify container health status
- Review and update firewall rules if needed
Monthly Tasks
- Update system packages
- Review security advisories for Docker and Ubuntu
- Rebuild Docker image from latest stable branch
- Test backup restoration procedures
- Review resource utilization trends
Backup Strategy
Implement automated backups of critical data:
#!/bin/bash
# Daily backup script
BACKUP_DIR="/backup/simplex"
DATE=$(date +%Y%m%d)
tar -czf $BACKUP_DIR/simplex-$DATE.tar.gz \
~/simplex/config \
~/simplex/logs
# Retain last 30 days
find $BACKUP_DIR -type f -mtime +30 -delete
Frequently Asked Questions
Q: Can I run multiple SimpleX servers on the same VPS?
A: Yes, but each requires a unique port and IP address combination. Modify the -p parameter to use different ports (e.g., 5224, 5225).
Q: How much bandwidth does a SimpleX server consume?
A: Bandwidth usage scales with user activity. A server supporting 10-20 active users typically consumes 1-5 GB/month.
Q: Is it safe to use my SimpleX server for sensitive communications?
A: Yes, but ensure you’ve implemented all security hardening steps, particularly TLS encryption and firewall configuration.
Q: Can I migrate my server to a different IP address?
A: Yes, update the container’s -e addr parameter and restart. Clients will need your new server address to reconnect.
Q: How do I update my SimpleX server?
A: Rebuild the Docker image from the latest stable branch, stop the old container, and start a new one with updated image.
Q: What happens if my server goes offline?
A: Queued messages remain stored until the server returns online (up to message expiration time). Clients automatically retry connections.
Comparison with Alternatives
SimpleX vs. Signal Server
Signal Advantages:
- More mature infrastructure
- Larger user base
- Better mobile app integration
SimpleX Advantages:
- No phone number requirement
- Superior metadata privacy
- Easier self-hosting
- No central point of failure
SimpleX vs. Matrix Synapse
Matrix Advantages:
- Federation with other servers
- Rich feature set (rooms, spaces, etc.)
- Extensive client ecosystem
SimpleX Advantages:
- Simpler deployment
- Lower resource requirements
- Better privacy by design
- No identity server dependency
Conclusion
Deploying your own SimpleX Chat server represents a meaningful step toward communication sovereignty. While the process requires technical knowledge, the privacy benefits and learning opportunities make it worthwhile for anyone serious about secure communications.
The self-hosted approach gives you complete control over your messaging infrastructure without depending on centralized services. As privacy concerns grow and surveillance capabilities expand, decentralized communication tools like SimpleX become increasingly important.
Remember that security is an ongoing process, not a one-time setup. Regular updates, monitoring, and adherence to security best practices ensure your server remains a reliable, secure communication platform for years to come.
Additional Resources
Official Documentation:
Related Tutorials:
- Advanced Docker Security Best Practices
- UFW Firewall Configuration Guide
- Let’s Encrypt Certificate Automation
Community Support:
- SimpleX Chat Community on Reddit
- GitHub Issues for technical problems
- Privacy-focused forums and discussion boards
About the Author
**xsukax ** is a software developer specializing in privacy-focused applications and decentralized systems. With 110+ open-source repositories on GitHub and extensive experience in secure communications, he maintains this blog to share practical tutorials and technical insights. His work emphasizes privacy-by-design principles and self-hosted solutions.
Was this tutorial helpful? Leave a comment below with your questions or experiences deploying SimpleX servers. For more privacy-focused tutorials, explore our complete tutorial collection.
Last reviewed: January 18, 2026









