Self hosted Mender server

Hello,

I am looking for some guidance in the following:
I want to host a Mender server for, hopefully, future production use. For simplicity’s sake, we need to host our own server so it makes sense to do so. My question is: what issues have people been facing when hosting their own server.
Also, one of my questions would be: if the mender server completely crashes, for any reason at all, creating a new Mender server and hosting it at the same URL would allow me to “recover” (re-add) all the devices without having to manually connect to each one? In my opinion, since mender.conf has the following stanza:

    "ServerCertificate": "/etc/mender/mender.pem",
    "Servers": [
        {
            "ServerURL": "https://mender.domain"
        }
    ]

I would guess that the devices will, at regular intervals poll https://mender.domain, which will allow me to just accept all the devices as new devices. Is that right?

Thanks in advance!

Hi @silviub,

while I do not really know what you mean by “completely crashing”, the general advice, as anywhere in IT is: have a tested backup and restore strategy. The documentation on this is here.

What issues you may face depends on your project and set up, like scaling, hosting, etc. If you run into a specific problem, feel free to ask about it here, or (sales pitch) just use Hosted Mender where we take care of this :slight_smile:

Greetz,
Josef

Hello, @TheYoctoJester,

By “complete crashing” I mean something catastrophic. I don’t know, the DC catches fire :smiley:
The question is: would a new mender instance, hosted at the same URL, using certificates signed by the same authority, be able to register the devices that were already registered in the old Mender server? That’s basically my question, since this is an extreme scenario so, if something like this happens, and it’s still possible to recover, then I guess anything else is rather simple :smiley:

Thank you.

Hi @silviub,

lets say, according to my understanding it should work like that. But why not just give it a short test, and then let us know? Should be relatively straightforward.

  1. get the integration repo
  2. spin up server
  3. register device
  4. spin down server
  5. wipe server
    6 spin up server again
  6. see what happens :slight_smile:

Greetz,
Josef

To be honest, I was hoping someone already tested this.

Still, I ran the tests, it works. The only thing is that the devices need a reboot / a restart of the mender-client. I would guess that the DNS is cached somewhere, and on systemctl restart mender-client that DNS entry is flushed or something.

P.S. (1): the OS DNS was updated, as both ping mender.domain and dig mender.domain were showing the correct IP address.
P.S. (2): It might make sense to update that DNS record either on schedule or before calling the endpoint.

Thank you!

1 Like