SYSTEM: OPERATIONAL // TLS 1.3
FLUXER: ONLINE ↗
IT [ EN ]

Systems Engineering, Networking & Applied Telecommunications

Infrastructure↗
Network & Sysadmin
nftables QoS, TimescaleDB, Linux hardening, virtualization.
Browse category →
Security↗
Identity & Bastion
Authentik SSO, OIDC federation, Warpgate bastion architecture.
Browse category →
RF Telecom↗
Ham Radio Digital
D-STAR, DMR, C4FM digital voice protocols, repeater gateways.
Browse category →

SimpleX Chat: Deployment and Configuration of a Dedicated Transport Relay

SimpleX Chat: Deployment and Configuration of a Dedicated Transport Relay

SimpleX Chat's decentralized architecture allows full sovereignty over communication metadata and message queues by decoupling clients from transit servers.

Hosting an independent chat relay (SMP Server) ensures resilient message routing and autonomous traffic management.

This guide outlines the technical deployment steps, daemon lifecycle management under Linux, and systemd service configurations.


First Obstacle: Haskell Hates Systemd (and Loves TTYs)

The average sysadmin's first thought is to create a clean systemd service that starts simplex-chat --relay. You start the service, type systemctl status, and get slapped: immediate crash with Prelude.undefined.

The reason? The SimpleX CLI is written in Haskell and expects an interactive terminal (TTY). When systemd starts it in the background as a pure daemon, Haskell's TUI library goes crazy and commits suicide.

The quick fix? Tmux. You have to force systemd to start the CLI inside a detached tmux session:

[Unit]
Description=SimpleX Chat Relay Client (in Tmux)
After=network.target

[Service]
Type=forking
User=franco
ExecStart=/usr/bin/tmux new-session -d -s simplex /usr/bin/simplex-chat --relay
ExecStop=/usr/bin/tmux kill-session -t simplex
Restart=always

[Install]
WantedBy=multi-user.target

This creates a dummy TTY. It works. But when you attach with tmux attach, you run into the second issue: the console glitches, the prompt moves to the middle of the screen, and overwrites the help text. Why? Because the TUI doesn't know how to resize itself when you attach from a terminal with different dimensions. The cure is to detach and re-attach forcing the resize: tmux attach -d -t simplex.


How to use your relay on mobile devices

Once the service is up and running inside tmux, you can attach to the session (tmux attach -d -t simplex) to configure and extract your relay's invitation address.

Upon startup, the CLI configured with --relay will initialize the profile and prompt you to enter a display name and confirm address creation:

No chat relay user profile found, it will be created now.
Please choose chat relay display name.
display name: <your_name>
Current user: <your_name>
Create relay address (Yn): y
Chat relay address is created:
https://smp<N>.simplex.im/r#<identifying_string>

(If you lose the link or want to view it again later, you can use the /sa command in the CLI prompt).

Now, copy this address and bring it to your daily mobile or desktop client:

  1. Open SimpleX Chat on your phone.
  2. Go to Settings -> Network & Servers -> Chat relays.
  3. Tap Add server and paste the copied address.

WARNING: As of right now (v6.5.5), this personal relay will be used exclusively to host and route public channels (1-to-many broadcasts). All other communications (1:1 chats and standard groups) will continue to function exactly as before in classic P2P/mesh mode, as if the relay wasn't there.

The ability to create proper "relayed groups" for many-to-many conversations over relay-backed encrypted queues is on the roadmap (expected by the end of June 2026). That will be the real game-changer to slash battery consumption for group members.

Until then, use it for your broadcast channels and keep an eye on the changelogs.


[May the Talpone be with you]

Fluxer IconDiscussion & Support

Discussion and support channel. To discuss configurations or other topics, join us on fluxer.dreadful.work.


×

SimpleX Community Group

Connect directly with the engineering team via SimpleX Chat end-to-end encrypted protocol:

SimpleX QR Code
×

Kryfo Icon :: Kryfo Direct Chat ::

Scan this high-resolution QR code directly with the Kryfo mobile app (PQXDH / Tor onion) or open the invite link:

Kryfo QR Code OPEN IN KRYFO ↗