TheLounge official documentation page.
1. Install Node.js LTS or the latest version
2. Download thelounge.deb
from the latest release page
wget https://github.com/thelounge/thelounge/releases/download/v4.2.0/thelounge_4.2.0_all.deb
3. Use APT to install
apt install ./thelounge_4.2.0_all.deb
1. Edit the config file
vi /etc/thelounge/config.js
The config file is does a good job explaining all the settings. Read through it and set what you need/want. The Lounge config page is very clean and helpful too.
TheLounge will start up and work without any modification to its config.
thelounge
command needs to be run as thelounge
user.
sudo -u thelounge thelounge <arguments>
1. Add a new user
sudo -u thelounge thelounge add ross
2. List all users to confirm your new user was created.
sudo -u thelounge thelounge list
server {
server_name lounge.domain.com;
listen 443 http2 ssl;
ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem;
location / {
proxy_pass http://192.168.2.6:9000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Connection "upgrade";
proxy_set_header Upgrade $http_upgrade;
}
}
1. Make sure the following modules are enabled: headers
, proxy
, proxy_http
, proxy_wstunnel
, rewrite
a2enmod headers proxy proxy_http proxy_wstunnel rewrite
2. Create a new vhost file
vi /etc/apache2/sites-available/lounge.example.com.conf
3. Modify this vhost config to fit your setup.
<VirtualHost *:80>
ServerName lounge.example.com
ServerSignature Off
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ErrorDocument 503 /error/503.html
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/socket.io [NC]
RewriteCond %{QUERY_STRING} transport=websocket [NC]
RewriteRule /(.*) ws://[IP-of-TheLounge-Server]:9000/$1 [P,L]
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
ProxyVia On
ProxyRequests Off
ProxyAddHeaders On
ProxyPass / http://[IP-of-TheLounge-Server]:9000/
ProxyPassReverse / http://[IP-of-TheLounge-Server]:9000/
ProxyTimeout 86400 # 1 day
</VirtualHost>
To upgrade TheLounge, follow the installation steps again then restart the service.