I have installed Caddy v2.2.0 via apt-get on Ubuntu 20. This doesn’t have the Redis module installed.
I am struggling to understand how to install the Redis module. From the reading I’ve done, it seems I have to build Caddy from source by first installing xcaddy? Is that correct or is there a way to somehow install this module into my existing installation?
storage isn’t a directive, it’s rather a global option:
Global options must be the first thing at the top of the Caddyfile, and as you’re figured out, must be within braces:
Be aware that if you used the apt repo, next time Caddy updates, it’ll probably overwrite your custom Caddy binary. You might want to pin to the current version to avoid that.
Thank you for the help. How do I pin the current version? (Or should I remove Caddy via apt before installing from source?).
Also, where best to ask for help with configuring the Redis back end? I have configured my host and port using the Caddyfile but I’m still seeing connection issues when starting Caddy:
127.0.0.1:6379 isn’t configured anywhere. I appreciate it’s the Redis default but I’m telling Caddy and the Redis module to look somewhere else? I have also tried setting CADDY_CLUSTERING_REDIS_HOST and *_PORT but that doesn’t seem to make a difference (I would presume what is in the Caddy file takes precedence?).