All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
[Script] 1 Click Caddy Installer/Manager
Hello there,
I created a bash script that manage (start|stop|install|update|uninstall) Caddy Web Server.
This script got 24 updates till now. Still in beta. I want to make it more robust and I look forward to hear your feedback/suggestion.
To install this on your vps, run below command. Fresh OS is recommended
wget https://git.io/vra5C -O - -o /dev/null|bash
You have installed 'Caddy Web Server Installer'. Now It's time to run below command to install Caddy Web Server
caddy install
Once installed run below command to start it. Make sure your domain is pointed to your ip else you might get some error.
caddy start
I have already installed and running. I'm running reload/restart command.
To check your 'Caddy Web Server' status run below command.
caddy
If you want to see your current version of Caddy/Script/PHP then run below command.
caddy -v
When 'Caddy Web Server' release an update you can update Caddy within few seconds.
caddy update
After successful update. Run below command.
caddy start
If you have any question about this script ask me here
Comments
Good stuff, bookmarked.
Caddy auto starts on system boot right?
The idea of making Caddy any easier blows my mind.
Don't see anything in the script right now that would create an init script or such.
Nice. Thanks for the effort!
I mean the caddy software itself creates the auto start scripts, doesn't it? Like nginx, apache, etc all have their own built in init scripts or systemd start target (or whatever they call it..), I'm assuming the same? Maybe I will try this someday and answer my own question.
Not to my knowledge, caddyserver is just a single executable - which is one of its main features I'd say.
Most of you will know how to do this but I thought I'd share this anyway: https://denbeke.be/blog/servers/running-caddy-server-as-a-service-with-systemd/
Should be pretty simple to create a bash to create some sort of installer.
Thanks.
Unfortunately no! Caddy is portable server. But noted, will work on that. This script still in beta, more to come
I got so sick after posted this, will work on this script after I get well.
Have any of you been able to run Caddy on Windows10? I can't get it to work:(
So, which error (message) do you get? Just tried it on a Windows 10 Pro (64bit) without any problems.
Should work fine. Just tried on Windows 7, should work fine on Windows 10
Can you explain more? Any error?
This is really cool - thanks for making and sharing it!
There's also the semi-official installer script here: https://getcaddy.com/ -- should work on every platform, including Windows+cygwin (I've heard it works although I haven't tested that myself).
We also have a few init scripts that you can use in the https://github.com/mholt/caddy/tree/master/dist/init folder.
Thank you more for creating such an amazing web server.
I just heard about it now. Will check that.
I'm traveling now, I'll work on this script when I come back home.
Added support for ARM on v2.3 (beta)
@sayem314, I just deleted the dir and extracted it again and it worked fine.
@sayem314 i tested on 3 vps and find php is not working, just print 502 bad gateway
Should work fine. PHP is working fine on my test. What OS and virt are you using to test?
running on debian / ubuntu...
Is the domain you typed during installation pointed to your VPS IP? Was PHP installation successful? Did you tried on fresh OS? Are you using latest version (2.3 beta) of this script?
of course, but how can I check if PHP installation successful?
ubuntu/debian >
php5-fpm -v
redhat/centos >
php-fpm -v
i checked it is installed well
Edit line 212 on '/etc/php5/fpm/php.ini' and change Etag off to on
then restart php fpm
hey, still not working, 502 Bad Gateway
and my line 212 is a line with ";", not for settings.
Share me your Caddyfile and php5-fpm.ini on PM. Upload to pastebin plz
version 3.4 released. not very far to stable version
N.B: Post has been updated.
I installed using the script then did the nice and simple:
caddy service command but it unfortunately is not adding the startup script. Ideas?
Debian 8 64bit
It starts fine with caddy restart or start though.
EDIT
Seems that when I do the command: caddy service it will completely stop working and won't even start back up again. Any ideas?
For the moment service is not working as expected. That's why I haven't done it by default. I'd release improved service. For now, disable service. Start manually.
rm /etc/init/caddy.conf
systemctl disable caddy
rm /etc/systemd/system/caddy.service
Then reboot or restart caddy
Okay thanks.
Is it possible to setup my own script then or will it break the caddy web server still?
No. It's possible
BTW, v3.5 released
@doughnet new service type added to /etc/init.d
delete previous service and run 'caddy service' now. reboot and see if it works