Come on and fight me…

I just tried out caddy for the first time and found it to be fantastic, I have used both Traefik and Nginx Proxy Manager extensively and although they were both great, the simplicity of the Caddfilr is fantastic. With a few snippets configured, I can add a host with a single line that just defines the port and url, it’s like magic.

Has anyone got any known traps ( or tips) with caddy to make it useful.

The issues I have had previously with Traefik were the need to have multiplelines to configure it (and configure the host and router separately), and the difference between local docker services ( I do like using labels to configure, but with lots of services it gets a bit fragmented and difficult toanahe) and remote services ( had to use the file config).

With NPM, I find using the GUI to configure the servers difficult ( and challenging to keep consistent ) and I had a time that it forgot something ( can’t remember if it was certificates or something else ) and that was the straw that broke the camel’s back for me.

Anyway, currently I am happy with caddy and am not planning on replacing it (at least for a month or two :D ). It would be nice if there was a GUI, but no big drama honestly, and the text config is great.

  • Edo78@feddit.it
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    It’s interesting how different people have different approaches … I migrate from Caddy to Traefik because I found it magical … Whenever I need to add another selfhosted service I just adapt a docker-compose like this one

    version: '3.8'
    
    services:
      homeassistant:
        container_name: homeassistant
        image: ghcr.io/home-assistant/home-assistant:stable
        #image: homeassistant/raspberrypi4-homeassistant:stable
        volumes:
          - ./media/:/media
          - ./config/:/config
          - /etc/localtime:/etc/localtime:ro
        environment:
          - TZ=${TZ}
        restart: unless-stopped
        networks:
          - t2_proxy
          - backend
        labels:
          - traefik.enable=true
          - traefik.docker.network=t2_proxy
          - traefik.http.routers.homeassistant.rule=Host(`home.mydomain.bla.bla`)
          - traefik.http.routers.homeassistant.entrypoints=websecure
          - traefik.http.routers.homeassistant.tls.certresolver=myresolver
          - traefik.http.services.homeassistant.loadbalancer.server.port=8123
    
    networks:
      backend:
        external: true
      t2_proxy:
        external: true
    

    As you can see I just need to change the host and the port in the labels to have a new domain pointing to the right port … I wasn’t able to find an easier way to add a new service to caddy

    • Andreas@feddit.dk
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      First time I heard of migrating from Caddy to Traefik and not the other way around. The usual complaint about Traefik is that it’s too complicated to manage all of the moving parts. I have only used Caddy with Dockerized setups though so I don’t know what the others are like.