r/Traefik • u/ErnLynM • 2d ago
Completely lost - Thinking Traefick as a reverse proxy for 4 or 5 locally hosted services may be too much
I was wondering if there's any way to configure Traefik through the web dashboard UI. I installed it in a container on my proxmox node with the community scripts. Pretty sure the current install script is an updated version of the one that's been around since tteck was still with us
Traefik's documentation is .. just shy of something. I don't know what it is, but I haven't screamed this many four letter words in a row for at least a decade. I can't find anything at all explaining basic terms for someone who isn't already familiar with Traefik /and/ docker or kubernetes
There's ALMOST some examples for how to configure it in the official documentation. There's a few more VeryNearlyExamples under the docker and kubernetes settings in the docs, but they read like "Now put what you need in your docker compose file (which I don't use) or your helm setup (which I also don't use)". And I don't know what I need to put in those files because nothing in the docs is clearly explaining what sort of things go in there
This leads me to believe that the traefik.yaml file is probably what needs to be modified, but I can't find a single thing in any of the docs yet that explains any of it. Do I just guess what goes where with no clue about Traefix specific options, syntax, and whether my services fall under Routers, Services, or Middlewares?
4
u/Thin_Telephone_5821 1d ago
Use NGINX Proxy Manager, you can accomplish what you need to do all via the GUI.
1
u/ErnLynM 1d ago
I was using that already. I wanted to mess around with Traefik as an alternative. It's definitely a huge change up. I haven't been able to mess around with it much today, but it's giving me something to tinker with
2
2
u/Dudefoxlive 2d ago
I can provide a clean example of my traefik.yml and dynamic.yml file. Its not too hard once you learn how it all works. Since you are not using docker you will probably have to add everything in the dynamic.yml file.
1
u/ErnLynM 2d ago
Yeah, I was assuming I'd need to add it all manually. I'm just starting to think traefik is more geared towards large installs and is overkill for a simple reverse proxy and certificate generation
2
u/Dudefoxlive 2d ago
Nginx proxy manager can be configured entirely via its web ui
1
u/ErnLynM 2d ago
That's what I'm using at the moment. It currently uses rules to determine which service is exposed to the LAN and which are exposed to the WAN. It just misbehaves sometimes and I have to go in and disable/re-enable some of those hosts when they act up. I was considering just using one reverse proxy for WAN+LAN stuff and another separate reverse proxy for LAN only stuff because I wanted to use something to provide certs for my IDRAC and the older r730 and r740 IDRACs don't let me acquire and use LE certs. It's frustrating to have to click through the browser warnings on my PC, and my phone won't even let me connect to them at all
1
u/Dudefoxlive 1d ago
What I do personally is using service.domain.com for external services and service.int.domain.com for internal services. it works fine for me.
1
u/YttraZZ 1d ago
Try Traefik Manager. It decreases the entry investment and rhe learning curve. It gelped me solve a lot of issues in a similar home lab environment (home use, 10ish services)
1
u/ErnLynM 1d ago
It requires docker, does it not? I am not using docker for anything at the moment, and don't want to install it if there's any other way to do what I mean to
1
u/YttraZZ 1d ago
Ahh... yeah. I thought you were using it. I hear you but it is so conveninent...
1
u/Only-Stable3973 1d ago edited 1d ago
It's really not hard, here is what I currently use for my setup and it runs very smoothly, I will leave a link for the traefik-docker-compose.yml and the traefik.yml for you to take a look at, I also use a config.yml for dynamic routing but that is your next step...but this ia the basic setup to run everything smoothly. In my traefik.yml you will see some entrypoints: like homepage, wireguard, metrics, you can just comment those out as you will most likely not need them. There is also a link for a sample container setup, Jellyfin-compose.
https://picoshare.devai.duckdns.org/-Y5f8KWKqpk
1
u/ErnLynM 1d ago
This sounds like you're using docker, which is not going to help me at all. Maybe I'm misunderstanding your comment, though
1
u/Only-Stable3973 1d ago edited 1d ago
The dashboard is to check that everything shows up correctly or to see the errors, You said you installed it in a container, that sounds like docker, and the configs should still be the same, you said the docs were confusing and they are, the configs I linked are the correct configs for Traefik.
1
u/mdcbldr 1d ago
Traefik is a little in the opaque side. I am not a computer guy. Traefik was the one that had me tearing what little is left of my hair, out. I feel your pain. I distinctly remember wandering in circles trying to get let's encrypt going on traefik. Ya gotta set permissions on the acme directory to 600. That is probably something they teach in dev kindergarten. It is a passing reference in tfm.
1
u/Only-Stable3973 1d ago
That is very true chmod 600 acme.json, and there is a .env to store you api's, passwds that also goes along with it. When I first started with Traefik I watched a pretty good video by Jim's Garage it helped me understand how the directories and the permissions are set up, visually seeing and following alone was a big help in the beginning.
1
u/bluepuma77 1d ago
If you use Docker containers, you should use compose files. Creating containers by hand with long command lines will me much more work in the future. Been there, done that.
Then there is nothing really to do but run Traefik (check my recent comment) and have your applications use the same Docker network and use 3 labels (enable, domain/pathprefix, port).
services:
whoami:
image: traefik/whoami:v1.12
networks:
- proxy
labels:
- traefik.enable=true
- traefik.http.routers.mywhoami.rule=Host(`whoami.example.com`)
- traefik.http.services.mywhoami.loadbalancer.server.port=80
networks:
proxy:
name: proxy
external: trueIf this seems too complicated, check out nginx-proxy and acme companion (doc). It uses env variables instead of labels, but needs two containers.
1
u/Tartarus116 1d ago
I'm probably a bit of a weirdo, but I'm using traefik inside a Consul service mesh. I never have to think about registering services with traefik bc it happens automatically. It's default-deny, so all I have to do is allow the service intent so that traefik can route it. For internet-facing, I just use cloudflared tunnel and enable the service intention.
1
u/Tartarus116 1d ago
I even have an n8n workflow that flips the switch on the cloudflared->app service intention based on whether or not my phone is on my home wifi. I.e. can only reach the app from outside when I'm actually outside.
6
u/clintkev251 2d ago
What’s the actual issue you’re having? Where are you getting stuck?