A VPS from start to finish
Monitor Your VPS
Since keeping the VPS running smoothly is solely your responsibility, it's a good idea to have a monitoring solution that makes it possible to track your VPS and its health. Since your VPS already has PHP, the most straightforward way to add monitoring capabilities to the VPS is to install phpSysInfo [4] on it. The tool displays essential system information in an easy-to-understand manner. It requires virtually no configuration, and it can be deployed on your server in a matter of minutes. Grab the latest release of the software from the project's website, unpack the downloaded archive, rename the config.php.new
file in the resulting directory to config.php
, and upload the entire phpsysinfo
directory to the server. Then point the browser to http://hello.xyz/phpsysinfo (replace hello.xyz
with the actual domain name of your VPS), and you should see phpSysInfo in all its beauty (Figure 3). The default phpSysInfo configuration displays all key information, but you can easily add more data points by editing the config.php
file. All options available in the file contain brief but informative descriptions, so enabling and configuring the desired entries is easy. For example, to enable one or several bundled plugins, edit the PLUGINS=false
line as follows:
PLUGINS=PSStatus,SMART
If you are looking for something more powerful and flexible than phpSysInfo, then Ajenti [5] is a perfect candidate for the job. Installing Ajenti is a matter of running the following commands:
sudo apt install software-properties-common curl https://raw.githubusercontent.com/ajenti/ajenti/master/scripts/install.sh | sudo bash -s -
Once the installation has been completed, you can access Ajenti on port 8000 (e.g., http://hello.xyz:8000) and log in using an existing system user account. By default, Ajenti uses the HTTP protocol, so you might want to enable SSL right from the start. Assuming you've already enabled Let's Encrypt on the VPS, the first task is to create a so-called full keychain certificate file using the commands below (replace hello.xyz
with the actual domain name):
/etc/letsencrypt/live/hello.xyz cat privkey.pem fullchain.pem > fullkeychain.pem
Next, switch to the Settings section in the Ajenti dashboard, activate the Enable SSL option, and specify the path to the fullkeychain.pem
file in the SSL certificate file field (Figure 4). The path may appear as follows:
/etc/letsencrypt/live/hello.xyz/fullkeychain.pem
Click Save to apply changes, and you should be able to access Ajenti using the HTTPS protocol (e.g., https://hello.xyz:8000).
You can populate the Dashboard section with widgets that monitor various aspects on the VPS, including disk space and memory utilization, CPU usage, traffic statistics, and more (Figure 5). Adding a widget is easy. To add, for example, a widget for monitoring and managing a specific service, click the Add widget button and select Service. In the added widget, click the Wrench icon, select systemd from the Manager drop-down list, and select the desired service (e.g., apache2) from the Service drop-down list. Once configured, the widget displays the current status of the server and lets you stop and restart it. For a better overview, you can arrange widgets by dragging them with the mouse and grouping them into tabs.
Besides widgets, Ajenti offers several other benefits. The File Manager module makes it possible to traverse directories on your VPS and work with files. You can move files and directories, delete them, and create new ones. It's also possible to edit text files using the built-in text editor, which can be useful when you need to edit a configuration file. As the name suggests, the Terminal module provides terminal access to the VPS right from Ajenti, while the Services module gives you access to all system services. Finally, the Plugins module can be used to extend Ajenti's functionality by installing additional plugins.
Wrap-Up
Like everything else in life, running your own VPS instance has its advantages and drawbacks. You need to take proper care of securing your VPS, and the burden of keeping the server running smoothly is all yours. But if you're looking for an inexpensive way to have a Linux machine that's fully under your control, you can do much worse than opting for a VPS.
Infos
- Namecheap: https://www.namecheap.com/
- VPS Express: https://github.com/dmpop/vps-express
- Adminer: https://www.adminer.org/
- phpSysInfo: https://phpsysinfo.github.io/phpsysinfo/
- Ajenti: https://ajenti.org/
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.