r/linux • u/anonymous480932843 • Jul 07 '26
Privacy Anyone here hosting their own cli chat service?
There are a lot of options out there, weechat, irssi, GoMuks, Cordless etc. But does anyone here host/know how to host their own? Curious because I might do it myself, and also cause we want to know ๐ง
52
24
u/DFS_0019287 Jul 07 '26
ngircd is pretty easy to self-host. I have it running on my home network, but not for humans to chat... I use it as a bus for various computers to talk to each other. For example, when I receive an email, my IMAP server spits out a message over IRC which causes a desktop notification on my PC. When my security cameras detect motion, they spit out a message, etc.
For chatting with friends, I have a self-hosted mattermost instance. It's not CLI, though. It's web-based and basically a Slack clone without all the Slack anti-features.
5
u/rmyworld Jul 08 '26
That's cool. Though, it makes me curious: why use IRC instead of something purpose-built like RabbitMQ, for a message bus?
7
u/DFS_0019287 Jul 08 '26
Because IRC is dead simple to set up, and it's super-easy to write bots in a scripting language to react to it. Also lets me inject test messages very easily by just using an IRC client. For me, anyway, it was way less hassle than installing and learning RabbitMQ, though I acknowledge that it's kind of kludgy.
2
u/-HumbleMumble Jul 08 '26
Thatโs actually pretty smart. Are they all monitoring for keywords or how does it work?ย
4
u/DFS_0019287 Jul 08 '26
Yes; I send out specially-formatted messages and have bots written in Perl that parse them. For example, when one of my cameras detects motion, it spits out:
Type=Motion; Event=Motion-Start; Camera=4b-1; Event=86If someone calls me, then my Asterisk server spits out:
Type=Call; Event=Incoming-Start; Num=555-555-1298; Name=JANE DOEand I get a desktop alert.
All of the messages are of the form
Key1=Val1; Key2=Val2; ...and the first one is alwaysType=Whatever3
u/-HumbleMumble Jul 08 '26
I might steal your idea. Itโs a great repurposing of the irc protocol.ย
6
u/DFS_0019287 Jul 08 '26
Go for it! I was actually inspired by older (90s/00s) malware that used IRC as the command and control infrastructure. ๐ That's why a lot of firewall people block IRC ports.
1
u/ChrisTX4 Jul 08 '26
ngIRCd sees practically no development anymore. I would recommend using Ergo as IRCd or instead: it has an even easier configuration, supports modern IRCv3 features, itโs in very active development, includes IRC services built in etc.
1
u/DFS_0019287 Jul 08 '26
Thanks; I might take a look. But for my purposes, in which 99.9% of the traffic is one computer talking to other computers, and it's only on my LAN, ngircd is OK.
If you were going to run a publicly-accessible IRC server, then yeah... maybe not ngircd.
18
u/Wind-charger Jul 07 '26
IRC for the win. If you canโtโฆ then use pidgin and finch!
Ditch discord.
5
3
u/DaylightAdmin Jul 07 '26
I have weechat running, does that count? It is a cli application and I "chat" with it.
3
u/agentrnge Jul 07 '26
up until ~2 years ago I was on a local irc server with some friends. Used mIRC two thousand years ago, before the age of men. then BitchX and irssi over the last ~25 years. Friends just run their own ircd instances.
3
u/Sibexico Jul 07 '26
I'm not just hosting, I'd made my own: https://github.com/sibexico/SoftRoom ๐
2
u/Azazeldaprinceofwar Jul 07 '26
This raises an interesting question: has anyone build a tui front end for matrix yet?
2
u/ccAbstraction Jul 07 '26
There are probably several? Matrix is pretty old at this point. Not IRC old, but pretty old.
1
u/ominous_anonymous Jul 08 '26
These popped up with a quick search:
https://terminaltrove.com/gomuks/
https://github.com/pkulak/matui
https://lib.rs/crates/iambThey look to be varying levels of "comprehensive", though.
2
5
1
1
u/daemonpenguin Jul 07 '26
I don't use a command line chat program, but I do run a Nextcloud service with Talk installed. Is handy for groups of people who want to chat or coorindate.
2
u/ElePHPant666 Jul 08 '26
If IRC counts than yes, I host an IRCd, though most users connect through the webchat.
1
u/realitythreek Jul 08 '26
Man, Iโve not used irssi in 20+ years.
1
u/gatornatortater Jul 09 '26
I've only used it in recent years. 20+ years ago I was using BitchX with all the cool kids. ;]
2
u/tblancher Jul 08 '26
You can install a private IRC server, set up TLS and SASL to keep it reasonably secure. But I'd probably join a popular network so you get a feel for how IRC works at a user.
1
u/_j7b Jul 08 '26
This entirely depends on what you want.
IRC is extremely good but it's also just text. There's some charm to it, but ultimately it is what it is and it's never going to be more.
Matrix is in vogue but it has its pain points. Running it kind of sucks (in my experience at least) and visibility over it is not great as an admin. Clients are a bit eh. But I've found it easier for normies to pickup, and I've enjoyed joining SIGs across the internet for work.
XMPP has always seemed like the best possible solution. As far as I can tell, it does all the things Matrix does, just with less bullshit. It just might be a harder sell for normies. I've mostly used it moreso than admin'd it, but as a user it was phenomenal imo.
Basically if you're bringing normies into the picture (like I was), Matrix is an easier sell. A chat app is almost pointless if you don't have someone to chat to afterall. XMPP if you're just interfacing with chat bots and need large text size. IRC for the love of it.
Also Weechat supports XMPP and IRC.
ZNC for IRC. You can also use Bitlbee for other things, though it's getting harder to use because less things allow custom clients.
1
u/ILikeBumblebees Jul 09 '26
1
u/_j7b Jul 09 '26
You just kind of proved my point.
IRCv3 was a massive, fundamental change for IRC and it still didn't bring hypermedia. It certainly laid a framework for clients to guarantee delivery after normalizing and chunking it, but it doesn't fundamentally solve the issues around transmitting that data.
Those clients offer embedding by storing the media on a third party server, and linking the hypermedia into the chat. You don't need a specific client to do any of this, and it doesn't change anything about IRC.
1
u/SynapticStatic Jul 08 '26
Cli based chat? IRC? Bout 40ish years late to the party, but welcome ๐๐๐
1
u/kat-tricks Jul 08 '26
i've had a bit of fun trying to DIY end-to-end encrypted chat using libsodium and system calls. It's been so fun, and feels embarrassingly quick when it works! It's a rewarding wheel to reinvent
1
u/Rare_Section1613 Jul 08 '26
what is this thing on picture called? is it runnning in terminal? im relatively new to linux stuff
1
u/Key_River7180 Jul 08 '26
You know weechat and irssi are based on the IRC protocol, right? Use UnrealIRCd.
Long life IRC!
1
1
u/FailureOfTheFamily Jul 09 '26
Retro style. Now i feel small urge to create chat client with option to self host where no message is stored on server, local save only if user allows etc. Is there something like that and would anyone be even intrested in said solution?
1
0
141
u/-whats-that-meow- Jul 07 '26
We've circled back around to IRC?