Roundcube is amazing email webmail software. Not only does it have encryption (awesome) but it also seems to have DKIM and the full meal deal. Best of all it comes with Yunohost as a one-click and well supported install.
It is a ‘one-click install’ on Yunohost… However… you should consider before you begin, if you want it sitting on your
maindomain.tld. I’ll give you a quick example and why: Most people , if not many people, would want something like WordPress to be the main landing ‘app’ when people from the outside world go to
maindomain.tld. However, Yunohost won’t allow you to do this if Roundcube (or any other app) is already installed and using the
maindomain.tld‘. When you install Roundcube out of the gates and use the default settings, it will install it at
maindomain.ltd/webmail. So if you install Roundcube and then immediately to to install WordPress, it won’t let you do it there. But WordPress secretly puts the default installation directory as
maindomain.tld/blog so, like me, you might not even notice it wasn’t installed at
maindomain.tld/. The great news is that even if you, like me, already installed both in their default locations, you can move them around easily with YH. But, it’s better to know about this and consider it and maybe setup accordingly before you begin. With all that said, if you agree with my strategy, you might want to install it like I did at a subdomain called
webmail.maindomain.tld. I will continue the tutorial so you can set it up that way on Digital Ocean like that.
Set up DNS Records In Digital Ocean
- Go to networking
- Go to your YH domain
- add in these records like this:
In the DNS section of this new domain it will give you some recommended DNS records to make it legit.
hostname | will direct to | TTL
webmail | your server | 300 (change back to 3600 later)
*.webmail | your server | 300 (change back)
Hostname | Authority | Tag | Flags | TTL
webmail | letsencrypt.org | issue | 128 | 300 (change back to 3600 later)
Now let that start to propagate through the internet and let’s do the second step
Setup Subdomain in Yunohost
From your home dashboard:
- + Add Domain button
- “I already have a domain” radio dial
- Enter ‘webmail.domain.com’ using your domain for domain.com
- “Add” button
- Wait while it processes a while
Now your sub-domain is setup in YH, the records on your server are pointing to it, but it doesn’t have encryption yet (SSL Cert). The domain must be fully propagated for that to work.
Setup Lets Encrypt Certificate for Sub-domain
From your home dashboard in YH:
- select your new YYY.domain.com subdomain
- SSL Certificate (white button with lock)
- If the green “Install a Let’s Encrypt certificate” is clickable click it, if not:
- in a terminal, try
ping webmail.domain.comand see if it gets a bounce back. If not, you probably have to wait longer
- in a terminal try
dig webmail.domain.comto see if your domain shows up paired with an IP address, SSL cert installation ‘should’ work
- Also check ports 80 and 443 are open for sign.domain.com in this tool
With all the above checking as ‘ok’, and after waiting 5 or 10 minutes and it still isn’t clickable, I found once that logging out of the YH admin or doing a control f5 refresh helped. For me, one time it took only 10 minutes to propagate and another time it took about 1 hour…. another time 2 hours. Another time… a whole day. So, who knows how long it will take.
After clicking it will ask “Are you sure you want to install a Let’s Encrypt certificate for this domain?” which you will obviously approve. If all goes well it will say ‘Great! You’re using a valid Let’s Encrypt certificate”.
No point continuing until you have your SSL so get coffee and a lunch and proceed to app installation after that.
Installing Roundcube App in Yunohost
Now that your sub-domain and SSL certificates are set up, you are readying to install Roundcube. From your YH home dashboard:
- + Install
- Search “roundcube” – you should see ‘Roundcube – Open Source Webmail software’ show up
- Click the green + Install button
- Select your newly-created subdomain from the dropdown in the ‘Choose the domain where this app should be installed’ field.
- For Roundcube, probably you’ll want to expose this to the outside world since you might want non-users to be able to use it? It’s a personal choice and may require re-thinking later, but for now I’m installing with ‘yes’ selected here.
- At bottom of summary page, if all looks good click the green ‘install’ button
If all goes well you should see a success message. Test your new Send app by going to webmail.yourdomain.com. It also should take you there from inside your YH single sign-on account dashboard.
Bonus Section – How to Configure Email DNS Record settings for Yunohost
“Section Coming Soon ™”
A final bonus section explaining all the email configuration and and DNS record stuff is still needed here, and…. finished. You can click here to go to that now.