Finally got enough of the CLI? Rage every time you have to connect to your server just to change a basic setting? Or maybe deep inside you, you fear the letters "S", "S" and "H"?
Rejoice, because there is a solution to the problems of your server that we will cover in this tutorial: ClusterCS.
ClusterCS is a cloud-based control panel for server management. The utility of this server management platform is surprising, especially for small, self-hosted configurations.
Officially, ClusterCS is "a control panel for remote VPS cloud management and dedicated servers. "
One of its most popular features is a scalable, optimized and ready-to-use LAMP stack, with HAProxy support, ready to be used on most websites or apps in just a few clicks mouse. By default, ClusterCS enables its own hand-crafted server-side optimizations to keep your server running at its best with minimal configuration. And you can cluster and combine servers from any provider, bringing true democracy to your server environment.
Of course, as with most tools that extract the trust interface, you need to decide if you want to sacrifice control for convenience. If you are an unconditional commando of the CLI, be aware that ClusterCS completely removes the CLI with regard to the daily management of the server.
We have written here a step-by-step procedure on managing a server with ClusterCS. It will show you the basic workflow going from rotating a server to managing your domains, services and applications using the web control panel.
How does ClusterCS work?
To work, ClusterCS connects to your server the same way you would on SSH. Once he has established a connection for the first time, he installs a daemon called ccsRemoteAgent on your machine, able to automate all kinds of server management and maintenance tasks at the system level. These tasks can be launched on the Web GUI at the following address: clustercs.com, hiding the complex scripts behind a central and neat user interface.
Figure 1 Exiting the top command, showing that ccsRemoteAgent is at work
On your behalf via the graphical interface, ClusterCS automatically performs the configuration of:
- DNS and domain management
- Operating System Software (CentOS / RHEL)
- Web server software (Apache / Nginx / lighttpd)
- SSL (Let Encrypt / self-signed / customized)
- Database Software (MySQL / PHPMyAdmin)
- FTP Storage Software (ProFTPD)
- Messaging software (Postfix / Roundcube)
- Application software (PHP and modules)
- Cron and backups (complete or custom)
- Reporting and logs
On a single server, you can have multiple domains, each with its own configuration set, including different document roots, PHP versions, databases, backup schemes, and so on. ClusterCS allows you to easily manage these domains separately on the same operating system while maintaining the specific configuration required for each domain. Think: a modern and balanced WordPress e-commerce shop with PHP 7.3 and his grandmother's blog using PHP 5.4 – on the same server, without any conflict.
For those who want one-click solutions to common technology stacks, ClusterCS provides what they call,receipts". The recipes support the installation of a complete stack such as LAMP, as well as many extras such as a firewall (iptables and Fail2Ban) and a mail server (Postfix) with a Webmail client (Roundcube). You are free to customize recipes and add or delete services according to your needs.
If you are interested in high availability with unique services across multiple servers, you can also create and manage high availability clusters with automated request routing that is configurable through the Web GUI.
At the time of writing, ClusterCS is compatible with servers running:
- CentOS 6/7
- RHEL 6/7
- Amazon AMI / Linux 2
Connect your server to ClusterCS
To connect a new server to ClusterCS, you will need a clean and newly installed operating system with root permissions. For this tutorial, we use CentOS 7 on a VPS courtesy of Hudson Valley Host.
Step 1: Create the SSH keys
Although you can choose to let ClusterCS connect with password authentication, SSH keys are by far preferred. To create a new SSH key pair, log in to your new server using "root" as the user name and password provided by your host.
On the command line, enter:
ssh-keygen -t rsa
Follow the prompts until the end and you will now have a directory located on /root/.ssh with your private key (id_rsa) and your public key (id_rsa.pub).
Put your public key in a new file called "registered_keys" in the .ssh directory:
cat .ssh / id_rsa.pub >> .ssh / registered_keys
View the contents of your private key and copy it to the clipboard for the following step:
cat .ssh / id_rsa
Step 2: Log in to ClusterCS
Register on the ClusterCS website and select a license. A free license is available for 1 server and 5 domains, with limited extras. The main feature that is missing with a free license is the development environment, but you will have the option to upgrade to a 14-day trial version for the development environment after you have fully added a server and a domain.
To install the ClusterCS daemon on your server, click Add a server, then add the IP address of your server, the root user name and the private SSH key, as shown below.
Then enter a server name (for example, Server1) and select a recipe (that is, the stack). You can start from scratch and create your own recipe, or choose one of three ready-to-use recipes, optimized by default. We go withSmart Web Server (Optimized LAMP)"Who, besides Apache, also includes Nginx, lighttpd and HAProxy for load balancing and traffic management.
Once the build is complete and the system is installed, you will not be able to connect to your VPS via SSH unless you change the firewall rules on the ClusterCS web GUI. But it's okay, because we do not need SSH anymore! At least, that's the theory … In practice, always expect the unexpected and keep this SSH private key just in case.
To re-enable normal SSH access, go to the following directory: Firewall click the tab and add a new firewall rule for port 22 on all interfaces through the ClusterCS dashboard, and then click APPLY FIREWALL CHANGES.
Manage your server
Add a domain
Now that your server is configured with all the appropriate packages and configuration settings, it's time to start using the server to host websites and applications. To do this, you will need to add a new domain by going to Domains> Manage.
When you have successfully added a new domain, you can type your domain name in a web browser. The default home page then displays:
If you do not want your domain to be active during setup, set Domain Status to "Disabled", "Under Maintenance", or "No Web Domain". Otherwise, you may simply not yet set the DNS records for your domain to point to the server's IP.
Create email accounts
You want email@example.com to be your new e-mail address? Go to Domains> Email and add a new email address. As simple as that. Postfix takes care of your emails and you can access your inbox with Roundcube.
Configure your services
Most of the server management work will be done in Servers> Manage the server. This page lists the essential application services for your web server, such as PHP, MySQL and HAProxy, and allows you to change the configuration of each service.
The basic configuration of your server's running services should be done to ensure that your server meets the requirements of the application you want to run (for example, WordPress, MediaWiki). Check the documentation for any hosted application for the correct PHP settings and other configuration options.
With ClusterCS, an associated service group is called a Layer, in which you can choose and customize modules. In the screen capture above, the firewall is a layer and its modules include iptables and fail2ban. You can now see why the whole arrangement calls for a recipe, since all the "ingredients" of your server can be customized from this page.
Often when you change something important – like php.ini – you will want to restart PHP (or the associated service) thereafter for the changes to take effect. To stop, start, or restart current services such as PHP, click Servers> Services. The status of each service is also displayed here, which is important information to know when troubleshooting problems.
To see what's happening under the hood, ClusterCS displays a sidebar for real-time updates called System messages in Servers> Services. The sidebar lists completed, pending, and current operations.
For performance monitoring, click Reports to access graphics on server load, I / O, memory usage, disk space, and so on.
Add an application
So you want to configure an application such as WordPress? Of course, you do it.
If you use the Development Environment feature, you can access a handful of installers in one click for popular applications such as WordPress and Mediawiki. However, installing an application without the development environment is also easy.
Here is an overview of the steps to install a WordPress site with SSL on ClusterCS:
Step 1: Add a domain and make sure your DNS host records point to your server's IP address.
2nd step: In Areas, select your domain, then click Data base and create a new database and a new user for WordPress on localhost.
Step 3: Download WordPress on your PC and use an FTP client to download files to your server public_html directory), using the FTP username and password provided in Areas. Complete the configuration via your web browser.
Step 4: Add a free SSL Certificate from Let's Encrypt under Domains> SSL.
Step 5: Sit back and admire how easy it was without a CLI command in sight.
Do you prefer to use a control panel or a CLI interface only to manage your servers? Let your thoughts be heard in the comments below!