Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

finalize

andi2422ddcee00e0f3
diff --git a/docs/SELF_HOSTING_HTTPS.md b/docs/SELF_HOSTING_HTTPS.md
index 57abed2ab..df379ac8c 100644
--- a/docs/SELF_HOSTING_HTTPS.md
+++ b/docs/SELF_HOSTING_HTTPS.md
@@ -8,6 +8,8 @@ We can have https certificates without having to expose our precious hosts to th
Since VPN is a beast of it's own we'll only handle the certificates for now and grant https traffic to our local network hosts.
+This guide assumes that you are running a Linux host, everything else is not covered.
+
## Components
Given we have the following setup:
@@ -44,6 +46,8 @@ They provide tools to automatically create certificates with a challenge to ensu
Therefore the tool needs to have access to the DNS provider to generate temporary TXT entries on the DNS entry.
If all is checked, the certificate authority of Let's encrypt singns the certificate and it can be used.
+We will make use of a wildcard certificate, so we can serve all our services with one certificate.
+
### proxy
A proxy is optional but desirable. It acts as sort of a gateway to our service and can be a single entrypoint to multiple services on our homelab.
@@ -79,7 +83,8 @@ This is the tools I picked and that I know to work, your choice may be different
But the main tasks are the same, so you can adapt to your choice.
1. register with desec.io and choose a name
- 1. create a new A record that points to your service, e.g.: opengym.myhomelab.dedyn.io (desired name) - 192.168.0.100 (the ip of your homelab)
+ 1. create a new A record that points to your service, e.g.: `*.myhomelab.dedyn.io` (Wildcard!) - 192.168.0.100 (the ip of your homelab)
+ 2. A wildcard certificate handles all certificates for that given host. e.g.: `opengym.myhomelab.dedyn.io` and `immich.myhomelab.dedyn.io` can share the same certificates.
2. create an API token for updating the domain settings (`Can create domains` and `Can delete domains` activated), be sure to note the token, it is only displayed once.
2. install certbot on your host
1. most linux distributions provide the packages for this, e.g. debian: `apt install certbot python3-certbot-dns-desec` check the [docs](https://desec.readthedocs.io/en/latest/integrations/lets-encrypt.html)
@@ -92,7 +97,7 @@ But the main tasks are the same, so you can adapt to your choice.
--agree-tos \
--no-eff-email \
- -d "opengym.myhomelab.dedyn.io"
+ -d "*.myhomelab.dedyn.io"
```
2. the certbot will also create a systemd service that checks and renews the certificates automatically.
3. install caddy
@@ -110,22 +115,35 @@ But the main tasks are the same, so you can adapt to your choice.
}
# define desec configuration
(desec) {
- tls /etc/letsencrypt/live/opengym.myhomelab.dedyn.io/fullchain.pem /etc/letsencrypt/live/opengym.myhomelab.dedyn.io/privkey.pem {
+ tls /etc/letsencrypt/live/myhomelab.dedyn.io/fullchain.pem /etc/letsencrypt/live/myhomelab.dedyn.io/privkey.pem {
protocols tls1.3
}
}
- # reverse proxy config
+ # reverse proxy config for opengym
opengym.myhomelab.dedyn.io {
import desec
reverse_proxy http://192.168.0.100:8080
}
+ # config for some other service
+ nextcloud.myhomelab.dedyn.io {
+ import desec
+ reverse_proxy http://192.168.0.100:8081
+ }
```
be sure to check the docs for details.
-And that's about it. Now you should be able to access your opengym instance via https with working passkeys. Be sure to update the opengym config accordingly.
+And that's about it. Now you should be able to access your opengym instance from your local network via https with working passkeys. Be sure to update the opengym config accordingly.
+
-### Alternatives
+### Alternatives
- DNS providers: [certbot provider list](https://certbot.eff.org/hosting_providers) so many options...
- Let's encrypt clients: see [here](https://letsencrypt.org/docs/client-options/)
- reverse proxy: nginx proxymanager, easier with web GUI
+
+## Conclusion
+
+We created a local-network-only access to our services with HTTPS using Let's encrypt, certbot and caddy.
+
+Next time we'll handle a VPN connection with wireguard, desec and automatic IP updater, so we can access our services from the internet.
+