Rocket.Chat, trying to save the kids?

I don’t know how many parents are on here but with the shutdown’s/stuck at home’s etc’s I set up my child a discord so that they could stay in communication with their friends. Worked great! For a long time!


Well I found out that the kids had been joining public chat rooms (about anime?). With older men. Who were then Sending illicit material to middle school girls. I subsequently struck discord from the network.

Onto why I’m making this post, I’m trying to find a self hosted solution that “the kids” will actually use. I think fits the bill? I’m not tech illiterate but getting too greasy with maintenance isn’t something that I’d like to do.

Matrix/riot looks interesting but it looks like a pain to set up.

I think theres a rocket chat app in sandstorm dot io

some other neat apps there too…

I haven’t heard of that one, I’ll look it up.

Oh neat, it’s a platform? It seems like it’s a web based docker?

Rocket Chat is neat but it’s got a lot of technical debt.

For a more maintainable long-term experience, I recommend either Mattermost or Element (AKA Riot). Mattermost is the easier of the two to set up.

1 Like

Excuse my ignorance but what does Technical debt mean?

I’ll look into mattermost, Element (riot) seems the most “interesting” but I don’t know if I’m capable enough technically to maintain/setup appropriately.

1 Like

Technical debt is a concept in software development that reflects the implied cost of additional rework caused by choosing an easy solution now instead of using a better approach that would take longer. As with monetary debt, if technical debt is not repaid, it can accumulate ‘interest’, making it harder to implement changes.

Essentially, the devs made the app with MeteorJS, which is a full-stack javascript framework that is heavily reliant on Mongodb. Nothing wrong with that per se but its mostly meant for prototyping and small-scale apps.

Already, people are finding it hard to use long-term due to the way that Rocketchat was designed. It’s very difficult for plugin authors to get a basic development environment set up because of the outdated and complex nature of the stack. This translates into less features for you.

For your needs of just a few users this shouldn’t be really be a problem, however, this particular solution does not grow well over time and as your user base increases (if you so plan on it).


Excellent explanation, thank you.

I think I’ll focus my attention on Mattermost.

1 Like

You’re welcome!

I also run Mattermost but NGL I have been thinking about switching to Riot, however, it seems hard to find the documentation to get it set up. This obfuscation is annoying.

Mattermost was pretty easy to install manually (great documentation) and it also comes with Docker instructions if you like to run your services that way.

I’ve watched some videos about matrix/element/riot/jitsi and honestly it looks really neat, it just also looks really difficult for a hobbyist like me to get running and maintain. I’ll probably try sooner or later.

In the interim I need something easy to maintain for the kids and mattermost seems like it has enough features to satisfy them.

If you wanna take it for a spin I can send you an invite link to play around?

Thank you for the offer!

It’s not necessary though, I haven’t had time today to try and get the mattermost back end running. Being able to run/maintain the back end on my server is going to be the biggest hurdle. Well that and getting the other kids to use it.

Thanks again for help!

You’re very welcome, good luck!

1 Like

All right, I’m probably making this way more difficult on myself- but I was really hoping to get mattermost working in a jail on TrueNas. Which seems theoretically possible.

I’ve been following this guide:

But I get hung up when they tell me to alter the sysctl tunable to 442, it just won’t let me in a jail. I also don’t know how to do it from the host.

Any ideas?

Holy Moly, what a journey. In case anyone is curious I figured it out, I have a mattermost running in a jail, with a postersql database and nginx as the reverse proxy.

So it’s all this neat little jail on the TrueNAS installation. If anyone’s curious I’ll write out how I did it, because it was not a cup of tea for a hobbyist like myself- but I don’t know how much interest there would be in it.


Do post anyway so that if someone ever has a need to troubleshoot stuff, we can have a referrence.

1 Like

All right, I’ll do my best to write up what I did-

So first and foremost I wanted this running on TrueNAS/FreeNAS because I like the design philosophy behind it as a piece of software. I know there are other solutions that make it easier but I didn’t want another box running in the house.

I also didn’t want it running in a VM, honestly I don’t know if that would have been easier because I didn’t try. This could be another scenario where I’m “wrong” but I just feel like a vm has more overhead than a jail, and I like the way jails seem to work.

So I pretty much made a default jail, the things I changed was DHCP auto-configure (want that check marked on) for ipv4, and then I made my domain name for the jail the same as the I don’t know if that part actually helps but I read that’s what a FQDN is.

So to start you need a “FQDN”, fully qualified domain name, pointing to your jail. This is an “A” record pointing at the IP of your jail. Well in my case pointing to my home IP, which I then had to forward the 80/443 ports from the jail IP.

NOW we gotta set up a database. We have two options, Postersql or MySql. I’m not going to lie, since I have zero experience with either of these? I went by logo- so Postersql wins.

I used this guide, as a guide:

Keep in mind though, I was using names/etc that I new I wanted for the Mattermost deployment.

The “important” thing is to make sure we trust the local connection that mattermost is going to make to it.

That’s just a screenshot from his guide, but that, we want that set to trust. Now in my version it was by default. This thing isn’t going to have any communication outside the jail so I think it’s fine.

Allright, so we have our domain pointed, our jail set up, and now our database set up. Next up is Mattermost itself. The actually install is pretty easy, I followed part of a guide (that actually wasn’t super useful but it was the only one I could find for FreeBSD).

It’s the link I posted previously in this thread, but I’ll be shamelessly pulling the parts I like out of it.

They said to install these:

pkg ins mattermost-server mattermost-webapp i18ntools

I don’t actually know what that i18ntools is. But just in case it’s the linchpin tying this thing together I say let it ride.

cp /usr/local/etc/mattermost/config.json.sample /usr/local/etc/mattermost/config.json
sysrc mattermostd_enable="YES"
chown -R mattermost:mattermost /usr/local/www/mattermost/client/
vi /usr/local/etc/mattermost/config.json

First line copies the default config into the config we’ll be using, second line makes it so mattermost starts as a service when the jail starts (like the guide had you do with the database), 3rd makes mattermost own it’s website? from what I can tell? Last line is us editing the config file.

Now we get to have more fun in configuration files. We have to tell the Mattermost installation how to talk to the Database. Believe it or not the official Mattermost documentation is really good at telling you how to configure things. Go figure.

the important part for us, being on FreeBSD, is that we’re going to vi into the config files to edit them to point to/and use our postersql database.

OK- We’re reaching the final steps here! Whew!
Now it’s time for nginx, which I had never used before, but let me tell you- this is a neat piece of software. No joke, it’s super nifty- it’s clean too.

before that though we need our certificate. Which was ALSO something I had never had to do before. Certbot FTW fyi! Another nifty piece of software!
There’s actually pretty good documentation on how to use this guy too:

I used cloudflare, which btw can take a bit for the nameservers to “update” which is why I have all that stuff at the beginning.

I’m going to assume you’ve successfully gotten your certificate and key for your FQDN, because now we’re onto the final stuff:

pkg ins nginx
sysrc nginx_enable=YES
vi /usr/local/etc/nginx/nginx.conf

First line installs it,
second line enables it to run as a service
third line is to get into the config file.

Again, Mattermost’s documentation is pretty good here, but there’s a couple things that are different since we’re using FreeBSD

The important thing to remember is we are NOT replacing our config file with what they write. We need to keep our Events/http tags. I also think it helps to add a comment letting you know where they end so:

events {
worker_connections 1024;
http {
include mime.types;
default_type application/octet-stream;


}#http end

I hope that makes sense- we basically follow the documentation I linked, but it goes where I marked it.

Cross your fingers, now we see if it all works.

system nginx start
system mattermostd start

Ok. If everything is configured right you should be able to go to your FQDN and you’ll see the landing page for mattermost. The only other thing I had to do was set my cloudflare ssl encryption to “full”, I was getting a too many redirects error before that.

Whew. That was a lot of typing. I hope it helps someone. Also, I’m a hobbyist, so I probably didn’t do everything the best way I could have. feel free to criticize me- cuz maybe we can find a better way to get it done lol!

1 Like

Ok- I rebuilt the chat server and got a bit more familiar with how everything works.

I separated all the parts into their own little clusters. So there’s a nginx jail, a postersql jail, and the mattermost jail-

It actually all really works well together.

The big thing that was causing a lot of the hangups is the permissions on the mattermost cluster/thing. You really gotta make sure the mattermost user owns what it’s /www/mattermost/ folder and the /etc/mattermost/

Just wanted to update the thread.

1 Like