TheloungeWebircClient
This guide will help you woth installing thelounge webirc client
Add the following packages nodejs, python gcc make $doas pkg_add yarn python gcc make node $useradd -m thelounge Now switch to thelounge user on openbsd $doas su thelounge $doas npm install thelounge
Ran it on localhost 0.0.0.0:9001 & used relayd to manage its certs and subdomain to listen
edit /etc/relayd.conf add the following lines to relayd.conf
localhost="127.0.0.1"
table <znc> { $localhost }
table <webirc> { $localhost }
tls { keypair webirc.example.com }
match request header "Host" value "webirc.example.com" forward to <webirc>
relay wwwtls {
listen on $ip4 port 443 tls
protocol https
forward to <www> port 80 check icmp
forward to <znc> port 1338 check icmp
forward to <webirc> port 9001 mode loadbalance check icmp
}
relay www6tls {
listen on $ip6 port 443 tls
protocol https
forward to <www> port 80 check icmp
forward to <znc> port 1338 check icmp
forward to <webirc> port 9001 mode loadbalance check icmp
be sure to change your name from example.com to yourhost.com
now edit /etc/httpd.conf add the following lines to your httpd.conf
server "webirc.example.com" {
listen on * port 80
location "/.well-known/acme-challenge/*" {
root "/acme"
request strip 2
}
location * {
block return 302 "https://$HTTP_HOST$REQUEST_URI"
}
connection max request body 104857600
log access "webirc_access.log"
log error "webirc_error.log"
}
make sure you have the dns setup for nsd to resolve your host
then run this to restart relayd and httpd $doas rcctl restart relayd httpd
Now Edit /home/thelounge/.thelounge/config.js
public: true,
host: "127.0.0.1",
port: 9001,
reverseProxy: false,
maxHistory: 10000,
https: {
enable: false,
key: "/home/thelounge/webirc.example.com.key",
certificate: "/home/thelounge/webirc.example.com.crt",
ca: "/home/thelounge/dhparam.pem",
},
theme: "thelounge-theme-solarized",
prefetch: true,
disableMediaPreview: false,
prefetchStorage: true,
prefetchMaxImageSize: 2048,
prefetchMaxSearchSize: 50,
fileUpload: {
enable: false,
maxFileSize: 10240,
baseUrl: null,
transports: ["polling", "websocket"],
leaveMessage: "NaStYcOdE WebIRC",
// ## Default network
defaults: {
name: "IRCNOW",
host: "irc.example.com",
port: 6697,
password: "",
tls: true,
rejectUnauthorized: true,
nick: "Guest%%%",
username: "thelounge",
realname: "The Lounge User",
join: "#nastycode, #IRCNOW, #Team, #pnc, #waterboygospellyrics",
leaveMessage: "IRCNOW, IRC Forever..!",
// ### `lockNetwork`
lockNetwork: true,
// This value is set to `["sqlite", "text"]` by default.
messageStorage: ["sqlite", "text"],
// ### `useHexIp`
useHexIp: false,
// ## WEBIRC support
webirc: null,
add the following to your /etc/acme-client.conf
webirc.example.com {
#alternative names { example.com }
domain key "/etc/ssl/private/webirc.example.com.key"
domain full chain certificate "/etc/ssl/webirc.example.com.crt"
sign with letsencrypt
}
make sure to run the acme-client to create your certificate and keys so that your https will work
$doas acme-client -Fv webirc.example.com
be sure to change example.com to your hostname of your vps!!
then run this as thelounge user $doas su thelounge $doas /home/thelounge/node_modules/.bin/thelounge install $doas /home/thelounge/node_modules/.bin/thelounge start to start thelounge
Hope this gets your webirc client up and going but if you need help please email splinter@nastycode.com for mpre info on getting help with this program!
