Multiple instances of rest-server, same datadir?

Hi,

I’m currently running rest-server without --tls on my file server for taking backups from my internal trusted networks, but I would like it to also receive a backup from an external host on the internet using HTTPS.
Everything is configured correctly and working as expected right now, so I would prefer to keep the current non-TLS instance without modifications for my local backups and simply start a second instance of rest-server for this new purpose, so that I won’t have to change all existing backup jobs to use the new TLS/HTTPS setup.
Is it safe to use the same data directory and .htpasswd file for another rest-server instance, and simply start it on a different port than the first one?

Having the same rest-server instance listen on two different ports, with and without TLS, would actually be a nice feature. Maybe I should make a feature request. :slightly_smiling_face:

Thanks in advance!

Generally more complex setups like this should be handled by a front-end server like nginx. It’s trivial to set up rest-server without TLS for local usage, then have nginx add TLS and expose the server to the WAN.

2 Likes