How to Install The Lounge IRC Client on Ubuntu 20.04

The Lounge is a web-based IRC client written in Node.js and can be installed and then accessed from any modern browser for a native-like experience without having a dedicated application installed.

Some of the benefits of The Lounge IRC Client include:

  • Modern features brought to IRC. Push notifications, link previews, new message markers, and more bring IRC to the 21st century.
  • Always connected. Remains connected to IRC servers while you are offline.
  • Cross platform. It doesn’t matter what OS you use, it just works wherever Node.js runs.
  • Responsive interface. The client works smoothly on every desktop, smartphone and tablet.
  • Synchronized experience. Always resume where you left off no matter what device.

In the following tutorial, you will learn how to Install The Lounge IRC Client on Ubuntu 20.04 LTS.

Advertisement

Prerequisites

  • Recommended OS: Ubuntu 20.04 – optional (Ubuntu 21.04)
  • User account: A user account with sudo or root access.

Updating Operating System

Update your Ubuntu 20.04 operating system to make sure all existing packages are up to date:

sudo apt update && sudo apt upgrade

Install Node.js

First, you will need to install Node.js on your Ubuntu operating system. To do this, use the following command:

sudo apt install nodejs

Example output:

How to Install The Lounge IRC Client on Ubuntu 20.04

Type (Y), then press the (ENTER) key to proceed with the installation.

Once installed, verify the installation by checking the version number:

sudo nodejs -v

Example output:

v10.19.0

Note, The Lounge IRC Client requires a Node.js minimum of version 6. By default, the Ubuntu default repository is higher than this. However, if you are using a lower version, you will need to upgrade to the minimum required.

Advertisement

Install The Lounge

To install The Lounge IRC client, visit the official Github Releases page to grab the latest .deb package link and then download it. You will find stable and pre-release versions. For first-time users, it would be advised to use stable before pre-release.

Example:

wget https://github.com/thelounge/thelounge/releases/download/v4.2.0/thelounge_4.2.0_all.deb

With the .deb package downloaded, now install with the following command:

sudo apt install ./thelounge_4.2.0_all.deb

Verify the installation was successful by checking the version number:

thelounge -version

Example output:

v4.2.0

Now by default, the IRC software client should be started. To verify this, use the following systemctl command:

systemctl status thelounge

Example output:

How to Install The Lounge IRC Client on Ubuntu 20.04

If the client has not to be activated, use the following systemctl command to start it:

sudo systemctl start thelounge

To stop The Lounge:

sudo systemctl stop thelounge

To enable The Lounge on system startup:

sudo systemctl enable thelounge

To disable The Lounge on system startup:

sudo systemctl disable thelounge

To restart The Lounge service:

sudo systemctl restart thelounge
Advertisement

Launch The Lounge Client

Before launching, you will need to create a new user in your Ubuntu terminal for The Lounge. To do this, execute the following command:

sudo -u thelounge thelounge add USERNAME

Replace USERNAME with the desired username of your choice. Next, you will be prompted to enter a password and choice to save log files to disk.

Example:

How to Install The Lounge IRC Client on Ubuntu 20.04

To access The Lounge IRC Client, open your favorite Internet Browser and type in your server address with port 9000, as this is the default port for the software.

Example:

http://yourserverip:9000

Next, you will be greeted by the following connection page, where you are prompted to enter your username and password.

Example:

How to Install The Lounge IRC Client on Ubuntu 20.04

Now you should be logged into the connection section, and here you can enter the server details of the networks you would like to connect to. From here, you will be connected using The Lounge web UI to your favorite IRC channel.

Example:

How to Install The Lounge IRC Client on Ubuntu 20.04

Next, you can configure if you would like to access the chat server using a reverse proxy.

Create The Lounge Apache Reverse Proxy

You can set up a reverse proxy to access The Lounge from a remote computer or network. In this example, the tutorial will set up an Apache proxy server. If you want to use Nginx, skip this part and go to the Setup Nginx as a Reverse Proxy.

First, install Apache:

sudo apt install apache2 -y

By default, Apache should be enabled if it is not activated. use:

sudo systemctl start apache2

To enable Apache to be started on boot, use the following command:

sudo systemctl enable apache2

Example output if successful:

Synchronizing state of apache2.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable apache2

Verify the status of Apache:

sudo systemctl status apache2

Example output:

How to Install The Lounge IRC Client on Ubuntu 20.04

To use Apache as a reverse proxy, you need to enable the module with the following command:

sudo a2enmod proxy proxy_http headers proxy_wstunnel

Next, create a virtual host for your subdomain:

sudo nano /etc/apache2/sites-available/irc.conf

You will need an active domain name which can be purchased for as little as 1 to 2 dollars if you do not have one. NameCheap has the best cheap domains going around and if you prefer a .com, use Cloudflare.

After you have created your sub-domain, add the following to the server block file:

<VirtualHost *:80>
   ServerName irc.example.com
   ErrorDocument 404 /404.html

   #HTTP proxy
   ProxyPass / http://localhost:9000/
   ProxyPassReverse / http://localhost:9000/

   #Websocket proxy
   SSLProxyEngine on
   <Location /:/websockets/notifications>
        ProxyPass wss://localhost:9000:/websockets/notifications
        ProxyPassReverse wss://localhost:9000/:/websockets/notifications
   </Location>

   Header always unset X-Frame-Options
</VirtualHost>

Save the file (CTRL+O), then exit (CTRL+X).

Now do a dry run to make sure no errors in the Apache configuration or your virtual host:

sudo apache2ctl configtest

If everything is working correctly, example output should be:

Syntax OK

Enable the virtual host on Apache as follows:

sudo a2ensite irc.conf

Then restart Apache:

sudo systemctl restart apache2

Create The Lounge Nginx Reverse Proxy

You can set up a reverse proxy to access Lounge from a remote computer or network. In this example, the tutorial will set up an Nginx proxy server.

First, install Nginx:

sudo apt install nginx -y

By default, Nginx should be enabled if it is not activated. use:

sudo systemctl start nginx

To enable Nginx to be started on boot, use the following command:

sudo systemctl enable nginx

Example output if successful:

Synchronizing state of nginx.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable nginx

Verify the status of Nginx:

sudo systemctl status nginx

Example output:

How to Install The Lounge IRC Client on Ubuntu 20.04

Now, create a new server block as follows:

sudo nano /etc/nginx/conf.d/irc.conf

You will need an active domain name which can be purchased for as little as 1 to 2 dollars if you do not have one. NameCheap has the best cheap domains going around and if you prefer a .com, use Cloudflare.

After you have created your sub-domain, add the following to the server block file:

server {
      listen 80;
      server_name irc.example.com;

      access_log /var/log/nginx/irc.access;
      error_log /var/log/nginx/irc.error;

      location / {
          proxy_pass http://127.0.0.1:9000;
          proxy_set_header Host $host;
          proxy_set_header X-Real-IP $remote_addr;

          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_set_header X-Forwarded-Proto $scheme;
          proxy_set_header X-Forwarded-Protocol $scheme;
          proxy_set_header X-Forwarded-Host $http_host;

	# by default nginx times out connections in one minute
	 proxy_read_timeout 1d;
      }
}

Save the file (CTRL+O), then exit (CTRL+X).

Now do a dry run to make sure no errors in the Nginx configuration or your server block:

sudo nginx -t

If everything is working correctly, example output should be:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Reload Nginx for the change to take effect:

sudo systemctl reload nginx

If you have set up your domain and DNS records to point to your server IP, you can now access your IRC Client at irc.example.com.

Secure Nginx or Apache with Let’s Encrypt SSL Free Certificate

Ideally, you would want to run your Apache or Nginx on HTTPS using an SSL certificate. The best way to do this is to use Let’s Encrypt, a free, automated, and open certificate authority run by the nonprofit Internet Security Research Group (ISRG).

First, install the certbot package as follows:

Apache:

sudo apt install python3-certbot-apache -y

Nginx:

sudo apt install python3-certbot-nginx -y

Once installed, run the following command to start the creation of your certificate:

Apache:

sudo certbot --apache --agree-tos --redirect --hsts --staple-ocsp --email you@example.com -d irc.example.com

Nginx:

sudo certbot --nginx --agree-tos --redirect --hsts --staple-ocsp --email you@example.com -d irc.example.com

This is the ideal setup that includes force HTTPS 301 redirects, Strict-Transport-Security header, and OCSP Stapling. Just make sure to adjust the e-mail and domain name to your requirements.

Now your URL will be https://irc.example.com instead of HTTP://irc.example.com.

Note, if you use the old HTTP URL, it will automatically redirect to HTTPS.

Comments and Conclusion

In the tutorial, you have learned how to install The Lounge IRC Client on Ubuntu 20.04. The IRC Client is an alternative to many others, providing an excellent clean and beautiful UI for those who want to have something a little nicer compared to many IRC clients’ old-school styles.

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
adplus-dvertising
0
Would love your thoughts, please comment.x
()
x