Running service at two different locations


I am trying to run my own mail server. I used this image and it works well.

I want to further improve it and keep access to my mail in case of the server stopping unexpectedly (e.g. power outage, device failure, data failure, internet connectivity failure or nukes).
To accomplish this I want to run it on two machines at different locations.
(How is this done for other web services?)

I am trying to figure out a somewhat practical way of accomplishing this.
With this post I hope to gain some knowledge and advice.

The things I have to consider are:

  • The sharing of data (e.g. e-mails, addresses) between the servers.
  • DNS records updating; the ip’s of the currently running instances of the server should be added, and the ones that stop have to be removed. (I think :grimacing:)

I know that Docker Swarm exists as well as other programs to link several hosts together into a network.
However I am not (very) familiar with them.

Can you people give me advice or provide me with relevant information???