v0.12.0

psviderski/uncloudv0.12.0Aug 28, 2025by psviderski

AI Summary

Introduces custom Caddy configuration support via x-caddy extension in Compose files, migrates to Caddyfile format, and adds persistent data volumes for Caddy.

Key Highlights

  • Custom Caddy configuration (x-caddy extension)
  • Caddyfile format instead of JSON
  • Caddy persistent data volume
  • New ingress and HTTPS documentation

Breaking Changes

  • Must redeploy caddy service after upgrade
  • Previous TLS certificates will be lost

New Features

  • x-caddy extension for custom Caddy config
  • Caddyfile generation
  • Persistent volume for Caddy data
  • uc caddy config command
  • uc caddy deploy --caddyfile flag

Full Release Notes

## What's new

### ✨ Custom Caddy configuration (per-service and global)

For advanced routing and behavior, use `x-caddy` instead of `x-ports` in Compose files. It allows you to provide custom Caddy configuration for a service in [Caddyfile](https://caddyserver.com/docs/caddyfile) format. See [Ingress & HTTPS](https://uncloud.run/docs/concepts/ingress/overview) docs for details.

<img width="700" alt="compose.yaml example" src="https://github.com/user-attachments/assets/c4305839-0be1-46e3-821b-9ed99e95dbdf" />

- Use templates like `{{upstreams 8000}}` to automatically insert healthy container IPs for `reverse_proxy`.
- Deploy global Caddy config with `uc caddy deploy --caddyfile` or `x-caddy` in a Compose file for `caddy` service.
- Invalid Caddy configs are skipped instead of breaking everything.
- View the complete generated Caddyfile served by Caddy with `uc caddy config`:

<img width="988" height="1054" alt="SCR-20250828-saca" src="https://github.com/user-attachments/assets/fc976aab-24b4-4880-b31b-e33f333f78c3" />

### New documentation

- [Concepts > Ingress & HTTPS](https://uncloud.run/docs/concepts/ingress/overview): How Caddy works as a reverse proxy, publishing services, custom Caddy config, and managing `caddy` service.
- [CLI reference](https://uncloud.run/docs/category/cli-reference): Automatically generated CLI reference docs.

### Improvements

- Caddy now uses Caddyfile format instead of JSON which is more human-friendly.
- Caddy keeps its data between restarts (certificates are preserved) using a persistent volume.

## Upgrade to 0.12.0

⚠️ After upgrading both machines and CLI, you need to redeploy the `caddy` service to be able to use the new custom Caddy configs. This update will also lose all the previously issued TLS certificates because a persistent data wasn't used before.
Please follow [Deploying or updating Caddy](https://uncloud.run/docs/concepts/ingress/managing-caddy#deploying-or-updating-caddy).

### Uncloud CLI locally

To upgrade the Uncloud CLI (`uc`) locally:

```bash
# Homebrew (macOS, Linux)
brew upgrade uncloud

# Install script (macOS, Linux)
curl -fsS https://get.uncloud.run/install.sh | sh
```

### Machine daemon

To upgrade the Uncloud daemon on your machines, run the following commands on each machine:

```bash
# AMD64
curl -fsSL -o uncloudd.tar.gz https://github.com/psviderski/uncloud/releases/download/v0.12.0/uncloudd_linux_amd64.tar.gz
# ARM64
# curl -fsSL -o uncloudd.tar.gz https://github.com/psviderski/uncloud/releases/download/v0.12.0/uncloudd_linux_arm64.tar.gz
tar -xf uncloudd.tar.gz
sudo install uncloudd /usr/local/bin/uncloudd
rm uncloudd uncloudd.tar.gz
sudo systemctl restart uncloud
```

## Changelog
* e99e7694550a223e6343784d2ad88b0d10de0231 chore: add Caddy gRPC service to retrieve Caddyfile config from machines
* c01365b416d380c59f6aa70dba986a782945dc3e chore: add header to generated Caddyfile that it's autogenerated
* 3cda5cc564a040debbf8020757e5fa0809261994 chore: caddy client to get caddy config
* 813c39764469914f883702cf18985c63a7fcf215 chore: change reverse_proxy upstreams from 'to' to the directive arguments
* 48dc1dd624279aa4b169ac044785fdcc6b262da6 chore: delete unused image digest resolver
* 81f4e3a67a907fb37fc31e64d320f1f012a47114 chore: fix mockery for linux in .mise.lock
* 455174ccb0d54903d6d0157d15a6dd1b9e45dabe chore: generate sites in Caddyfile from x-ports alongside caddy.json
* 11949eeb3b2006abf5c7280252de20753c512152 chore: include validation errors for user-defined Caddy configs as a comment in Caddyfile
* 8bf9fc0c9c733f0b3e35fefa0ba91b0e90b6955a chore: introduce mockery for generating mocks, generate for CaddyfileValidator
* db60a81b2d5399246e035c69f09815064a77b113 chore: lint
* 066d411367905cce8a47f9de94a4be9baba7ba37 chore: parse Created time on container with CreatedTime
* 93fef88fac3e6d2701523d5efac047a4e525f692 chore: refactor Caddyfile generator to accept a validator
* 75fdbaf2f4d5af9d72652fd6acd2628363114fa2 chore: relax ports+Caddy spec validation to allow host mode ports
* b437659678197ef611443389ed969b4431fb1a4b chore: update comments in generated Caddyfile
* 290e6db98eebff98f17aec34d9b8ff3aefe50b34 docs(ingress): Publishing service and Managing Caddy
* 9f5ca9a33db88ef566b38c56743994e08cad7f1f feat: add 'uc caddy config' command to show the current Caddyfile
* 3a6eef410ae38c3e94af06b82d4db6e9565708d0 feat: add --caddyfile flag to 'uc caddy deploy' and 'uc run' commands
* 03970862ab78085795e9a33acf573d86deffd3c1 feat: concatenate custom Caddy configs for services into final Caddyfile (no upstream interpolation)
* b046b78398562f40ec2125aeeb6543f405052783 feat: migrate Caddy to generated Caddyfile, mount persistent data volume
* 5cc005a4237bf7e5367e4570cce5e5f90748d155 feat: validate and append custom per-service Caddy configs to generated Caddyfile
* 0107363d414d555b14adc7ba2def9cb81bf78dad fix: allow host mode x-ports with x-caddy in compose
* 5a1e61ccffac56773e4be12626a7e95c06e1c640 fix: broken links to completions docs in CLI reference
* 64769081d972197f4b2315869058aaf2db498e5c fix: format for --publish flag
* ff213e71d3aa0ba6ba3167dfe1fa24f31ef58741 fix: unmarshaling of ServiceSpec in ServiceContainer struct