Coolify is a really cool self-host tool to manage all services across your servers.

Reroute services to another server in your LAN

Imagine that you have two servers in your LAN, but only one of them is the front facing server to the Internet. If you are using Traefik, you can generate domains that can access the second server (not visible directly by the internet) doing the following:

  1. Go inside your front-facing server and get inside the dynamic configuration
  2. Create a new file and fill in the blanks:
http:
  middlewares:
    redirect-to-https:
      redirectscheme:
        scheme: https
  routers:
    http-rss:
      entryPoints: http
      rule: 'Host(`<service.domain.tld>`) && PathPrefix(`/`)'
      middlewares: redirect-to-https
    https-rss:
      entryPoints: https
      rule: 'Host(`<service.domain.tld>`) && PathPrefix(`/`)'
      tls:
        certresolver: letsencrypt
      service: <my-service>
  services:
    <my-service>:
      loadBalancer:
        servers:
          -
            url: '<url of your server>'
  1. Then, in your server, add <service.domain.tld> inside your service’s domains

Profit! Your service is now available online.