Lurkars / ghs-server

Server component for Gloomhaven Secretariat
https://gloomhaven-secretariat.de
GNU Affero General Public License v3.0
41 stars 15 forks source link

Info : document reference to implement let'encrypt ? #28

Open dcpc007 opened 5 months ago

dcpc007 commented 5 months ago

Hello,

You mention the possibility to create a certificate with letencrypt's to be able to use https. Do you have a document reference on how to do it from scratch please ?

I see many references to nginx configuration, then need another container in this docker-compose, or an independant install for the domain/VPS server ?

Thx a lot for your help.


Note : if i try to add only server.ssl.enabled=true in the config, i can't connect at all to the app.

Lurkars commented 5 months ago

With SSL only enabled, a self-signed certificate is used. So you have to open the server address directly in your browser and add an exception for the certificate, then it should work. There's a lot of information out there about Let's Encrypt, I've only documented the way to create a certificate for GHS. If you need some keywords to create a certificate, there are tools available such as certbot or acme.sh, but please note: you need a valid domain name that points to the IP you are using. If you are just self-hosting on your local network, let's encrypt won't work for you either.

dcpc007 commented 5 months ago

Hello, thanks,

i use an external vps + a gandi domain name. i already have several applications, but those in https include certificate management like gitlab (then still no front proxy installed as i don't master it).

searching if found this one that is quite explicit, even if i think i'll create a separate docker-compose to manage nginx + certbot for other apps like this. https://www.youtube.com/watch?v=J9jKKeV1XVE

Lurkars commented 5 months ago

I didn't watched the video, but of course, you can also use a ngnix as ssl proxy.

dcpc007 commented 5 months ago

Thx, i'll look later, as i plan to switch from individual docker/docker-compose to a k3s (currently learning and trying on my local and internal server only)