r/Traefik • • Nov 01 '26

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?

3 Upvotes

39 comments sorted by

7

u/clintkev251 Nov 01 '26

What’s the actual issue you’re having? Where are you getting stuck?

3

u/ErnLynM Nov 01 '26

Immediately after installing it. The issue is I don't know how to configure literally anything in it at all and the official docs don't show anything other than docker or kubernetes related info

They don't explain where the corresponding info goes in the traefik.yaml file

7

u/clintkev251 Nov 01 '26

Traefik has a number of different dynamic configuration providers. Since you’re not using docker or kubernetes, what you probably want is the file provider. These are all detailed here including a basic example of creating a router and service for the file provider

https://doc.traefik.io/traefik/reference/routing-configuration/dynamic-configuration-methods/

2

u/ErnLynM Nov 01 '26

Thanks, I'll check that out as soon as I come back inside

I don't even know if those should be under http services, routers, or middleware. I'm also not sure if it can be set up to acquire and renew the LE certificate automatically with a corporate DNS challenge

5

u/clintkev251 Nov 01 '26

I think you probably just need to take the time to understand what each of those components actually does. If you step through the documentation starting at that link, it will give you a detailed explanation of each and also a more complete configuration which together will hopefully help you understand how to actually configure what you’re trying to do

2

u/ErnLynM Nov 01 '26

And I'm already slightly confused by the first code block in the example page. It appears that they router section just signifies the FQDN I want to use for the service, and 'my-service' is just what I want to refer to it as for organization in the yaml. loadBalancer: is throwing me. I only have one instance of it running. So, would I just put the single url there? And if I were to add a redundant copy of that service, just add the second url to that list?

under router:rule: that seems like I would be entering something like this, but I'm not entirely positive if I have the syntax correct

rule: "Host('truenas.my.domain.com')"

http:
routers:
my-router:
rule: "Host(`example.com`)"
service: my-service

services:
my-service:
loadBalancer:
servers:
- url: "http://localhost:8080"

3

u/clintkev251 Nov 01 '26

Yes, you understand correctly. It’s always a “loadBalancer” even if there’s just a single endpoint, but you could add multiple in that list depending on your use case. The rule defines how Traefik will route requests to that service (thus it being defined as part of a “router”) and Host would be the most common type of rule, defined by the host header of the request. Just one note there that the rule uses backticks ` not single quotes like you used in your example ‘

1

u/ErnLynM Nov 01 '26

Oh .. I wouldn't have noticed it. Thanks for the catch. I just copied and pasted it into a text editor and the backticks are much more clearly visible than they are on the docs page. Font and size matters to old eyes

1

u/ErnLynM Nov 01 '26

Okay, I have successfully added a service and traefik proxied it properly. Bonus points there. I also learned that the /etc/traefik/conf.d directory is good for separate yaml files for each service. Now to learn how to have it request and use let's encrypt certs using a cloudflare DNS challenge

2

u/clintkev251 Nov 01 '26

Glad you were able to make some headway

1

u/ErnLynM Nov 01 '26

To be more specific. I want to use it as a reverse proxy for non-docker services to provide certificates using a wildcard cert from let's encrypt to point at http://xx.xx.xx.xx:port

4

u/Thin_Telephone_5821 Nov 02 '26

Use NGINX Proxy Manager, you can accomplish what you need to do all via the GUI.

1

u/ErnLynM Nov 02 '26

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

u/zoredache Nov 02 '26

Another smallish proxy if you want some variety. Take a look at caddy.

1

u/ErnLynM Nov 02 '26

That's also on my list to play with and it has install options that aren't heavily leaning towards using docker/kubernetes. So it looks like the entire thing will be standard config files, and not me trying to figure out how to translate the docker yaml to text file configuration

2

u/Dudefoxlive Nov 01 '26

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 Nov 01 '26

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 Nov 01 '26

Nginx proxy manager can be configured entirely via its web ui

1

u/ErnLynM Nov 01 '26

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 Nov 01 '26

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 Nov 01 '26

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 Nov 01 '26

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

2

u/chronzz Nov 05 '26

Dev here 👋 You don't need Docker for it. TM runs fine as a regular systemd service and just edits your dynamic config wherever it lives.

Easiest way:

```bash

curl -fsSL https://get-traefik.xyzlab.dev | bash

```

Pick "Traefik Manager only" and then "Linux service" and point it at your config. You just need Python 3.11+ on the box.

More info here if you want it: https://traefik-manager.xyzlab.dev/

2

u/ErnLynM 28d ago edited 28d ago

I'm finally in a position to test this out. Thank you for the heads up! <3

-- edit --

I got it installed, but I need to rework file permissions in the /etc/traefik directory so manager can access them. Or I create a new LXC and run the install script from scratch on the new LXC. It's all just testing stuff anyway, so spinning a new one up is pretty straightforward

1

u/YttraZZ Nov 01 '26

Ahh... yeah. I thought you were using it. I hear you but it is so conveninent...

1

u/ErnLynM Nov 01 '26

Honestly, I'm not sure if you can even use Traefik manager with a Traefik installation that isn't docker based. I see that the yaml file appears to just point at wherever the Traefik configs are

1

u/YttraZZ Nov 02 '26

I think so if you share the logs, the static and dynamic files and mount them in the Traefik manager container.

Not my setup, ao i can not give any assurance it works.

1

u/Only-Stable3973 Nov 01 '26 edited Nov 01 '26

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

https://picoshare.devai.duckdns.org/-3ie43AtxRS

https://picoshare.devai.duckdns.org/-urxWNZDgGd

1

u/ErnLynM Nov 01 '26

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 Nov 01 '26 edited Nov 01 '26

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/ErnLynM Nov 01 '26

I'll look at it when I get home. I installed on an LXC container with no docker involved. So, docker compare files aren't likely to help unless I can find a way to edit the LXC setup to do the docker bits, but I didn't think that's how that worked

1

u/mdcbldr Nov 02 '26

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 Nov 02 '26

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 Nov 02 '26

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: true

If 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/ErnLynM Nov 02 '26

I'm not using docker containers, I'm using Proxmox LXC

3

u/rupertraphael Nov 03 '26

It's true that it's not too hard once you get it but damn I feel what you're saying about their documentation. You definitely need to be in good condition to be able to understand it. When I was learning how to set it up for the first time, it seemed like I was tossed around into different Traefik versions and different ways of setting it up.

1

u/Tartarus116 Nov 01 '26

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 Nov 01 '26

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.

1

u/lluisd 23d ago

You need to go step by step. I also use traefik for my homelab with not more than 10 small services but I really like it, I can do anything with it. I use with crowdsec. But as I said use it if you like doing it and avoid it if you only want to run somthing in some hours and nothing more. It´s easy to implement traefik but you need time and for crowdsec you will need more time than traefik to get it.