Noob question: How do I restore my main website after setting up MiaB?

Hi all, I’m planning to set up Mail-in-a-Box soon, but I already have a website in the second-level domain. According to my understanding, MiaB takes control of your DNS so the main website won’t be accessible anymore. How do I restore it after installing MiaB?

Another question: after setting up MiaB, how do I update the system? Do I just use apt like usual or are there any special steps?

Another question: after setting up my Digitalocean droplet, do I need to create a regular user with sudo access or do I just keep using the root account?

Another question: is there a way to not install Nextcloud? I don’t need it at all and it feels like extra attack surface.

Thanks for all the work you guys do btw.

You do NOT have to allow MiaB to take over control of your DNS. In fact, I recommend against it strongly if you have a web server elsewhere or any other services on the domain. The guide was written with one goal in mind and that was to create a simple to maintain web server that someone COULD host a static website on if they so chose.

If you want to continue to host DNS elsewhere, such as with your registrar, or cloud provider then these are the steps that you need to take:

Ignore setting the glue records section of the install guide.
Once the box is set up, enter the A record(s) for your other services in the MiaB Custom DNS page. (This step is optional - it just makes the next step easier for some)
Copy the DNS entries from the External DNS page in the admin area to your DNS provider.

Ubuntu 18 introduced unattended-upgrades which MiaB uses. This automatically does the package upgrades, so there is nothing to do but an occasional reboot. You will be notified via the admin page when a reboot is necessary.

Honestly, it is much more secure to set up a sudoer than to use the root account for everything. So yes, I’d recommend that as well as turning off root login via SSH.
I also recommend changing the SSH port from the default port 22.

Yes, indeed it is possible. You would have to modify the install script(s). It can be done if you know your way around the command line and using a text editor. Of course, this is an unsupported modification so the package maintainers and others will be unable to offer support if something goes wrong.

Personally, I am with you. Not for the same reason though. My users simply do not use NextCloud. (Of course, I have never even told them that it is there!)

You do NOT have to allow MiaB to take over control of your DNS. In fact, I recommend against it strongly if you have a web server elsewhere or any other services on the domain. The guide was written with one goal in mind and that was to create a simple to maintain web server that someone COULD host a static website on if they so chose.

Please note it is not necessary to use external DNS. You may simply go to the MiaB admin page and add an A record for your main domain example.com, and for www.example.com. This keeps the advantages of having MiaB manage your DNS, and you don’t have to import or manually copy and paste lots of records.

Agreed, but there are advantages and disadvantages of using MiaB’s internal DNS. The main disadvantage being that it is a single point of failure.

Thanks for letting us know of the disadvantage. To me, the advantages of using the internal DNS outweigh the disadvantages, though, and it’s more dependent on personal (or company) preferences.

I am pointing this out since I, as another noob, found this post and mistakenly thought I had to use external DNS.

Fair enough. I will make it a point to reread through the thread and fix that misconception if possible. Thanks! :slight_smile:

@gabo ETA: I reread my original post and realize that my interpretation of it was that the OP had a website on an existing domain and did not want to change that current DNS setup (with the question ‘How do I restore it’), hence my reply. My reply was correct, but it COULD also have stated BOTH alternatives, which it did not. Thanks for pointing this out, and hopefully someone else coming along will see this discussion and not make the same interpretation as you did. :slight_smile:

1 Like

I would recommend to use a standalone domain for the box, and if you are using a domain for a high traffic / production website, to use an external DNS server for the additional domain.

Simply because, if you are restarting the MIAB server, the DNS will go down, and if your website domain is using MIAB server’s DNS, your website will go down too.

The DNS for the box is self sufficient, since DNS going down during server restarts is not going to affect your mails.