PhiTux / DailyTxT

Encrypted Diary Web-App
https://hub.docker.com/r/phitux/dailytxt/
MIT License
223 stars 15 forks source link

How can I encrypt traffic with https? #14

Closed Lemon553311-dev closed 1 year ago

Lemon553311-dev commented 1 year ago

I really new to this, because I struggled to start this website in the first place, but I really want to encrypt my traffic (with that https padlock), so no hackers peek in my diary, but I'm not sure how can I even do that. Do I have to change some code in this app to do that?

PhiTux commented 1 year ago

Hi, nope, you don't have to change anything at the dailytxt-code to achieve a https-connection. To describe it simpe (but I'm not an expert either when it comes to using the correct words in the following description): At most time you'll have multiple network-services/websites running at the same server (like dailytxt, nextcloud, ...). They all run/listen at a different internal port (since it's only possible to have one service per port). But when connecting to that services from the internet, you will normally connect to them by subdomains like dailytxt.mydomain.tld, nextcloud.mydomain.tld,... everything with port 80/443 (=http(s)). That's when a web-proxy-server becomes necessary. It handles all incoming traffic especially on the ports 80 and 443 (http(s)) and redirects that traffic to the correct internal webservice (like dailytxt). And that web-proxy-server also handles the https-connection at the same time. When you're only handling docker-services, you might want to look at traefik, since it's handles https-certificates automatically. Otherwise you probably want to use either nginx or apache2. In all cases: you'll have to google for the specific webserver/proxy how to configure it correctly. This will take some time to get used to, but it's necessary... And if you're completely new, you might just want to google for "docker for beginners" or something like this... ;)