Cpanel plug/integration = instant popularity with caddyserver

Has anyone tried or researched into making a cpanel plugin to use caddyserver as the web server for cpanel/whm? I think this would make caddyserver extremely popular because of its simplicity, ability to have automatic http2 and let’s encrypt ssl certificates. Right now with cpanel to get a free ssl you have to use an additional plugin that enables/get the LE certificate. If it was seamless I bet a lot of system admins would change.

Also, I feel people would love to move away from apache (default cpanel install) and go to caddyserver since it’s nice and fast :slight_smile:

I have no idea how CPanel works, but I think something would have to be written on top of Caddy (pre-processing of configuration to generate caddyfiles, etc.) to make it usable in a shared hosting environment.

It would and I feel like it would need a lot of work! I understand there’s a lot of Apache/Litespeed features that make it ideal for the task, features that would have to be handled in a layer between Caddy and cPanel.

No doubt it would vastly increase Caddy’s adoption (shared hosting makes up a huge amount of the internet), but I think the endgoal is not for Caddy to be used everywhere for the sake of it, but rather for Caddy to be perfectly simple for the people who do use it.

Also, I do not see shared hosting as the future of Internet web hosting. So for me, I do not find it worth my own time to invest in such technology. I think cloud instances / VPS have a much more promising future for quality sites.

I do not know if it is in your interest but I have a project in Github that implements a Cpanel/Plesk-like solution using Docker, docker-compose, Caddy, MySQL, PHP7 / 5, all based on the concept of containers without being a shared hosting .

Links to:

Homepage of the project: GitHub - daspanel/daspanel: Free, open-source, server agnostic, self-hosted web hosting control panel using Docker
Quick Installation:

The main features of Daspanel are:

  • All system configurations are saved and retrieved using a Rest API
  • It can be installed on your local computer for website development and then published on public servers always with the same result.
  • You can have as many different PHP versions as you want. And in the future, for Python, NodeJS, Meteor, etc.
  • A website can have many versions, such as: production, staging, dev, etc.

That looks awesome, thank you for sharing this, Abner! I’ll tweet about it. :slight_smile:

Somebody give this a try and let me know what you think! I want to try it too but it may have to wait until school is out for the summer.

Mate, that looks awesome! Can I interact with this using a WHMCS plugin?

I’ll be putting it up on some of my hardware soon and will report back…

1 Like

@daspanel Actually, I’m gonna hold out on the tweet until the Download form on that website is fixed, and the page is over HTTPS (you’re asking for a password on plain HTTP :scream:) - just let me know when it’s working better. :slight_smile:

@matt In fact, the form of the site that asks for a password generates the ZIP file in memory, in the visitor’s own browser and nothing passes through HTTP. Of course you’re right that the site has to work with HTTPS. As the site was in testing I hosted it in Github Pages and had no way to set up an SSL certificate for it. I will set up a server for it now in the afternoon and will notice you when it is running with HTTPS enabled.

@Whitestrake Yes it can integrate with WHMCS because all control panel functions have an endpoint in the rest API. If you install it on your local computer you can view the documentation and use the API by visiting this address in your browser. This address uses the SWAGGER (OpenAPI) specification and presents usage examples, including using the CURL command line. Any REST client library can be used to interact with the API. The address DASPANEL.SITE is a domain that I registered and that resolves any name to, the goal is to avoid the need to keep changing the /etc/hosts file when using DASPANEL on a local computer.

1 Like

That’s cool, but does it use a lot of memory? Where do the contents of the zip file come from?

That’s good. That’s probably best. :slight_smile:

@matt is running secure with HTTPS.

Not really, the generated ZIP file is 4 KB in size. It contains only one docker-compose.yml file that is obtained from this address and a file named daspanel.env generated on the fly with the system settings. It’s just a way to simplify the installation described in this link I implemented the functionality using JSZip.

Ah, that makes sense. Cool.

Looks promising, but very rough at the moment. There’s some interesting UI decisions, and I get the occasional “site returned no data” when performing certain actions. Uploading a zip file always ends up with an error, but the upload and unpack still seems to work.

Biggest issue is that despite creating the site, database, uploading the zip etc., I get No such site at :80 when previewing my site. Tried disabling/enabling, creating config, reloading Caddy.

Quite an ambitious looking project, I’d be interested to see how it progresses.

@Whitestrake Yes the project is in the pre alpha stage and there is a lot to be done. The purpose of his disclosure now is to get feedback about bugs, features to be implemented, and about the design of the system as a whole.

About the problems you encountered:

  1. Are you using it on your local computer, ie, accessing using as the base domain or installed it on a remote server and use a domain of your own?

  2. What the preview URL generated the error “no such site at :80” ?

I suspect it has something to do with the size of the zip file being downloaded and the API server timeout.

In order not to be using the Caddy forum to solve other project problems, would you kindly open a call on the Daspanel project GitHub - daspanel/daspanel: Free, open-source, server agnostic, self-hosted web hosting control panel using Docker so I can work in direct contact with you in solving the problems you have encountered.