1. My Caddy version (caddy version
):
v2.0.0-beta.17 h1:x+Ur3uX83j+STerOWsrLDlknXe7z71VnO5xD+H2OwAw=
2. How I run Caddy:
nssm install caddy2 C:/appl/caddy2_beta17_windows_amd64/caddy2_beta17_windows_amd64.exe run --resume
a. System environment:
Windows 10 Pro
b. Command:
nssm install caddy2 C:/appl/caddy2_beta17_windows_amd64/caddy2_beta17_windows_amd64.exe run --resume
c. Service/unit/compose file:
N/A
d. My complete Caddyfile or JSON config:
{
"logging": {
"sink": {
"writer": {
"output": "file",
"filename": "C:/appl/caddy2_beta17_windows_amd64/logs/unstructured.log",
"roll": false,
"roll_size_mb": 0,
"roll_gzip": false,
"roll_local_time": false,
"roll_keep": 0,
"roll_keep_days": 0
}
},
"logs": {
"default": {
"writer": {
"output": "file",
"filename": "C:/appl/caddy2_beta17_windows_amd64/logs/structured.log",
"roll": false,
"roll_size_mb": 0,
"roll_gzip": false,
"roll_local_time": false,
"roll_keep": 0,
"roll_keep_days": 0
}
}
}
},
"apps": {
"http": {
"servers": {
"srv0": {
"listen": [
":443"
],
"routes": [
{
"match": [
{
"host": [
"jenkins.xxxxxx.co.uk"
]
}
],
"handle": [
{
"handler": "subroute",
"routes": [
{
"handle": [
{
"handler": "reverse_proxy",
"headers": {
"request": {
"set": {
"Host": [
"{http.request.host}"
],
"X-Forwarded-For": [
"{http.request.remote.host}"
],
"X-Forwarded-Proto": [
"{http.request.scheme}"
],
"X-Real-Ip": [
"{http.request.remote.host}"
]
}
}
},
"upstreams": [
{
"dial": "192.168.0.100:8080"
}
]
}
]
}
]
}
],
"terminal": true
},
{
"match": [
{
"host": [
"nzbget.xxxxxx.co.uk"
]
}
],
"handle": [
{
"handler": "subroute",
"routes": [
{
"handle": [
{
"handler": "reverse_proxy",
"headers": {
"request": {
"set": {
"Host": [
"{http.request.host}"
],
"X-Forwarded-For": [
"{http.request.remote.host}"
],
"X-Forwarded-Proto": [
"{http.request.scheme}"
],
"X-Real-Ip": [
"{http.request.remote.host}"
]
}
}
},
"upstreams": [
{
"dial": "192.168.0.100:6789"
}
]
}
]
}
]
}
],
"terminal": true
},
{
"match": [
{
"host": [
"sonarr.xxxxxx.co.uk"
]
}
],
"handle": [
{
"handler": "subroute",
"routes": [
{
"handle": [
{
"handler": "reverse_proxy",
"headers": {
"request": {
"set": {
"Host": [
"{http.request.host}"
],
"X-Forwarded-For": [
"{http.request.remote.host}"
],
"X-Forwarded-Proto": [
"{http.request.scheme}"
],
"X-Real-Ip": [
"{http.request.remote.host}"
]
}
}
},
"upstreams": [
{
"dial": "192.168.0.100:8989"
}
]
}
]
}
]
}
],
"terminal": true
},
{
"match": [
{
"host": [
"radarr.xxxxxx.co.uk"
]
}
],
"handle": [
{
"handler": "subroute",
"routes": [
{
"handle": [
{
"handler": "reverse_proxy",
"headers": {
"request": {
"set": {
"Host": [
"{http.request.host}"
],
"X-Forwarded-For": [
"{http.request.remote.host}"
],
"X-Forwarded-Proto": [
"{http.request.scheme}"
],
"X-Real-Ip": [
"{http.request.remote.host}"
]
}
}
},
"upstreams": [
{
"dial": "192.168.0.100:7878"
}
]
}
]
}
]
}
],
"terminal": true
},
{
"match": [
{
"host": [
"nexus.xxxxxx.co.uk"
]
}
],
"handle": [
{
"handler": "subroute",
"routes": [
{
"handle": [
{
"handler": "reverse_proxy",
"headers": {
"request": {
"set": {
"Host": [
"{http.request.host}"
],
"X-Forwarded-For": [
"{http.request.remote.host}"
],
"X-Forwarded-Proto": [
"{http.request.scheme}"
],
"X-Real-Ip": [
"{http.request.remote.host}"
]
}
}
},
"upstreams": [
{
"dial": "192.168.0.100:8081"
}
]
}
]
}
]
}
],
"terminal": true
},
{
"match": [
{
"host": [
"infa.xxxxxx.co.uk"
]
}
],
"handle": [
{
"handler": "subroute",
"routes": [
{
"handle": [
{
"handler": "reverse_proxy",
"headers": {
"request": {
"set": {
"Host": [
"{http.request.host}"
],
"X-Forwarded-For": [
"{http.request.remote.host}"
],
"X-Forwarded-Proto": [
"{http.request.scheme}"
],
"X-Real-Ip": [
"{http.request.remote.host}"
]
}
}
},
"upstreams": [
{
"dial": "192.168.0.10:8080"
}
]
}
]
}
]
}
],
"terminal": true
}
]
}
}
},
"tls": {
"automation": {
"policies": [
{
"management": {
"email": "xxxxxx@googlemail.com",
"module": "acme"
}
}
]
}
}
}
}
3. The problem I’m having:
I’m currently using NSSM to install Caddy2 as a Windows Service. It worked fine on Beta15.
The service installs fine. However, on Beta 17, when I try and start the service, a generic “The service failed to start” message is produced. Of course, I can’t seem to find any logs.
4. Error messages and/or full log output:
N/A
5. What I already tried:
I’ve run the exact same command from the command line, and that works :-
C:/appl/caddy2_beta17_windows_amd64/caddy2_beta17_windows_amd64.exe run --resume
However, this uses a different profile to the windows service.
The windows service profile is :-
C:\Windows\System32\config\systemprofile\AppData\Roaming\Caddy
I guess my question is, are there any logs written anywhere that would help me determine what’s going wrong?