progmaticltd / homebox

A set of ansible scripts to build a personal mail server / private cloud / etc.
https://homebox.space/
GNU General Public License v3.0
461 stars 52 forks source link

VPS DNS Managed Subdomain #362

Closed gdbaldw closed 3 years ago

gdbaldw commented 3 years ago

Please, walk through the DNS records for a DigitalOcean project. HomeBox should manage its subdomain DNS, but DigitalOcean DNS manages the domain example.com, with...

site1.example.com A-record to "Old Droplet1" site2.example.com A-record to "Old Droplet2" mail.example.com A-record to "New Droplet for HomeBox, Debian 10"

So, do I also add A and NS records? I tried several ways, and now it set at:

main.mail.example.com A-record to "New Droplet for HomeBox, Debian 10" mail.mytradingpartner.com NS-record to main.mail.mytradingpartner.com

Config files and console out are below:

<hosts.yml>
all:
  hosts:
    homebox:
      ansible_host: mail.example.com
      ansible_user: root
      ansible_port: 22

<system.yml>
network:
  domain: example.com
  hostname: mail.example.com

Install fails at:

TASK [dns-server-bind : Ensure the main record resolves to me] ***************************************************************************************
changed: [homebox]
...
FAILED - RETRYING: Check DNS propagation (10 retries left).
...
gdbaldw commented 3 years ago

I'm no DNS Wizard, but researching my issue found that DigitalOcean DNS does not support SOA Records to a subdomain, so HomeBox setup requires a DNS registrar that supports a Glue Record, as explained in the HomeBox Pre-Install Documentation. Sad that DigitalOcean fails to support subdomains below their DNS management.

Alternatively, a HomeBox configuration without self-hosted DNS/Bind would require many hand-coded DigitalOcean DNS Records. As an example, Mail In A Box works on DigitalOcean and explicit instructions are provided for all the required DNS records. Similar instructions, all on one page, might be useful for setting up HomeBox.

arodier commented 3 years ago

We are not planning to support an external DNS server. HomeBox is an all-in-one solution for self-hosting, managing everything related to email hosting. If you want something more flexible, I suggest you to use one of the other solution mentioned in the documentation. For instance, Mail-In-a-Box, yes.