[Unit] Description=NGINX example After=docker.service Requires=docker.service [Service] TimeoutStartSec=0 ExecStartPre=-/usr/bin/docker rm --force caddy2 ExecStart=/usr/bin/docker run --name caddy2 --pull always --log-driver=journald --net host -v /var/lb/caddy:/etc/caddy docker.io/caddy:2 ExecStop=/usr/bin/docker stop caddy2 Restart=always RestartSec=5s [Install] WantedBy=multi-user.target