How to Install ViMbAdmin on Debian Latest

ViMbAdmin is an open-source web interface and management tool for Virtual Mailbox domains and email accounts. It allows multiple domains to be managed through one web interface, where email accounts, aliases, and forwards can be created, modified or deleted. In this tutorial, you will learn how to install ViMbAdmin on Debian latest.

Prerequisites

Before beginning the installation, ensure that you have the following:

Step 1: Create a New Database and User

ViMbAdmin requires a database to store its data. Open the terminal window and log into MySQL database using root user access:

$ mysql -u root -p

Next, create a new database, user, and grant all necessary privileges:

> CREATE DATABASE vimbadmin;
> CREATE USER 'vimbadmin'@'localhost' IDENTIFIED BY 'password';
> GRANT ALL PRIVILEGES ON vimbadmin.* TO 'vimbadmin'@'localhost';
> FLUSH PRIVILEGES;
> EXIT;

Remember to replace the password with a strong password.

Step 2: Install Required Dependencies

Next, update the system and install some dependencies required for ViMbAdmin:

$ sudo apt update
$ sudo apt install apache2 mariadb-server php php-mysql php-mcrypt php-fpm php-cgi php-json

Once done, restart Apache service:

$ sudo service apache2 restart

Step 3: Download and Extract ViMbAdmin

Download the latest version of ViMbAdmin from the official website, or use the following command to download it via the terminal:

$ sudo wget https://github.com/vimbadmin/vimbadmin/archive/v3.0.10.tar.gz

Once downloaded, extract the package using:

$ sudo tar -xzf v3.0.10.tar.gz

Move the extracted files into the /etc/vimbamdin directory using the following command:

$ sudo mv /vimbadmin-3.0.10 /etc/vimbadmin

Step 4: Install ViMbAdmin

Create the configuration files by copying the files config/conf.inc.php.dist and config/db.inc.php.dist to config/conf.inc.php and config/db.inc.php respectively:

$ sudo cp /etc/vimbadmin/config/conf.inc.php.dist /etc/vimbadmin/config/conf.inc.php
$ sudo cp /etc/vimbadmin/config/db.inc.php.dist /etc/vimbadmin/config/db.inc.php

Next, edit 'config/conf.inc.php' and change the following lines:

define('PUBLIC_URL', '/vimbadmin');
define('APPLICATION_ENV', 'production');

Next, edit config/db.inc.php and update the database details:

$config['db_dsnw'] = 'mysql://vimbadmin:password@localhost/vimbadmin';

Remember to replace the password with the password you set up earlier.

Step 5: Set Up Permissions

Create a new group and add the Apache user to it:

$ sudo groupadd vimbadmin
$ sudo usermod -a -G vimbadmin www-data

Now, set up the permissions for the ViMbAdmin directory:

$ sudo chown -R root:vimbadmin /etc/vimbadmin
$ sudo chmod -R 775 /etc/vimbadmin
$ sudo chmod 775 /etc/vimbadmin/tmp

Step 6: Configure Apache

Create a new virtual host file named vimbadmin.conf in the /etc/apache2/sites-available directory:

$ sudo nano /etc/apache2/sites-available/vimbadmin.conf

Add the following content:

<VirtualHost *:80>
        ServerAdmin admin@example.com
        DocumentRoot /etc/vimbadmin/public
        ServerName example.com

        <Directory "/etc/vimbadmin/public">
                AllowOverride All
                Require all granted
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/vimbadmin-error.log
        CustomLog ${APACHE_LOG_DIR}/vimbadmin-access.log combined
</VirtualHost>

Then enable the site and the Apache SSL module:

$ sudo a2ensite vimbadmin.conf
$ sudo a2enmod ssl

Lastly, restart Apache:

$ sudo service apache2 restart

Step 7: Access ViMbAdmin Web Interface

Open your web browser and type your server's IP address or domain name followed by vimbadmin in the address bar. For example:

http://example.com/vimbadmin

This will open the ViMbAdmin login page. Enter the Admin username and password, which are by default admin and admin, respectively.

After logging in, you can start adding domains and email accounts.

Congratulations! You have successfully installed ViMbAdmin on Debian Latest.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!