Closed Qpernicus closed 2 years ago
Hey,
I just did this setup for my own deployment. As a disclaimer, I did not follow everything as is because my setup is a bit different but hopefully I can help a bit.
So, instead of using PiHole I'm using Adguard Home on my server. Because my network is not configured (yet) to use this DNS server I had to manually make the server use it. Also, my laptop is also configured to use this DNS server.
Now, for my setup, as I don't have Proxmox, I setup Home Assistant (again) to be able to reach it externally. To do that I setup a DNS entry (on cloudflare on my case) that points to my public IP address. I also added a CNAME record to the same A record. Then, on the Traefik's config file I added the router with my host and the service that acts as a load balancer. The router determines the host name that the proxy answers to while the service redirects the client to the correct IP and Port in your network. For this to work you need to add the service to the router entry.
Here's an example:
http:
#region routers
routers:
home-assistant:
entryPoints:
- "https"
rule: "Host(`homeassistant.mydomain.com`)"
tls: {}
service: home-assistant-service
#endregion
#region services
services:
home-assistant-service:
loadBalancer:
servers:
- url: "http://192.168.0.10:8123"
passHostHeader: true
#endregion
Don't forget to port forward external connections directly to your Traefik instance in your router!
This makes it possible to be outside, hit whatever URL you set and the following happens:
Hope it helps!
Hey,
I just did this setup for my own deployment. As a disclaimer, I did not follow everything as is because my setup is a bit different but hopefully I can help a bit.
So, instead of using PiHole I'm using Adguard Home on my server. Because my network is not configured (yet) to use this DNS server I had to manually make the server use it. Also, my laptop is also configured to use this DNS server.
Now, for my setup, as I don't have Proxmox, I setup Home Assistant (again) to be able to reach it externally. To do that I setup a DNS entry (on cloudflare on my case) that points to my public IP address. I also added a CNAME record to the same A record. Then, on the Traefik's config file I added the router with my host and the service that acts as a load balancer.
The router determines the host name that the proxy answers to while the service redirects the client to the correct IP and Port in your network. For this to work you need to add the service to the router entry.
Here's an example:
http: #region routers routers: home-assistant: entryPoints: - "https" rule: "Host(`homeassistant.mydomain.com`)" tls: {} service: home-assistant-service #endregion #region services services: home-assistant-service: loadBalancer: servers: - url: "http://192.168.0.10:8123" passHostHeader: true #endregion
Don't forget to port forward external connections directly to your Traefik instance in your router!
This makes it possible to be outside, hit whatever URL you set and the following happens:
Cloudflare (or your DNS provider) redirects the request to your house (your external IP)
Your router redirects external connections to your Traefik instance (watchout for the correct ports!)
Traefik analyses the incoming connections and redirects them to the correct service (defined in your config file)
The service forwards the request to the final component!
Hope it helps!
Hey thx for you reply! Although it is useful info (using Home Assistant as well) I am referring to the part of the video where Tim mentioned he is using pihole for internal DNS as well as external through traefik.. I got the external part working but when internal is activated it stops working/blocks external or something. I assumed he put homeassistant.mydomain.com in pihole and point it to... well. Which IP?
The IP of the proxy. All records on the DNS (both external and internal) go to the proxy
Hi,
So, i followed you guide on SSL everything (https://www.youtube.com/watch?v=liV3c9m_OX8)... Works like a charm, but what i cannot find. You mention using PiHole for you local DNS (so that would be: https://www.youtube.com/watch?v=kKsHo6r4_rc). But is that BESIDES traefik or ' instead' ? Example:
Proxmox you put in Traefik for PVE1.domain. Do you also put a local DNS in Pihole for this? And if so:
I cannot find these answers online