How to install Ajenti 2 Control Panel on Debian 11

Reading Time: 3 minutes

Ajenti 2 is an open-source, web-based control panel that can be used for a large variety of server management tasks. It can install packages and run commands, and you can view basic server information such as RAM in use, free disk space, etc. All this can be accessed from a web browser. Optionally, an add-on package called Ajenti V allows you to manage multiple websites from the same control panel.

In this tutorial, we are going to install Ajenti 2 on our Debian 11 server.

Related Articles

Prerequisites

  • Freshly installed Debian 11 distro
  • User with sudo privileges
  • User with basic terminal usage

Table of Contents

  1. Run system updates
  2. Add new user to the system
  3. Install Ajenti on Debian 11
  4. Open Ajenti on the browser
  5. Conclusion

1. Run System updates

The fresh install system needs to refresh its packages before using it. To do that run updates to make the system up to date. Use the following command;

$ sudo apt update

2. Add new user to the system

$ adduser nextgentips
Sample output
Adding user `nextgentips' ...
Adding new group `nextgentips' (1000) ...
Adding new user `nextgentips' (1000) with group `nextgentips' ...
Creating home directory `/home/nextgentips' ...
Copying files from `/etc/skel' ...
New password: 
Retype new password: 
passwd: password updated successfully
Changing the user information for nextgentips
Enter the new value, or press ENTER for the default
        Full Name []: 
        Room Number []: 
        Work Phone []: 
        Home Phone []: 
        Other []: 
Is the information correct? [Y/n] y

Add nextgentips to sudoers group

To add the new user to sudo group use the following command from your terminal.

$ usermod -aG sudo nextgentips

3. Install Ajenti 2 on Debian 11

$ curl https://raw.githubusercontent.com/ajenti/ajenti/master/scripts/install.sh | sudo bash -s -
Sample output
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4854  100  4854    0     0  26096      0 --:--:-- --:--:-- --:--:-- 25957
:: OS: debian
:: Distro: debian
:: Installing prerequisites
Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease                                                    
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease                                            
Hit:4 http://deb.debian.org/debian bullseye-backports InRelease                                          
Hit:5 https://repos-droplet.digitalocean.com/apt/droplet-agent main InRelease                            
Reading package lists... Done                                   
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-dbus is already the newest version (1.2.16-5).
python3-dbus set to manually installed.
python3-apt is already the newest version (2.2.1).
python3-apt set to manually installed.
....
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
:: Installing initscript
/usr/bin/systemctl
Created symlink /etc/systemd/system/multi-user.target.wants/ajenti.service → /lib/systemd/system/ajenti.service.
:: Complete

Ajenti will be listening at HTTP port 8000
Log in with your root password or another OS user

Now that you have successfully installed Ajenti on Debian, we can open our control panel on our preferred browser.

Check the status of Ajenti 2

To check if Ajenti is running we can invoke the following command on our terminal.

$ systemctl status ajenti

You will get the following sample output.

Sample output
● ajenti.service - Ajenti panel
     Loaded: loaded (/lib/systemd/system/ajenti.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2021-11-26 10:39:06 UTC; 40min ago
    Process: 21080 ExecStart=/usr/bin/python3 /usr/local/bin/ajenti-panel -d (code=exited, status=0/SUCCESS)
    Process: 21082 ExecStartPost=/bin/sleep 5 (code=exited, status=0/SUCCESS)
   Main PID: 21083 (ajenti-panel)
      Tasks: 8 (limit: 1132)
     Memory: 359.9M
        CPU: 35.994s
     CGroup: /system.slice/ajenti.service
             ├─21083 /usr/bin/python3 /usr/local/bin/ajenti-panel
             ├─21659 /usr/local/bin/ajenti-panel worker [restricted session]
             └─21697 /usr/local/bin/ajenti-panel worker [session 2]

Nov 26 11:09:15 debian-11 su[21662]: pam_unix(su-l:auth): authentication failure; logname= uid=65534 euid=0 tty=>
Nov 26 11:09:18 debian-11 su[21662]: FAILED SU (to root) nobody on pts/1
Nov 26 11:09:34 debian-11 su[21664]: (to nextgentips) nobody on pts/1

if you find that the service is active, then you are good to proceed to the browser.

Start Ajenti 2 service.

If the Ajenti 2 is not running, then you have to start the service with the following command;

$ service ajenti restart

or you can use the following;

$ /etc/init.d/ajenti restart

Ajenti can be run in a verbose debug mode with the following command

$ ajenti-panel -v

4. Open Ajenti 2 on the browser

Ajenti runs on port 8000. Head to your preferred browser and open the following

http://<server_IP_Address>:8000

Input your password and username created or you can use default username root and password admin

You will get the following from the browser

Ajenti Dashboard
Ajenti Dashboard

You can install plugins once inside the dashboard. Elevate to root user if you are a regular user to be able to install plugins. See below figure.

Ajenti Plugins
Ajenti Plugins

5. Conclusion

We have successfully installed Ajenti on Debian 11. To continue learning, you can consult Ajenti documentation for more insight.

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *