Clouding servers are perfect for developers to deploy their PHP applications. We have previously discussed Server Pilot, and we have many customers who use RunCloud to manage applications.
There is an open-source alternative called CIPI that lets you manage applications for free using a main server and additional nodes.
CIPI is a Laravel-based control panel for managing PHP web applications. It comes with Nginx, MySQL, different versions of PHP-FPM (7.x branch), multiuser support, Supervisor, Composer, NPM, Let's Encrypt certificates, GIT, internal backups, Postfix, PHPMyAdmin, Fail2ban, Redis, API, data migration with a graphical interface, CodeIgniter, Symphony, WordPress, and other PHP applications.
With CIPI, we need a main server and separate nodes where we will install our applications.
For this tutorial, we will configure the main server and then two separate nodes. The servers must run Ubuntu 18.04 or Ubuntu 20.04.
- Main Server with Ubuntu 20.04
- Node-1 with Ubuntu 20.04
- Node-2 with Ubuntu 20.04
Main server configuration
We will connect to the server via SSH and first update all packages:
# apt update && apt upgrade -yThen we just need to run the following:
# wget -O - https://cipi.sh/go.sh | bashThen we will need to wait for everything to install correctly. Once it finishes, it will provide the server access details:
IMPORTANT
Keep in mind that installing CIPI on the server breaks the configuration needed to log in via SSH as the root user, so it is very important to save this password or log in as the CIPI user and change the configuration (or assign the CIPI user the same password as root).
Preliminary steps
Before configuring the nodes, we will need to access CIPI using the server's public IP address and go to the Settings section to change the email address and password:
We can also configure SMTP to receive notifications from the panel.
Add a server in CIPI
After the initial configuration, we can add our first server to CIPI as follows. We will go to the Servers section and then click the button labeled New Server:
We will enter the name, the server's public IP address, the provider's name, and the location.
After adding the server, we will see the following:
If we click the red button labeled "Node-1" has to be installed we will see the instructions we need to follow via SSH on the first node.
We will connect to the first node via SSH and run the command shown:
# wget -O - http://xx.xx.xx.xx/sh/go/ecdf90537a2f90cfa304b48b725467906aa3255d | bash
Once it finishes, it will tell us that we can check the panel installed on the main server to see that it is now installed:
We will repeat this operation for all the nodes we want to add; in our case, we have added two nodes.
Add a web application on a node
If we go to the Applications section, we can click the button labeled New Application and configure our application:
After creating the web application, it will provide the access details for deploying web applications:
Once the domain points to the server, we will see the following:
At this point, we can connect via FTP and upload our project without any problems.