Element (Matrix) over the Nym mixnet: private, decentralised and secure messaging

You can now run Element chat app messages through the mixnet via NymConnect — here’s how!

Author: Nym
5 mins read
Network-1.svg

You can now run Element chat app messages through the mixnet via NymConnect — here’s how!

Translations: Français //日本語

Following a long battle, end-to-end encryption is finally best practice for consumer messaging apps, protecting the content of messages as they travel between devices. There’s also progress on decentralisation, improving data sovereignty. Bridging the two, the Matrix open standard is designed for decentralised secure communication. In May 2020, Matrix built end-to-end encryption into its interoperable protocol, meaning users can run their own servers while messaging between different platforms, securely. Users may not be familiar with the actual protocol, but many will have interacted with it through the open source Element application, where encrypted chats can be organised into spaces, rooms, and direct message in one user-friendly package.

Nevertheless, there remain areas where the principles of end-to-end encryption and data sovereignty are under attack and can be compromised. This includes on actual devices, for example through client-side scanning, which is currently being pushed in legislation in the UK and the EU, as well as by analysing the metadata of messages, which reveals sensitive information about people, their identities and relationships. Encryption alone doesn’t protect your communications from powerful adversaries capable of sophisticated traffic analysis techniques. Nym, however, does.

This article will explain how you can use NymConnect to privacy-enhance the Element chat app, protecting IP addresses, metadata and more…

Note: this is for the slightly more technical users at this point as you will need to be comfortable with a command-line interface. There’s no option (yet) in the Element client to set a SOCKS5 proxy, and so NymConnect with Element must be started from the command-line.

Make sure you’ve installed NymConnect on your desktop and run it.

Get started on Linux and Mac:

Setup

The process is simple and can be run via a convenient keyboard shortcut or command shortcut ‘alias’ for Linux and Mac, but we’ll have to set that up first.

To start Matrix’s Element client via a SOCKS5 proxy with NymConnect, open your terminal and run the following command:

element-desktop - proxy-server=socks5://127.0.0.1:1080

And that’s it!

This command-line approach is admittedly a little cumbersome, so read on to learn how to start Element with NymConnect by binding the command to a single keyboard shortcut or command alias to get up and running more quickly.

How to set up NymConnect and Element with keybinding

Keybinding NymConnect and Element in Linux

To avoid entering a command every single time, we’ll create a keyboard shortcut using keybinding.

Navigate toKeyboard Shortcuts in your computer settings and choose Set Custom Shortcut. Whatever you enter for the Name and Shortcut fields is up to you, but write the following into the Command line:

element-desktop - proxy-server=socks5://127.0.0.1:1080

Then input your Shortcut, but be sure it isn’t already in use by something else.

See below for an example:

Create an alias

If all keybinding options are already taken, or if you’d prefer to shorten the length of the command, you can create an alias instead. In our examples, we’ve used the word element to launch the client, but you can replace this with whatever you like.

Linux

alias element=”element-desktop — proxy-server=socks5://127.0.0.1:1080"

To make this alias persist, add this line to your .bashrc or .zshrcfile (usually located in your $HOME directory) and source that file.

This can be achieved by appending the alias command directly to the shell config file.

For example, for bash enter:

alias element=”element-desktop — proxy-server=socks5://127.0.0.1:1080" >> ~/.bashrc

For zsh enter:

alias element=”element-desktop — proxy-server=socks5://127.0.0.1:1080" >> ~/.zshrc

If you want to add this alias manually, open your $HOME directory, enable hidden files (press ctrl + h) and open the .bashrc or .zshrc file in a text editor, then paste the string

alias element=”element-desktop — proxy-server=socks5://127.0.0.1:1080"

to the end, save and exit.

Start a new terminal and run element.

Mac

alias element=”open -a Element — args — proxy-server=socks5://127.0.0.1:1080"

To make this alias persist, add this line to your .zshrc (or .bashrc/.profile) file (usually located in your $HOME directory) and source the file. This can be achieved by appending the alias command directly to the shell config file.

For zsh enter:

alias element=”open -a Element — args — proxy-server=socks5://127.0.0.1:1080" >> ~/.zshrc

For .bashrc or .profile just change the end of the command from zshrc.

You can add the alias manually by opening your $HOME directory, enabling hidden files (in Finder press Shift + Command + .) and opening the .zshrc file (or .bashrc/.profile) in a text editor, then paste the string alias

element=”open -a Element — args — proxy-server=socks5://127.0.0.1:1080"

to the end, save and exit.

Start a new terminal and run element.

Now you can run Element through the Nym Mixnet with a single-word command.

SOCKS5 is a powerful tool to help conceal your online behaviour from prying eyes. If your application is SOCKS5 proxy-ready and you want to protect the privacy of the network layer by integrating with NymConnect, check out the Nym Developer Portal and join the Nym dev community channel on Element, to meet and chat with others building on Nym.

Privacy loves company

Discord // Telegram // Element // Twitter

The internet is global and so is Nym: join the Nym Community wherever you are and help build the private internet today.

English // 中文 // Русский // Türkçe // Tiếng Việt // 日本 // Française // Español // Português // 한국인

Share
VPN-screen.svg

INTRODUCING NYMVPN

Advanced privacy built for the age of AI

Artboard 1.svg