How to Install Cerb Collaboration and Email Automation on Ubuntu 22.04

Cerb is a free, open-source, fast, and flexible platform for business collaboration and automation. It is a web-based tool used for sending a high volume of emails. It provides a web-based dashboard for real-time monitoring and goal tracking. It has many features, including Notifications, Shared mailboxes, E-mail management, Mobile functionality, and many more.

This tutorial will show you how to install the Cerb Automation tool on Ubuntu 22.04.

Prerequisites

  • A server running Ubuntu 22.04.
  • A valid domain name is pointed to your server IP.
  • A root password is configured on the server.

Getting Started

First, you must update all your system packages to the latest version. You can run the following command to update the system.

apt update -y
apt upgrade -y

Once your system is updated, you can proceed to the next step.

Install Apache, MySQL, and PHP

Next, you will need to install the Apache web server, MySQL database server, PHP, and other required modules in your system. You can install all of them with the following command:

apt install apache2 mysql-server php libapache2-mod-php php-mysql php-mbstring php-gd php-imap php-curl php-mailparse php-yaml php-gmp php-dev php-pear git wget unzip -y

Next, you will also need to install the Mailparse PHP extension on your server.

First, download the latest version of Mailparse with the following command.

wget https://pecl.php.net/get/mailparse-3.1.4.tgz

Next, extract the downloaded file with the following command.

tar -xvzf mailparse-3.1.4.tgz

Next, please navigate to the extracted directory and configure it with the following command.

cd mailparse-3.1.4
phpize
./configure
sed -i 's/^\(#error .* the mbstring extension!\)/\/\/\1/' mailparse.c

Now, install the Mailparse extension using the following command.

make 
make install

Next, open the php.ini file and change the default settings:

nano /etc/php/8.1/apache2/php.ini

Change the following lines:

memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = UTC
extension=mailparse.so

Save and close the file when you are finished then restart the Apache service to apply the changes:

systemctl restart apache2

Create a Database for Cerb

Next, you will need to create a database and user for Cerb. First, log into the MySQL shell with the following command:

mysql

Once you are logged in, create a database and user by running the following command:

mysql> CREATE DATABASE cerbdb CHARACTER SET utf8;
mysql> CREATE USER [email protected] IDENTIFIED BY 'password';

Next, grant all the privileges to the Cerb with the following command:

mysql> GRANT ALL PRIVILEGES ON cerbdb.* TO [email protected];

Next, flush the privileges and exit from the MariaDB shell with the following command:

mysql> FLUSH PRIVILEGES;
mysql> EXIT;

At this point, the database and user for Cerb are created. You can now proceed to the next step.

Install Cerb

First, download the latest version of Cerb from the Git repository to the Apache web root directory with the following command:

cd /var/www/html
git clone https://github.com/cerb/cerb-release.git cerb

Once the download is completed, change the directory to cerb and rename the .htaccess-dist file:

cd cerb
mv .htaccess-dist .htaccess

Next, change the ownership and permission of the cerb directory:

chown -R www-data:www-data /var/www/html/cerb/
chmod -R 755 /var/www/html/cerb/

Once you are finished, you can proceed to the next step.

Create Apache Virtual Host for Cerb

Next, you must create an Apache virtual host configuration file to serve Cerb. You can create it with the following command:

nano /etc/apache2/sites-available/cerb.conf

Add the following lines:

<VirtualHost *:80>
     ServerAdmin [email protected]
     DocumentRoot /var/www/html/cerb
     ServerName cerb.linuxbuz.com

     <Directory /var/www/html/cerb/>
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>

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

Save and close the file when you are finished then enable the Cerb virtual host file with the following command:

a2ensite cerb.conf

Next, reload the Apache service to apply the configuration changes:

systemctl restart apache2

You can verify the status of the Apache service with the following command:

systemctl status apache2

You should get the following output:

? apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-01-10 04:57:10 UTC; 5s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 59977 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 59981 (apache2)
      Tasks: 6 (limit: 2237)
     Memory: 13.2M
        CPU: 57ms
     CGroup: /system.slice/apache2.service
             ??59981 /usr/sbin/apache2 -k start
             ??59983 /usr/sbin/apache2 -k start
             ??59984 /usr/sbin/apache2 -k start
             ??59985 /usr/sbin/apache2 -k start
             ??59986 /usr/sbin/apache2 -k start
             ??59987 /usr/sbin/apache2 -k start

Jan 10 04:57:10 vultr systemd[1]: Starting The Apache HTTP Server...
Jan 10 04:57:10 vultr systemd[1]: Started The Apache HTTP Server.

Once you are finished, you can proceed to the next step.

Install Let's Encrypt SSL on Cerb

Next, securing your Cerb web interface with Let's Encrypt SSL is highly recommended. First, you will need to install the Certbot client in your system to install and manage the SSL.

First, install the Snap package manager with the following command:

apt install snapd

Next, update the Snap package to the latest version:

snap install core
snap refresh core

Next, install the certbot package using the following command:

snap install --classic certbot

Next, create a symbolic link for the Certbot binary to the system location:

ln -s /snap/bin/certbot /usr/bin/certbot

Next, run the following command to download and install Let's Encrypt SSL certificates:

certbot --apache

You will be asked to select your domain and provide your valid email address to install the Let's Encrypt SSL.

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Enter email address (used for urgent renewal and security notices)
 (Enter 'c' to cancel): [email protected]

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.3-September-21-2022.pdf. You must
agree in order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Yes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, to
share your email address with the Electronic Frontier Foundation, a founding
partner of the Let's Encrypt project and the non-profit organization that
develops Certbot? We'd like to send you email about our work encrypting the web,
EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Yes
Account registered.

Which names would you like to activate HTTPS for?
We recommend selecting either all domains, or all domains in a VirtualHost/server block.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: cerb.linuxbuz.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1
Requesting a certificate for cerb.linuxbuz.com

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/cerb.linuxbuz.com/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/cerb.linuxbuz.com/privkey.pem
This certificate expires on 2023-04-10.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.

Deploying certificate
Successfully deployed certificate for cerb.linuxbuz.com to /etc/apache2/sites-available/cerb-le-ssl.conf
Congratulations! You have successfully enabled HTTPS on https://cerb.linuxbuz.com

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
 * Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
 * Donating to EFF:                    https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

At this point, your website is secured with Let's Encrypt SSL.

Access Cerb Web Interface

Now, open your web browser and access the Cerb web interface using the URL https://cerb.linuxbuz.com. You will be redirected to the following page:

Verify all PHP extensions then click on the Continue button. You should see the following page:

Click on the Accept button to accept the License agreement. You should see the following page:

Provide your database details and click on the Verify database connection. You should see the following page:

Select your mail settings and click on the Verify mail settings button. You should see the following page:

Now, provide your name, email, password, and click on the Continue button. You should see the following page:

Click on the Continue button. You should see the following page:

Select Demo and click on the Continue button to start the installation. Once the installation has been finished, you should see the following page:

Click on the Log in and get started button. You should see the cerb login page:

Provide your email, password and click on the Continue button. You should see the Cerb dashboard on the following page:

Conclusion

This tutorial taught you how to install Cerb with Let's Encrypt SSL on Ubuntu 22.04. You can now explore Cerb features and start collaborating with your team. Feel free to ask me if you have any questions.

Share this page:

Suggested articles

0 Comment(s)

Add comment