# Caddy

## Structure

```
.
├── caddy (80 | 443)
	└── Caddyfile
```

### Caddy / xcaddy


```bash
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl

# caddy
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
# xcaddy
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-xcaddy-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-xcaddy.list

sudo apt update && sudo apt install -y caddy xcaddy
```

#### Build with dns-ovh

```
https://go.dev/dl/
```

```bash
wget https://go.dev/dl/go1.23.1.linux-arm64.tar.gz
rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.23.1.linux-arm64.tar.gz
export PATH=$PATH:/usr/local/go/bin
```

```bash
mkdir ~/caddy
cd caddy

xcaddy build --with github.com/caddy-dns/ovh \
             --with github.com/mholt/caddy-l4/modules/l4proxy \
             --with github.com/mholt/caddy-l4/modules/l4tls \
             --with github.com/mholt/caddy-l4/modules/l4proxyprotocol
sudo mv caddy /usr/bin
sudo chown root:root /usr/bin/caddy
sudo chmod 755 /usr/bin/caddy
sudo systemctl daemon-reload
```

```bash
sudo vim /etc/caddy/Caddyfile
```

> [[Caddyfile]]

```bash
sudo systemctl restart caddy
```

# Services

<div class="table-wrapper" id="bkmrk-service-host-ip%3Aport"><table>
<tbody>
        <tr>
                <th>URL</th>
                <th>host</th>
                <th>(service) port</th>
        </tr>
        <tr>
                <td>affine.delmar.bzh</td>
                <td>sandy</td>
                <td>(affine_server) 3010 </br>
                (affine_migration_job)</br>
                (affine_postgres)</br>
                (affine_redis)</br></td>
        </tr>
        <tr>
                <td>books.delmar.bzh</td>
                <td>sandy</td>
                <td>(booklore) 32768 </br>
                (mariadb)</td>
        </tr>
        <tr>
                <td>bookstack.delmar.bzh</td>
                <td>sandy</td>
                <td>(bookstack) 6875 </br>
                (bookstack_db)</td>
        </tr>
        <tr>
                <td>caddymanager</td>
                <td>bob</td>
                <td>(frontend) 20125 </br>
                (backend) </br>
                (mongodb)</td>
        </tr>
        <tr>
                <td>cap.delmar.bzh</td>
                <td>carlo</td>
                <td>(cap-standalone) 55338</td>
        </tr>
        <tr>
                <td>cloud.delmar.bzh</td>
                <td>sheldon</td>
                <td>(nextcloud-aio-mastercontainer) 8080 </br>
                (nextcloud-aio-apache) 11000</br>
                (nextcloud-aio-nextcloud)</br>
                (nextcloud-aio-imaginary)</br>
                (nextcloud-aio-redis)</br>
                (nextcloud-aio-database)</br>
                (nextcloud-aio-whiteboard)</br>
                (nextcloud-aio-notify-push)</br>
                (nextcloud-aio-talk) 3478</br>
                (nextcloud-aio-collabora)</td>
        </tr>
        <tr>
                <td>cpt.delmar.bzh</td>
                <td>All</td>
                <td>() 9090</td>
        </tr>
        <tr>
                <td>cs.delmar.bzh</td>
                <td>sandy</td>
                <td>(code-server) 49505</td>
        </tr>
        <tr>
                <td>ctr.delmar.bzh</td>
                <td>sheldon</td>
                <td>(compose-craft-saas) 47810 </br>
                (compose-craft-db) 27017</td>
        </tr>
        <tr>
                <td>cvs.delmar.bzh</td>
                <td>sandy</td>
                <td>(reactive-resume_app) 54268 </br>
                (reactive-resume_minio) 9000 </br>
                (reactive-resume_chrome) </br>
                (reactive-resume_postgres)</td>
        </tr>
         <tr>
                <td>dev.delmar.bzh</td>
                <td>gary</td>
                <td>(wm-caddy) 19409 | 25</br>
                (wm-lsp)</br>
                (multiplayer)</br>
                (wm-postgres)</td>
        </tr>
        <tr>
                <td>dkr.delmar.bzh</td>
                <td>bob</td>
                <td>(dockmon) 8001</td>
        </tr>
        <tr>
                <td>dolibarr.delmar.bzh</td>
                <td>sandy</td>
                <td>(dolibarr_app) 64616 </br>
                (dolibarr_db)</td>
        </tr>
        <tr>
                <td>draw.delmar.bzh</td>
                <td>sheldon</td>
                <td>drawio 24928</td>
        </tr>
        <tr>
                <td>gen.delmar.bzh</td>
                <td>carlo</td>
                <td>(webtrees) 63578</td>
        </tr>
        <tr>
                <td>git.delmar.bzh</td>
                <td>carlo</td>
                <td>(webtrees) 63578</br>
                (webtrees_postgres)</td>
        </tr>
        <tr>
                <td>gotify.delmar.bzh</td>
                <td>bob</td>
                <td>(gotify) 41901</td>
        </tr>
        <tr>
                <td>homepage.delmar.bzh</td>
                <td>gary</td>
                <td>(homarr) 7575</td>
        </tr>
        <tr>
                <td>home-assistant.delmar.bzh</td>
                <td>gary</td>
                <td>(homeassistant) 8123</br>
                (mosquitto) 16883 | 19001</td>
        </tr>
        <tr>
                <td>it.delmar.bzh</td>
                <td>sheldon</td>
                <td>(it-tools) 11404</td>
        </tr>
        <tr>
                <td>jellyfin.delmar.bzh </br>
                jellyseer.delmar.bzh </br>
                wizarr.delmar.bzh</td>
                <td>gary</td>
                <td>(jellyfin) 8096</br>
                (jellyseerr) 5055</br>
                (wizarr) 5690</br>
                (qbittorrent)</br>
                (sabnzbd)</br>
                (radarr)</br>
                (sonarr)</br>
                (lidarr)</br>
                (prowlarr)</br>
                (bazarr)</br>
                (tdarr)</br>
                (unpackerr)</br>
                (gluetun) >>> VPN</td>
        </tr>
        <tr>
                <td>kontadenn.delmar.bzh</td>
                <td>bob</td>
                <td>&gt; Caddyfile</td>
        </tr>
        <tr>
                <td>mailbear.delmar.bzh</td>
                <td>carlo</td>
                <td>(mailbear) 1234</td>
        </tr>
        <tr>
                <td>nds.delmar.bzh</td>
                <td>bob</td>
                <td>&gt; Caddyfile</td>
        </tr>
        <tr>
                <td>nsns.delmar.bzh</td>
                <td>bob</td>
                <td>&gt; Caddyfile</td>
        </tr>
        <tr>
                <td>octoprint.delmar.bzh </br>
                stream.delmar.bzh</td>
                <td>bernie</td>
                <td>(octoprint) 54963 </br>
                (camera-streamer) 62036</td>
        </tr>
        <tr>
                <td>paperless.delmar.bzh</td>
                <td>sandy</td>
                <td>(paperless-ngx) 8000 </br>
                (paperless-postgres) </br>
                (paperless-redis)</td>
        </tr>
        <tr>
                <td>pdf.delmar.bzh</td>
                <td>sheldon</td>
                <td>(stirling-pdf) 9890</td>
        </tr>
        <tr>
                <td>penpot.delmar.bzh</td>
                <td>sandy</td>
                <td>(penpot-frontend) 43735
                (penpot-backend) </br>
                (penpot-exporter) </br>
                (penpot-postgres) </br>
                (penpot-redis)</td>
        </tr>
       <tr>
                <td>search.delmar.bzh</td>
                <td>sandy</td>
                <td>(searxng) 23485</td>
        </tr>
        <tr>
                <td>send.delmar.bzh</td>
                <td>krabs</td>
                <td>(zipline) 53842</td>
        </tr>
       <tr>
                <td>stream.delmar.bzh</td>
                <td>bernie</td>
                <td>(camera-streamer) 62036</td>
        </tr>
         <tr>
                <td>tpml.delmar.bzh</td>
                <td>bob</td>
                <td>&gt; Caddyfile</td>
        </tr>
        <tr>
                <td>twip.delmar.bzh</td>
                <td>bob</td>
                <td>(twip) 23473</td>
        </tr>
        <tr>
                <td>ugo.delmar.bzh</td>
                <td>gary</td>
                <td>(wordpress-app) 8090 </br>
                (wordpress-adminer) 62674 </br>
                (wordpress-mariadb)</td>
        </tr>
        <tr>
                <td>vault.delmar.bzh</td>
                <td>gary</td>
                <td>(vaultwarden) 3012 | 16081</td>
        </tr>
        <tr>
                <td>www.delmar.bzh</td>
                <td>bob</td>
                <td>&gt; Caddyfile</td>
        </tr>
        <tr>
                <td>xcd.delmar.bzh</td>
                <td>sheldon</td>
                <td>(lowcoder) 50154</td>
        </tr>
        <tr>
                <td> </td>
                <td> </td>
                <td> </td>
        </tr>
</tbody>
</table>

</div>
