Windows could not start the Caddy on ISERVER. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 1.
It won’t start as a service, and fails with this in the Event Viewer:
The Caddy service terminated with service-specific error Incorrect function.
When installing the service I am using the following:
If I install it as a service but do not specify a caddyfile, it runs fine but uses the default config (localhost:2015) as you’d expect.
Fill in the Start Parameters is same parameters, This service can run, but only startup from my manual. -conf="C:\Caddy\Caddyfile" -log="C:\Caddy\ServerRun.log"
This might be the same issue someone else was having getting Caddy running as a service in Windows with nssm; where you need to run it as a specific user and not as the default “Local System Account”.
@hacdias Is it possible that this is to do with not having -agree in the command line options. Due to the change in end point for acme I think caddy will fail without this in install request for service.
Yeah, it would be very good. “service-specific error code 1” screams exit with errors to me, which means Caddy did start but ran into a problem (and the logs almost always explain what that problem is).
I can’t help but wonder if, as theorized in a few other places, the service account doesn’t have access to the files (can’t read the Caddyfile and exits, perhaps, and can’t write to the log file?).
It’s a good thought, but even when Caddy has no networking permissions, it still writes to the process log. The fact that log has no content is what I don’t get in that situation. (Unless it has no networking OR file permissions?)