If security is one of your concerns, search for “HTTP client side certificates”. TL;DR: you can create certificates to authenticate the client and configure the server to allow connections only from trusted devices. It adds extra security because attackers cannot leverage known vulnerabilities on the services you host since they are blocked at http level.
It is a little difficult to find good and updated documentation but I managed to make it work with nginx. The downside is that Firefox mobile doesn’t support them, but Firefox PC and Chrome have no issues.
Of course you want also a server side certificate, the easiest way is to get it from Let’s Encrypt
I remember that I started by following these two guides.
https://fardog.io/blog/2017/12/30/client-side-certificate-authentication-with-nginx/
https://stackoverflow.com/questions/7768593/
something I’m not sure it is mentioned here is that android (at lest the version on my phone) accepts only a legacy format for certificates and the error message when you try to import the new format is totally opaque. If you cannot import it there just check openssl flags to change the export format.