Wget, curl downloads fail

Not been able to use wget or curl to get custom versions of caddy direct to my server. Was hoping to make my own script rather than use Caddy’s as I have custom install locations and init file but since wget/curl fail can’t proceed.

sysadmin@nas:~$ wget https://caddyserver.com/download/linux/arm64?plugins=http.cors,http.expires,http.filemanager,http.filter,http.forwardproxy,http.git,http.hugo,http.ipfilter,http.jwt,http.login,http.proxyprotocol,http.upload,http.webdav,tls.dns.route53&license=personal&telemetry=off
[1] 21805
[2] 21806
sysadmin@nas:~$ 
Redirecting output to ‘wget-log’.
^C

I broke it because after long time file never finishes. The wget-log is weird I expect to see the download progress instead. Here is what comes to console after the break

[1]-  Exit 8                  wget https://caddyserver.com/download/linux/arm64?plugins=http.cors,http.expires,http.filemanager,http.filter,http.forwardproxy,http.git,http.hugo,http.ipfilter,http.jwt,http.login,http.proxyprotocol,http.upload,http.webdav,tls.dns.route53
[2]+  Done                    license=personal
sysadmin@nas:~$ 

curl has issues too which makes me think it’s the caddy server. It says license type required but you can see it clearly in the url.

sysadmin@nas:~$ curl https://caddyserver.com/download/linux/arm64?plugins=http.cors,http.expires,http.filemanager,http.filter,http.forwardproxy,http.git,http.hugo,http.ipfilter,http.jwt,http.login,http.proxyprotocol,http.upload,http.webdav,tls.dns.route53&license=personal&telemetry=off
[1] 21936
[2] 21937
sysadmin@nas:~$ License type is required

This is a simple mistake relating to your shell - you haven’t quoted the URL, so the ampersands are breaking the command at multiple points and sending them to a sub-shell.

Specifically, the first part:

wget https://caddyserver.com/download/linux/arm64?plugins=http.cors,http.expires,http.filemanager,http.filter,http.forwardproxy,http.git,http.hugo,http.ipfilter,http.jwt,http.login,http.proxyprotocol,http.upload,http.webdav,tls.dns.route53

goes to the background, so no progress bar, and it waits until it times out because of the missing license type. The next part - license=personal - also goes to a sub-shell, where it sets the variable license equal to personal locally. The sub-shell then completes and exits, making this effectively useless. Finally, telemetry=off goes off in your main shell. You can see the result if you echo $telemetry - you should see off as a result.

Try with quotes:

wget 'https://caddyserver.com/download/linux/arm64?plugins=http.cors,http.expires,http.filemanager,http.filter,http.forwardproxy,http.git,http.hugo,http.ipfilter,http.jwt,http.login,http.proxyprotocol,http.upload,http.webdav,tls.dns.route53&license=personal&telemetry=off'

2 Likes

guess I should have known that. Maybe on the download page near the download link line it should mention this as wget and curl will the the options for that supplied url.

Just having a look back at the download page, it gives you the URL to paste in your browser which is likely what you grabbed.

The shell command it gives you doesn’t require quoting as it passes the required parameters to the script.

yea I specifically didn’t want to use your script as I wanted to control the install and also use my own systemd file.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.