Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Migrating

Quentin McGaw edited this page May 23, 2020 · 2 revisions

Migrate from Caddy v1.0.x to Caddy v2.0.x

You need to migrate your Caddyfile.

Because Caddy v2.0.0 uses a different auto https mechanism, you can safely remove/archive your previous data directory from v1.0.x Docker containers.

The following are just general points I had to migrate from my own Caddyfile, more information is available on caddyserver.com/docs/v2-upgrade.

Proxy

➡️ caddyserver.com/docs/v2-upgrade#proxy

  1. Replace all proxy by reverse_proxy

  2. Remove all transparent directives as it's enabled by default now

  3. Remove all websocket directives as it's enabled by default now

  4. Remove all without ... directives, for example replace:

    proxy /abc thathost:8080 {
        without /abc
    }
    

    with:

    route /abc/* {
        uri strip_prefix /abc
        reverse_proxy thathost:8080
    }
    

Rewrites

Rewrite syntax has changed: ➡️ caddyserver.com/docs/v2-upgrade#rewrite