Build own CPanel

Ok, so this might sound like a stupid question and sorry if it has been asked before but is it possible to build my own CPanel?

DO provide API access for their services, which I could build a nice and Simple GUI for the controls I use.

Then I could just upload it to my droplet and that’s it, right?

I don’t see why I need to pay CPanel $20 per months.

Am I missing something? Very noobie at sysadmin here. I am just starting out with DO.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Yes you can make app utilizing API as alternative to cPanel, but only for managing Droplets and other DO resources, you can’t control Droplet itself. But that’s not really needed. There are many great (maybe even better than cPanel) control panel solutions you can set up absolutely free.

Probably most popular solution here is ServerPilot. Beside that there is VestaCP, Ajenti. There is also Webmin that can help you control server.


There are a lot of web panels available (most of them are free to use) that you can choose in order to manage your server. What I can recommend is to try them as in this way you can see if it really suits your needs.

I will list the top control panels that I recommend:

CentOS Web Panel Vesta CP Webmin Ajenti ISPConfig

and of course, I need to mention Plesk although it’s not free it’s been available for a while and it’s always been the main cPanel competitor. It has a lot of build-in features and a lot of plugins that you can install and you can always reach to their support team if needed which is something that might come in handy in time.

You’ve now got some great options if you want to use a control panel with your server but you don’t want to pay for a license. I’ve tried to layout most of the available options, but which one is best will ultimately depend on your individual needs.

Hope that this helps! Regards, Alex


To build upon what @ryanpq already said, building and managing a control panel isn’t as cut and dry as it may seem. I’ve been working on one for quite some time myself (primarily targeting Ubuntu) for the past year and it’s been love-hate. I’ve been working with Linux for about 15 years now and even though I’ve put that much time in to managing my own servers (by remotely and locally), managing other company-owned and personal servers, etc, it’s a huge undertaking – even more so for one person.

Unless you know the OS you’re planning to use in and out, I’d use something that’s already on the market. You have to also keep in mind what works on Debian may not work on Ubuntu (even though it’s derived from Debian) and will not work on CentOS and so on.

Once you know your OS or OS’s, you need to decide on how you’re going to manage software. Are you going to compile from source or rely on package managers? If compiling from source, you’re going to need to know how (which requires in-depth knowledge of compile options). If you plan on using package managers, know ahead of time that they are often behind the latest version and even when they’re not, you’re going with what one developer decided was best at the time they created that package.

Security is and will always be a subject all on its own. Needless to say, even solutions such as cPanel, Plesk, and various others are not natively secure by default. You still need to know how to manage a web server and you still need to know what to look for at the end of the day. You can’t just install cPanel and call it a day – it doesn’t work like that and there’s tons of horror stories from users who thought just that.

All this being said, it’s not meant to discourage you. If you’re new to managing your own servers, take your time and read tutorials & guides – DigitalOcean has a ton! Find out what works for you and what doesn’t. Write bash scripts that automate workloads (such as compiling NGINX from source, as an example). Once you have a good working set of bash scripts, and you have a good understanding, then you can look at optimizing those scripts, bringing them all together and creating a bash “framework” of sorts that will allow you to pass options and customize your deployment.

If you want to test something, deploy a CentOS Droplet and take a look at CentminMod.

It’s open source and will give you an idea of what a rather large bash script looks like. It’s written by an actual sysadmin that knows his stuff (speaking from experience).

You can use Zpanel. It’s of course for free of charge.

First let me clarify a bit about how the API and how a system like cPanel/WHM work.

The DO API - This tool provides you access to the functions you can find in the DigitalOcean control panel, namely the ability to create and destroy droplets and volumes, create snapshots, gather basic information about your droplets, do reboots, power ups and power downs of your individual droplets and manage DNS records if your domain is pointed to the DO nameservers.

cPanel/WHM - This tool provides a web interface to manage a single server (it is possible to cluster multiple cPanel/WHM servers and do more but we’ll stick to basic functionality). It allows you to manage several services on that server that are commonly used to deploy web applications including:

  • Apache or Nginx (Web Server)
  • PHP Programming Language
  • MySQL/MariaDB database server
  • BIND DNS Server
  • Mail server

Through cPanel you can create virtualhosts which are individual sites with their own folder, mail and DNS records on your server allowing you to provide end users access to this without getting access to the services of other users but all these sites are still run by the same web server process. cPanel will also include 3rd party tools like PHPMyAdmin which provides a web based interface to manage your databases.

To your main question: “Can I build my own cPanel”. The answer is absolutely but it is almost certainly not worth the effort. Despite seeming like a fairly straightforward web application, a full stack web hosting management tool like cPanel is vastly complex both to create initially and possibly even more importantly, keep regularly updated and secure.

I have built 3 complete web hosting control panels in the past for previous companies I’ve worked for who wanted custom solutions for their hosting clients or for some other reason did not want to use cPanel/Plesk or one of the other commercial panels. In each case this required hundreds of hours of development, constant work on security updates and refinements going on for years afterwords and cost a LOT more than cPanel licenses would have.

There are open source alternatives out there like zPanel that are similar to cPanel and completely free. They cover most of the bases but often (not speaking specifically about zPanel as I’ve seen this with other panels over the years) the place where they fall down is in quickly responding to security vulnerabilities and making security updates available. Being community driven, without full time engineers means that these areas can sometimes not get the attention they require and could leave you vulnerable.

If you’re interested in the inner workings of something like cPanel/WHM I would strongly recommend following some of the tutorials here to pick up the skills to manage all the services you want to run manually from the command line and configuration files first. That knowledge would be absolutely vital if you wanted to automate those processes and you will likely find that managing things that way makes a lot more sense unless you have a specific need for a shared hosting environment that end users will have access to. If you still want to create your own panel at that point you’ll be armed with the knowledge of how to manage these services and can start automating it and creating interfaces. There is no one-size-fits-all API underneath a tool like cPanel, it’s all command line functions and plaintext configuration files.

The TLDR here is: cPanel/WHM has a cost involved not just for the software but because they continue to support it. Your money covers the cost of managing security updates, providing end user support and keeping the panel up to date. There are free alternatives out there that provide the functionality though often without someone standing behind the tool providing timely security updates. The services that make up a Linux web stack were designed to be managed from the command line and security updates have less headaches when you use official packages so start there and decide if you want to build a panel.

The DigitalOcean API is to manage droplets, not software inside of the droplets.