Skip to content

Anonymous Simplex SMP & XFTP Servers setup

If you do not have SImpleX installed please refer to this tutorial post

Only using your own onion-only simplex server doesn't isolate you.

A common misconception that people seem to have is that you wouldn't be able to communicate with regular simplex users that don't have Tor connectivity, when you're only using your own onion-only simplex servers. But that's not true, you're not even isolated when using onion-only servers. This mode of thinking comes the fact that traditional federated apps (like the fediverse) don't care about server-side anonymity. But, lucky for us, the official simplex servers also allow Tor connections in between simplex servers, which makes this whole setup possible.

In reality, thanks to Simplex's Private Routing protocol, (which is a 2 hop routing protocol), your trusted simplex server (which is onion-only) communicates with the other party's trusted simplex server, as long as they have Tor connectivity. And if the other peer is using the default Simplex Servers, which all have Tor connectivity, then they can still communicate to your own onion-only simplex server, which ensures that you're not isolated when you want to have a public, yet anonymous community like the one we have at Nowhere.

That's what we are going for in this tutorial. We're going to setup a simplex server that is onion-only, to protect the server-side anonymity, and we'll use our simplex client to only connect through our onion-only simplex server, and we'll create group chats with it so that we can have our own public, yet anonymous chatroom.

SimpleX Server Setup

It's important to note that in theory, it doesn't matter which SimpleX server you connect to, as all communications are end-to-end encrypted. When you connect via Tor, it further ensures that the server itself won't be able to trace your connection back to you. Your anonymity is maintained through the use of Tor, and your conversations are protected by SimpleX's encryption.

We're going to make use of HackLiberty's tutorial on how to install and configure a SimpleX server using Docker.

First we're going to create the docker-compose.yml file and the .env file as follows:

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ cat docker-compose.yml
version: '3.7' #this version is obsolete, change me

networks:
  tor-test:
    driver: bridge
    ipam:
      config:
        - subnet: 10.6.0.0/24
          gateway: 10.6.0.1

services:
  simplex-smp-server:
    image: simplexchat/smp-server:latest
    container_name:  simplex-smp
    restart: always
    user: "1000:1000" #user uid - change if necessary
    ports:
      - "127.0.0.1:5223:5223" #this will expose port 5223 to internet
    volumes:
      - ./smp/config:/etc/opt/simplex:Z
      - ./smp/logs:/var/opt/simplex:Z
    environment:
      - ADDR=${SIMPLEX_ADDR}
#     - PASS=${SIMPLEX_PASSWORD} #for non public servers
    networks:
      tor-test:
        ipv4_address: 10.6.0.5
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL

  simplex-xftp-server:
    image: simplexchat/xftp-server:latest
    container_name:  simplex-xftp
    user: "1000:1000" #user uid - change if necessary
    ports:
      - "127.0.0.1:5233:5233" #port mapping to expose xftp to internet on port 5233
    restart: always
    volumes:
      - ./xftp/config:/etc/opt/simplex-xftp:Z
      - ./xftp/logs:/var/opt/simplex-xftp:Z
      - ./xftp/files:/srv/xftp
    environment:
      - ADDR=${XFTP_ADDR}
      - QUOTA=150gb #change to set your own quota
    networks:
      tor-test:
        ipv4_address: 10.6.0.6
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL

  tor:
    image: osminogin/tor-simple
    container_name: tor-simplex
    volumes:
      - ./tor-data:/var/lib/tor
      - ./tor-data/torrc:/etc/tor
    networks:
      tor-test:
        ipv4_address: 10.6.0.4

[ Wonderland ] [ /dev/pts/15 ] [/srv/simplex]
β†’ cat .env
SIMPLEX_ADDR="nowhere"      #If using FDQN, make sure to set DNS record
SIMPLEX_PASSWORD="dawiuhwaihyawy4129y89u0u1"
XFTP_ADDR="nowhere"         #If using FDQN, make sure to set DNS record
#yes no clearnet at all

Then we're going to create the folders as follows:

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ mkdir -p  {xftp,smp}/{config,logs}

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ tree .
.
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ notes.txt
β”œβ”€β”€ smp
β”‚Β Β  β”œβ”€β”€ config
β”‚Β Β  └── logs
└── xftp
    β”œβ”€β”€ config
    └── logs

7 directories, 2 files

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ mkdir -p xftp/files

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ ls
docker-compose.yml  notes.txt  smp  xftp

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ cd xftp

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex/xftp]
β†’ ls
config  files  logs

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex/xftp]
β†’ cd ..

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ ls
docker-compose.yml  notes.txt  smp  xftp

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ mkdir -p tor-data/torrc

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ mkdir -p tor-data/{simplex-xftp,simplex-smp}

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ mkdir -p  {xftp,smp}/{config,logs}
[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ chmod 700 tor-data/simplex-xftp

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ chmod 700 tor-data/simplex-smp

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ sudo chown 100:65533  tor-data/simplex-xftp

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ sudo chown 100:65533  tor-data/simplex-smp

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ chown -R 100:65533 tor-data/

chmod 777 -R smp
chmod 777 -R  xftp

Be aware that SimpleX's documentation doesn't recommend by default that the servers be anonymous, they only care about the users being anonymous, that's why they recommend these 3 lines in the torrc configuration:

SOCKSPort 0
HiddenServiceNonAnonymousMode 1
HiddenServiceSingleHopMode 1

DO NOT USE THESE, otherwise your servers' location will be known. You need to use the following instead:

[ Wonderland ] [ /dev/pts/15 ] [/srv/simplex]
β†’ vim tor-data/torrc/torrc

[ Wonderland ] [ /dev/pts/15 ] [/srv/simplex]
β†’ cat tor-data/torrc/torrc
 SOCKSPort 0.0.0.0:9050 
 HiddenServiceDir /var/lib/tor/simplex-smp
 HiddenServicePort 5223 simplex-smp:5223
 HiddenServicePort 80 simplex-smp:80
 HiddenServiceDir /var/lib/tor/simplex-xftp
 HiddenServicePort 5233 simplex-xftp:5233

Then we're going to run the docker containers so that it creates the tor hostnames for both the smp and xftp services, so that we can use both in the .env file:

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ docker-compose up

[ Wonderland ] [ /dev/pts/15 ] [/srv/simplex]
β†’ tree tor-data
tor-data
β”œβ”€β”€ simplex-smp
β”‚Β Β  β”œβ”€β”€ authorized_clients
β”‚Β Β  β”œβ”€β”€ hostname
β”‚Β Β  β”œβ”€β”€ hs_ed25519_public_key
β”‚Β Β  └── hs_ed25519_secret_key
β”œβ”€β”€ simplex-xftp
β”‚Β Β  β”œβ”€β”€ authorized_clients
β”‚Β Β  β”œβ”€β”€ hostname
β”‚Β Β  β”œβ”€β”€ hs_ed25519_public_key
β”‚Β Β  └── hs_ed25519_secret_key
└── torrc
    └── torrc

[ Wonderland ] [ /dev/pts/15 ] [/srv/simplex]
β†’ cat tor-data/simplex-smp/hostname
b6geeakpwskovltbesvy3b6ah3ewxfmnhnshojndmpp7wcv2df7bnead.onion

[ Wonderland ] [ /dev/pts/15 ] [/srv/simplex]
β†’ cat tor-data/simplex-xftp/hostname
wg54vc6p3dscshywvt2wninachqoarrodtunapds7t7p47sn5e3qonid.onion

[ Wonderland ] [ /dev/pts/15 ] [/srv/simplex]
β†’ vim .env

[ Wonderland ] [ /dev/pts/15 ] [/srv/simplex]
β†’ cat .env
SIMPLEX_ADDR="b6geeakpwskovltbesvy3b6ah3ewxfmnhnshojndmpp7wcv2df7bnead.onion"      #If using FDQN, make sure to set DNS record
SIMPLEX_PASSWORD="dawiuhwaihyawy4129y89u0u1"
XFTP_ADDR="wg54vc6p3dscshywvt2wninachqoarrodtunapds7t7p47sn5e3qonid.onion"         #If using FDQN, make sure to set DNS record

Then we'll save both the private keys in our keepass and then shred them:

#save both the private keys it in your keepass and then shred it

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ cat smp/config/ca.key
-----BEGIN PRIVATE KEY-----
REDACTED
-----END PRIVATE KEY-----

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ shred -u smp/config/ca.key

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ cat xftp/config/ca.key
-----BEGIN PRIVATE KEY-----
REDACTED
-----END PRIVATE KEY-----

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ shred -u xftp/config/ca.key

Then we edit the smp config correctly as we will NOT use the clearnet at all, the config parts regarding port 443 https are to be commented.

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ cat smp/config/smp-server.ini | tail -n3
#https: 443
#cert: /etc/opt/simplex/web.crt
#key: /etc/opt/simplex/web.key

[TRANSPORT]
# Host is only used to print server address on start.
# You can specify multiple server ports.
host: b6geeakpwskovltbesvy3b6ah3ewxfmnhnshojndmpp7wcv2df7bnead.onion
#port: 5223,443 ## we don't need 443!
port: 5223
log_tls_errors: off

Then we also configure it so that the simplex smp server goes through the docker tor daemon to connect to other servers:

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ vim smp/config/smp-server.ini

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ cat smp/config/smp-server.ini

[PROXY]
# Network configuration for SMP proxy client.
# `host_mode` can be 'public' (default) or 'onion'.
# It defines preferred hostname for destination servers with multiple hostnames.
host_mode: onion
required_host_mode: off

# The domain suffixes of the relays you operate (space-separated) to count as separate proxy statistics.
# own_server_domains:

# SOCKS proxy port for forwarding messages to destination servers.
# You may need a separate instance of SOCKS proxy for incoming single-hop requests.
socks_proxy: 10.6.0.4:9050
#socks_proxy: tor-simplex:9050

# `socks_mode` can be 'onion' for SOCKS proxy to be used for .onion destination hosts only (default)
# or 'always' to be used for all destination hosts (can be used if it is an .onion server).
socks_mode: always

# Limit number of threads a client can spawn to process proxy commands in parallel.
# client_concurrency: 32

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ vim xftp/config/file-server.ini

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ cat xftp/config/file-server.ini
[STORE_LOG]
# The server uses STM memory for persistence,
# that will be lost on restart (e.g., as with redis).
# This option enables saving memory to append only log,
# and restoring it when the server is started.
# Log is compacted on start (deleted objects are removed).
enable: on

# Expire files after the specified number of hours.
expire_files_hours: 48

log_stats: off

[AUTH]
# Set new_files option to off to completely prohibit uploading new files.
# This can be useful when you want to decommission the server, but still allow downloading the existing files.
new_files: on

# Use create_password option to enable basic auth to upload new files.
# The password should be used as part of server address in client configuration:
# xftp://fingerprint:password@host1,host2
# The password will not be shared with file recipients, you must share it only
# with the users who you want to allow uploading files to your server.
# create_password: password to upload files (any printable ASCII characters without whitespace, '@', ':' and '/')

# control_port_admin_password:
# control_port_user_password:

[TRANSPORT]
# host is only used to print server address on start
host: nowhere
port: 5233
log_tls_errors: off
# control_port: 5226

[FILES]
path: /srv/xftp
storage_quota: 10gb

[INACTIVE_CLIENTS]
# TTL and interval to check inactive clients
disconnect: off
# ttl: 21600
# check_interval: 3600

Then we simply run the docker containers again:

[ Wonderland ] [ /dev/pts/14 ] [/srv/simplex]
β†’ docker-compose down ; docker-compose up -d

Starting simplex-xftp ... done
Starting simplex-smp  ... done
Starting tor-simplex  ... done

simplex-smp            | Server address: smp://BD4qkVq8lJUgjHt0kUaxeQBYsKaxDejeecxm6-2vOwI=@nowhere
simplex-xftp           | Server address: xftp://emX7ForsbdpIscNiDZ6b0HTbfFUayn00C1wmeVTofYA=@nowhere

**#need to manually change the @nowhere to be the onion urls:
smp://BD4qkVq8lJUgjHt0kUaxeQBYsKaxDejeecxm6-2vOwI=@b6geeakpwskovltbesvy3b6ah3ewxfmnhnshojndmpp7wcv2df7bnead.onion
xftp://emX7ForsbdpIscNiDZ6b0HTbfFUayn00C1wmeVTofYA=@wg54vc6p3dscshywvt2wninachqoarrodtunapds7t7p47sn5e3qonid.onion:5233**

Sidenote: One important thing to note though is that you shouldn't be the only one to use your own simplex servers as if you are the only one to use that one simplex server, people may figure out that you're the same person when trying to use different profiles. This is why you should list your simplex servers publicly somewhere, either in your own community like i did here:

Or you can list your simplex servers on public lists like this one:

Optional but recommended: Since you are using docker containers, you can easily automate keeping them updated with a simple cronjob:

[ Wonderland ] [ /dev/pts/4 ] [~]
β†’ crontab -e

#daily simplex containers update
0 0 * * * docker-compose -f /srv/simplex/docker-compose.yml pull ;  docker-compose -f /srv/simplex/docker-compose.yml down; docker-compose -f /srv/simplex/docker-compose.yml up -d

Once that's done, we can go ahead and add the servers in our simplex client:

Step 4: Configure SimpleX To Use Your Server

Now from our simplex client we need to make sure that we are using our own simplex servers, which have the following URL:

SMP server:
smp://BD4qkVq8lJUgjHt0kUaxeQBYsKaxDejeecxm6-2vOwI=@b6geeakpwskovltbesvy3b6ah3ewxfmnhnshojndmpp7wcv2df7bnead.onion

XFTP server:
xftp://emX7ForsbdpIscNiDZ6b0HTbfFUayn00C1wmeVTofYA=@wg54vc6p3dscshywvt2wninachqoarrodtunapds7t7p47sn5e3qonid.onion:5233

`

And now that our simplex client is ONLY using our onion-only simplex servers, we can create our own chatrooms:

How to Create Chatrooms in Incognito mode

Now that we are using our own simplex servers, we can create a chatrooms in incognito mode (meaning that our username will simply be a random noun and adjective):

Enter a name for your group. You can also add a photo for the group.

Tick the Incognito option. Doing this ensures your profile name and image is hidden from your group members and allows for anonymous connections with other people without shared data. Once you have filled out the necessary information, press Create group.

as noted above, since you are only using tor-only simplex servers, this means that you are forcing the users to use Tor to be able to join your invite links. Here's what the invite link looks like:

https://simplex.chat/contact#/?v=2-7&smp;=smp%3A%2F%2FBD4qkVq8lJUgjHt0kUaxeQBYsKaxDejeecxm6-2vOwI%3D%40**b6geeakpwskovltbesvy3b6ah3ewxfmnhnshojndmpp7wcv2df7bnead.onion** %2FSMvbQfvtczzC7r6Sv3gEgy_s01_ZYPh_%23%2F%3Fv%3D1-3%26dh%3DMCowBQYDK2VuAyEA9kSAhfaJMzC8YWZzkpoCL8mnBmq2U8VE8_v5HYk0nyE%253D&data;=%7B%22groupLinkId%22%3A%22zjrwnXSNIBJO9ZhoHcRRkQ%3D%3D%22%7D

as you can see the default invite link looks like that, and as you can see the onion server address appears in the link, which is the reason why if the user that wants to join doesn't have tor connectivity, he won't be able to join. If you don't want to use any of simplex's servers, you can simply replace the https://simplex.chat/ at the beginning with your simplex smp server onion url as follows:

**http://b6geeakpwskovltbesvy3b6ah3ewxfmnhnshojndmpp7wcv2df7bnead.onion/** contact#/?v=2-7&smp;=smp%3A%2F%2FBD4qkVq8lJUgjHt0kUaxeQBYsKaxDejeecxm6-2vOwI%3D%40b6geeakpwskovltbesvy3b6ah3ewxfmnhnshojndmpp7wcv2df7bnead.onion%2FSMvbQfvtczzC7r6Sv3gEgy_s01_ZYPh_%23%2F%3Fv%3D1-3%26dh%3DMCowBQYDK2VuAyEA9kSAhfaJMzC8YWZzkpoCL8mnBmq2U8VE8_v5HYk0nyE%253D&data;=%7B%22groupLinkId%22%3A%22zjrwnXSNIBJO9ZhoHcRRkQ%3D%3D%22%7D

`

If you want to not contact any simplex server to be able to view the invite link, you can simply replace the server address to simplex:/ , which will transform the link as follows:

**simplex:/** contact#/?v=2-7&smp;=smp%3A%2F%2FBD4qkVq8lJUgjHt0kUaxeQBYsKaxDejeecxm6-2vOwI%3D%40b6geeakpwskovltbesvy3b6ah3ewxfmnhnshojndmpp7wcv2df7bnead.onion%2FSMvbQfvtczzC7r6Sv3gEgy_s01_ZYPh_%23%2F%3Fv%3D1-3%26dh%3DMCowBQYDK2VuAyEA9kSAhfaJMzC8YWZzkpoCL8mnBmq2U8VE8_v5HYk0nyE%253D&data;=%7B%22groupLinkId%22%3A%22zjrwnXSNIBJO9ZhoHcRRkQ%3D%3D%22%7D

Conclusion

By following this tutorial, you've set up a secure, anonymous simplex server on Tor. You've configured a SimpleX server with .onion addresses and create incognito chatrooms. This setup ensures that your private conversations remain secure and untraceable.

What You've Accomplished

  • Configured SimpleX servers to use .onion addresses.
  • Created incognito chatroooms

Suggest changes
Nihilist 2025-05-23
Donate XMR to the author:
8AUYjhQeG3D5aodJDtqG499N5jXXM71gYKD8LgSsFB9BUV1o7muLv3DXHoydRTK4SZaaUBq4EAUqpZHLrX2VZLH71Jrd9k8