Monitorr Caddy Config

I am trying to get Monitorr (GitHub - Monitorr/Monitorr: "Monitorr” is a self-hosted PHP web app that monitors the status of local and remote network services, websites, and applications.) setup in Caddy. I have tried making it its own subdomain as well with no success. I am running Monitorr as a docker container. I can get to it just fine without Caddy.

I have tired

proxy /monitorr/ {
fastcgi / php

I also added transparent, without /monitrr/, and header_upstream X-Forwarded-Host {host}. I get a 404 file not found from nginx which is running in the container.

The developer provides an nginx config, but has no Caddy experience. Hoping someone here can help me translate the below into a working Caddy config.

    location /monitorr { 
        root c:/nginx/www;
        autoindex on;
        index index.php;
        location ~ .php$ {
            include        fastcgi_params;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_index  index.php;

From what I see from the nginx config, you only need fastcgi.

fastcgi /monitorr php

Also, share your entire nginx and caddy config files.

I do not have nginx running. That was code from the app developer for Monitorr.

Here is the CaddyFile config.

The path to inside the docker container is ./config/www/monitorr/index.php. That directory is inside the container and the root for Caddy is outside the container (C:\Users\UserName\Documents\caddy\www). Not sure if I somehow how to link the 2 together, but I think that is the issue. Caddy does not know how to get to the index.php file as the root paths between the 2 are disjointed.

You don’t need FastCGI, or even site files. The docker container handles everything you need. You just want to put Caddy in front as a TLS terminating reverse proxy.

version: '3'

    image: abiosoft/caddy:latest
    command: ["-log", "stdout", "-agree",
      "-email", "",
      "-conf", "/etc/Caddyfiles/Caddyfile"]
      - "80:80"
      - "443:443"
      - ./certificates:/root/.caddy
      - ./caddyfiles:/etc/Caddyfiles
      - ./keys:/root/keys
      - ./sites:/srv
    restart: unless-stopped

    image: monitorr/monitorr:latest
      TZ: Brisbane/Australia
      PGID: 1000
      PUID: 1000
      - ./monitorr:/app
    restart: unless-stopped
Caddyfile {
  proxy / monitorr {

Check for a demonstration of the above working configuration.

From my short testing, Monitorr is exceptionally friendly to subfolders. Just proxy from a subfolder directly to it, and it will work just fine, e.g. proxy /monitorr http://monitorr:80 should suffice.

If you DO want FastCGI (i.e., you want Caddy to serve Monitorr directly without running it in another container), you don’t want a proxy at all, just a volume mount for the site files inside the Caddy container.


I looked at my config and I am essentially doing what you are. It then dawned on me when I ran Monitorr it complained about the length of the folder structure so I moved it and never updated the mount volume. Updating my Docker mount point made a world of difference LOL. Thanks for the help!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.