The Lounge
The Lounge is an open source IRC web client written in JavaScript and distributed under the MIT License. This self hosted client stays always connected so you never miss out on the most important chats. Another goal of The Lounge is to bring modern chat features such as push notifications, link previews and many more to your IRC chats.
The Lounge is based on the project Shout from which it is a community driven fork.
Note
For this guide you should be familiar with the basic concepts of
Prerequisites
We’re using Node.js in version 18:
[isabell@stardusts ~]$ uberspace tools version use node 18
Selected Node.js version 18
The new configuration is adapted immediately. Minor updates will be applied automatically.
[isabell@stardusts ~]$
Your The Lounge URL needs to be setup:
[isabell@stardust ~]$ uberspace web domain list
isabell.uber.space
[isabell@stardust ~]$
Installation
Install SQLite (optional)
The Lounge supports logging to an SQLite database, but this is not a hard requirement. If you skip this step you will not have access to the search and chat backlog features, however you’ll still be able to manually go through your text logs if they are enabled.
The sqlite3
NPM package tries to use one of the pre-built SQLite binaries by default but unfortunately they are not compatible with Uberspace since it uses an older standard library. To fix this issue you will have to compile from source like this:
[isabell@stardusts ~]$ scl enable devtoolset-9 bash # [Required] Use the newer GCC compiler since the system's GCC compiler is too old
[isabell@stardusts ~]$ npm install --global --build-from-source sqlite3
[...]
added 1 package, and audited 331 packages in 3m
[isabell@stardusts ~]$
Install thelounge
Use npm
to install thelounge
globally:
[isabell@stardusts ~]$ npm install --global thelounge
[...]
+ thelounge@4.4.1
added 242 packages in 31.627s
[isabell@stardusts ~]$
Verify installation
[isabell@stardusts ~]$ thelounge --version
v4.4.1
Configuration
Configure web server
Note
The Lounge is running on port 9000.
To make the application accessible from the outside, configure a web backend:
[isabell@stardust ~]$ uberspace web backend set / --http --port <port>
Set backend for / to port <port>; please make sure something is listening!
You can always check the status of your backend using "uberspace web backend list".
[isabell@stardust ~]$
Create configuration file
Create the configuration directory:
[isabell@stardusts ~]$ mkdir ~/.lounge
[isabell@stardusts ~]$
To configure The Lounge you need to create the ~/.lounge/config.js
file with the following content:
"use strict"
module.exports = {
public: false,
reverseproxy: true
};
Alternatively you can download the full default configuration from the project repository:
Warning
If you choose this option change the values according to the config provided above.
[isabell@stardusts ~]$ wget https://raw.githubusercontent.com/thelounge/thelounge/master/defaults/config.js > ~/.lounge/config.js
[isabell@stardusts ~]$
From now on you can modify with the thelounge config
command.
For a full list of all configuration options see the official documentation.
Setup daemon
Create ~/etc/services.d/thelounge.ini
with the following content:
[program:thelounge]
command=thelounge start
startsecs=60
autostart=yes
autorestart=yes
After creating the configuration, tell supervisord to refresh its configuration and start the service:
[isabell@stardust ~]$ supervisorctl reread
SERVICE: available
[isabell@stardust ~]$ supervisorctl update
SERVICE: added process group
[isabell@stardust ~]$ supervisorctl status
SERVICE RUNNING pid 26020, uptime 0:03:14
[isabell@stardust ~]$
If it’s not in state RUNNING, check your configuration.
Finishing installation
Creating users
Since we do not run a public server we have to add users before we can use The Lounge:
[isabell@stardust ~]$ thelounge add isabell
2021-10-21 11:46:33 [PROMPT] Enter password:
2021-10-21 11:46:39 [PROMPT] Save logs to disk? (yes)
2021-10-21 11:46:41 [INFO] User isabell created.
2021-10-21 11:46:41 [INFO] User file located at /home/isabell/.lounge/users/isabel.json.
[isabell@stardust ~]$
If you need to change the password for a user this can be done with:
[isabell@stardust ~]$ thelounge reset isabell
2021-10-21 11:47:02 [PROMPT] Enter new password:
2021-10-21 11:47:06 [INFO] Successfully reset password for isabel.
[isabell@stardust ~]$
If you need to change the settings for a user this can be done with:
[isabell@stardust ~]$ thelounge edit isabell
[isabell@stardust ~]$
Launch The Lounge
Point your browser to your The Lounge URL and enjoy.
Updates
Update
To get the latest version of The Lounge you can use the npm
package manager:
[isabell@stardust ~]$ npm update --global thelounge
+ thelounge@2.7.1
added 4 packages, removed 22 packages and updated 12 packages in 3.176s
[isabell@stardust ~]$
Afterwards you have to restart you supervisord for The Lounge:
[isabell@stardust ~]$ supervisorctl restart thelounge
thelounge: stopped
thelounge: started
[isabell@stardust ~]$ supervisorctl status
thelounge RUNNING pid 11044, uptime 0:00:08
[isabell@stardust ~]$
If it’s not in state RUNNING, check your configuration.
Tested with The Lounge 4.2.0, Uberspace 7.11.5
Written by: roang <https://github.com/Roang-zero1>