Can Traefik be used across Portainer Stacks?

Or do all the services need to be in the same stack?

Thanks

Traefik can connect to any target service. Either you publish ports of the target service or you connect Traefik and the target service to the same Docker network.

Great, I will try using the Traefik labels in my second stack and check it out.

Thank you

I tried moving my whoami-public and whoami-secure services (I am also using Authentik to secure services) out of the primary stack and into a second stack but they then stopped working.

Is there some syntax that needs to be used when splitting services into multiple stacks and having them work with Traefik that is defined in a separate stack?

It has nothing to do with stacks. You just need a common Docker network.

We use one stack with Traefik

networks:
  proxy:
    name: proxy
    attachable: true

and all other stack use

networks:
  proxy:
    name: proxy
    external: true

Thank you @bluepuma77