I'm a brewing engineer by education, working these days as a Ruby developer. In this blog I post mostly technical writings

Digital Ocean + Yunohost + Rocket.chat simple setup

Here’s the steps I followed to setup a self-hosting solution for Rocket.chat:

Digital Ocean droplet

I ended up needing an instance with 4GB RAM (2 vCPUs
4GB / 50GB Disk). For Yunohost the image has to be Debian 11

Yunohost

ssh to your new droplet:

ssh root@<your droplet ip>

Change to /tmp:

cd /tmp

Get the Yunohost install script:

wget -O yunohost https://install.yunohost.org/

Run the script:

sudo /bin/bash yunohost

Let Yunohost overwrite and set any configurations it prompts for.

Login to your new Yunohost instance with a browser by going to the droplet IP address and finish the setup there.

Setup your domain (optional)

If you already have purchased a domain name, you can configure your Yunohost and Rocket.chat instances to use them by editing the ‘domains’ section in your Yunohost admin.

For my case, I set up two subdomains: yunohost.mydomain.com and chat.mydomain.com.

I then configured two A Records at my domain registrar, which in this case was porkbun.com:

Host: yunohost.<my domain>
Answer: <my droplet ip>
TTL: 600

Host: chat.<my domain>
Answer: <my droplet ip>
TTL: 600

Propagation took maybe a couple of minutes, after which I could access both my Yunohost and my Rocket.chat instances with the given addresses.

After you’ve setup Yunohost, you can ssh to your server if needed with:

ssh <your Yunohost admin user name>@<your droplet ip>
password:<your yunohost admin user password>

Rocket.chat setup

When logging in to Rocket.chat for the first time, you’ll be run through a basic setup.

After the setup, the one thing I still needed to do was setup an email account for outgoing emails. I used a Gmail account for this.

For this use case, I needed an “App Password” from my Google Account settings first. Make sure you’ve set up 2-Factor Authentication (2FA), then go to https://myaccount.google.com/apppasswords and generate and save a password for your Rocket.chat instance.

Logged in with your Rocket.chat admin user, first check your admin email address is correctly set by navigating to Users on the menu.

When the admin user email is set, go to Settings > Email > SMTP and set the following:

Protocol: smtp
Host: smtp.gmail.com
Port: 587
IgnoreTLS: false
Pool: true
Username: <my gmail address>
Password: <your new app password>
From Email: <my gmail address>

Save your changes and verify that it works by sending a test mail to your admin user.

Let’s Encrypt Certificates

In your Yunohost admin area you can set up Let’s Encrypt SSL Certificates for your subdomains. Go to Domains > your domain > Certificate > Install Let’s Encrypt Certificate.

In my case, there were some warnings, so I opened up the diagnosis page. The diagnosis indicated a few warnings and one issue, but since everything seemed to be working in practice, I decided to switch on “Ignore diagnosis checks” and proceed with installing the certificates. There seemed to be no further problems a and my certificates appear to function like they should!

Wrap-up

I’m very impressed with Yunohost so far. I had tried a couple of alternatives already, including CapRover, but the experience with Yunohost was extremely smooth up to this point!