I am using REDIS-SERVER for cerificate storage. When rebooting the server (Ubuntu), CADDY won’t start due to connection failure with the REDIS-SERVER.
It is not ready for any connection (yet).
Sorry, the first message and did not know how that worked.
I would like to have a solution to delay the start of CADDY or that the startup of CADDY is done after REDIS is ready to accept a connection.
With After= you make sure that caddy starts after network becomes available and after redis.service, and additionally with Wants= it will try to start redis before it starts itself.
This implied your unit file for redis is called redis.service.
You can also configure Caddy’s service to restart on failure, see the systemd overrides docs:
Also, consider using GitHub - pberkel/caddy-storage-redis instead which is a more modern/polished Redis plugin for Caddy. It does have a different store model though so Caddy will issue new certs unless you export/import the existing certs when swapping. If you only have a handful of certs, you don’t need to do migrate anything, you can just let Caddy issue fresh certificates.
Hi Fransislavoie, I do use the pberkel plugin, thanks.
And I will look into the systemd options. However I am not interested in a situation where caddy in invitit restarting.
Regards, Rick.