Module not registered: http.reverse_proxy.selection_policies.weighted_round_robin

1. The problem I’m having:

I’m trying to set the weighted_round_robin as my lb_policy of the reverse_proxy.

But I got error “module not registered: http.reverse_proxy.selection_policies.weighted_round_robin”

2. Error messages and/or full log output:

Error: adapting config using caddyfile: parsing caddyfile tokens for 'reverse_proxy': Caddyfile:4 - Error during parsing: getting module named 'http.reverse_proxy.selection_policies.weighted_round_robin': module not registered: http.reverse_proxy.selection_policies.weighted_round_robin

3. Caddy version:

v2.6.2 h1:wKoFIxpmOJLGl3QXoo6PNbYvGW4xLEgo32GPBEjWL8o=

4. How I installed and ran Caddy:

docker pull caddy

a. System environment:

OS: Ubuntu 22.04.2
Docker: 23.0.1

b. Command:

caddy run

c. Service/unit/compose file:

d. My complete Caddy config:


reverse_proxy :9000 {
	lb_policy weighted_round_robin 1

5. Links to relevant resources:

You’re using too old a version. Please upgrade to the latest, v2.7.4.