IRC for the 21st Century: Introducing Element.io

Learn how to get started with Element, a multi-platform client that overcomes several of IRC's usability problems.
725 readers like this.
open source button on keyboard

Opensource.com

Internet relay chat (IRC) is one of the oldest chat protocols around and still popular in many open source communities. IRC's best strengths are as a decentralized and open communication method, making it easy for anyone to participate by running a network of their own. There are also a variety of clients and bots available for IRC.

But on the reverse side, usability is a concern. Most of the common user interfaces for IRC clients or platforms aren't always intuitive. People from parts of the world with unstable internet connections have a hard time remaining connected to participate in conversations.

Many people have tried addressing these problems before, but none have come as far as Element.io.

What is Element?

Element is a free, open source, and multi-platform client based on the Matrix protocol. To understand it better, think of Matrix as the protocol and Element as the client. Matrix is a decentralized, secure messaging protocol. It has the benefit of using HTTP and JSON APIs, is capable of sending and receiving messages with full end-to-end encryption, supports WebRTC VoIP/video calling, and maybe most importantly, offers integration capabilities. Matrix was built to integrate with IRC servers and other communication protocols, meaning you can use the Element client as an IRC bouncer. You can read more details on what separates Matrix from IRC on Matrix's FAQ.

As a result, Element becomes most useful in its implementation as the default Matrix client. It's convenient and decentralized, as anyone can launch their own Matrix "homeserver" and connect it with Element. However, Matrix by default has servers bridged with Freenode, Mozilla IRC, and more. This lets you use Element as a persistent client that keeps you connected to IRC even when you're not there.

Riot desktop application on Fedora Linux using Matrix

Photo by author, fair use screenshot

Element desktop application on Fedora Linux using Matrix

Outside of the web application, you can also find it as a desktop application for Linux, Mac, and Windows, or a mobile application for Android and iOS. In this guide, you'll learn how to get started using Element as a full-time messaging client with the default Matrix / IRC integration servers.

Register and get a client

First, you need to open an account on Element's website. Registration is straightforward and shouldn't take you much time. You can find the registration form here. Once you've registered and have confirmed your email, you'll need to get the Riot applications on your devices of choice.

Desktop clients

There are desktop clients available for Linux, Windows, and macOS. If you're running Windows or macOS, you can download the right version for your desktop on the Element homepage. If you're using Debian, Ubuntu, or a related operating system, you can add a repository to your system to install the Riot desktop client:

$ sudo apt install -y wget apt-transport-https
$ sudo wget -O /usr/share/keyrings/riot-im-archive-keyring.gpg https://packages.riot.im/debian/riot-im-archive-keyring.gpg
$ echo "deb [signed-by=/usr/share/keyrings/riot-im-archive-keyring.gpg] https://packages.riot.im/debian/ default main" | sudo tee /etc/apt/sources.list.d/riot-im.list
$ sudo apt update
$ sudo apt install element-desktop

Element is not yet officially packaged in Fedora's repositories. However, there is a third-party Copr repository where the desktop application is packaged. Until it makes it into Fedora's repositories, you can use this version to get started with Element.

Mobile clients

Want to have Element integrated on your phone, or do you prefer a mobile client? You can find official versions of Element on your favourite app store (including the open source F-Droid repository.) Any of the mobile clients integrate fully with a desktop client, should you choose to use both. This guide focuses mostly on the desktop clients.

Setting up Freenode in Element

At the time of this writing, Element supports eight IRC networks: Freenode, Moznet, Snoonet, OFTC, GIMPNet, Foonetic, Rizon, and EsperNet. More get added from time to time, so check the Matrix bridge tracker for an updated list.

Although you can use any network you like and the instructions will mostly be the same, this guide focuses on using Freenode.

Joining your first channel

One of the first things you see after signing into Element is the directory. There, you can search through chat rooms on Matrix itself or any of the other IRC servers that are integrated. To join your first channel, select the IRC channel of choice in the dropdown menu and search for a channel.

The directory in Riot

Alternatively, if you prefer to directly join a room, you can type the following as a command from any chat window in Element. For instance, to join the #example channel:

/join #freenode_#example:matrix.org

Setting your IRC nick

Searching for #opensource.com on Freenode from the Riot client

Send a message to @appservice-irc:matrix.org to change your IRC nick in Matrix / Element

By default, your IRC nick, or username, is similar to your display name in Element. Sometimes it will have [m] appended to the end. However, after you connect to a channel, you can change your nick on the IRC side as well. To do that, you must start a new conversation with the IRC integration bot between Element and Freenode.

In the bottom left corner of your Element client, you can start a new personal chat with any user. To message the IRC integration bot, start a new chat with @appservice-irc:matrix.org. This puts you and the bot together in a private chat. To change your nick, send the following command to the bot:

!nick irc.freenode.net <IRC nick>

You should receive a confirmation message, similar to: "Nick changed from 'OldNick' to 'NewNick.'" For more help, you can read the official documentation on changing your nick.

Authenticating with NickServ

One of the other vital functions you might need to do is authenticate with NickServ. This is especially important if you want to use your registered IRC nick or are a member of invite-only channels.

You need to start another direct chat again. This time, you can search for the user @freenode_NickServ:matrix.org. This puts you into a private message with NickServ on Freenode's servers. To authenticate, you can send a message just like you normally would.

IDENTIFY <username> <password>

After doing this, you receive the normal confirmation that you are now logged in as your account. Remember to use caution when opening this chat in a public place with potentially prying eyes, as your password is displayed in plain text whenever you open that direct message with NickServ. It's not seen in your chat session by other users (unless you accidentally type it into a public chat) but people in the same physical space as you could glance over your shoulder.

Say hello!

Once you've joined a channel, claimed your nick, and authenticated with NickServ, you're all set to begin using Element. In any channel bridged in IRC with Matrix, all your messages from Element show up in the IRC channel. Element can also act like an IRC bouncer, keeping you persistently connected (some IRC channels and servers have idle timeouts, but that's often set to a generous 30 days.) When you open Element, you're able to see a log of past discussions even if you weren't connected to the Internet!

Both Matrix and Element are open source projects. You can find Matrix's code and Element's code on GitHub. If you want to better understand how the integration bridge works, you can read this blog post by one of the developers.

This article was originally published in 2017 and has been updated to reflect the project's name change from Riot to Element, and to provide updated links and install instructions.

Tags
The photograph is a headshot. Pictured is a white man with a beard looking upward.
Justin W. Flory is a creative maker. He is best known as an Open Source contributor and Free Culture advocate originally from the United States. Justin has participated in numerous Open Source communities and led different initiatives to build sustainable software and communities for over ten years.

Contributors

1 Comment

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.