22 C
Texas
angeloma
Senior Writer and partner

How to install Roundcube on Ubuntu 18.04?

Mail clients maximize and make even more efficient the use of email services in companies. Many of them add many features that make the service better. Especially if we have our own email service helping the flexibility of it. Today, I will show you how to install RoundCube on Ubuntu 18.04, a modern web client for email compatible with many external services.

Roundcube is according to its website, a browser-based multilingual IMAP client with an application-like user interface. It provides full functionality you expect from an email client, including MIME support, address book, folder manipulation, message searching and spell checking.

A great advantage of Roundcube is the possibility to add Plugins. Thus, it is possible to extend even more the functionalities of the application. On the other hand, the application is compatible with Google, Yahoo, and other email services. All these advantages on your own server.

So let’s get started.

Install Apache web server and PHP

- Advertisement -

To install Rouncube on Ubuntu 18.04 the first step is to have a web server installed on our system. So for this tutorial, I will use Apache web server and PHP.

Open a terminal or connect to your server using SSH and run the following command:

:~$ sudo apt install apache2 php7.2 libapache2-mod-php7.2 php7.2-common php7.2-curl php7.2-mbstring php7.2-xmlrpc php7.2-mysql php7.2-gd php7.2-xml php7.2-intl php7.2-ldap php7.2-imagick php7.2-json php7.2-cli

1.- Install Apache and PHP
1.- Install Apache and PHP

After that, changes some configurations of values in order to have a better performance.

:~$ sudo nano /etc/php/7.2/apache2/php.ini
file_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 256M
upload_max_filesize = 80M
max_execution_time = 360

Save the changes and close the file. Next, restart Apache.

:~$ sudo systemctl restart apache2

Then, create a new file to test PHP.

:~$ sudo nano /var/www/html/test.php

And add the following:

<?php
phpinfo();
?>

2.- PHP info file
2.- PHP info file

Next, open your web browser and go to http://your-server-ip/test.php. If you see something like this, everything is OK.

3.- PHP
3.- PHP

Install MariaDB

Now it is the turn to install MariaDB. MariaDB is in the official Ubuntu repositories, so it will not be a problem to install it.

:~$ sudo apt install mariadb-server

4.- Install MariaDB
4.- Install MariaDB

Next, using the mysql_secure_installation set the root password.

:~$ sudo mysql_secure_installation

5.- Mysql_secure_installation script
5.- Mysql_secure_installation script

After defining the root password, you will be asked some security questions that you will have to answer as you like. I will answer Y, N, Y, Y.

Then, you need to create a MariaDB user for Rouncube.

:~$ sudo mysql -u root -p
CREATE DATABASE roundcube;
GRANT ALL PRIVILEGES ON roundcube.* TO 'rounduser'@'localhost' IDENTIFIED BY 'roundpss';
FLUSH PRIVILEGES;
exit;

6.- Creating a new database for Rouncube
6.- Creating a new database for Roundcube

Install Roundcube on Ubuntu 18.04

It is now possible to install Rouncube on Ubuntu 18.04. First, let’s download it:

:~$ cd /tmp/
:~$ wget https://github.com/roundcube/roundcubemail/releases/download/1.3.8/roundcubemail-1.3.9-complete.tar.gz

7.- Download and install Roundcube on Ubuntu 18.04
7.- Download and install Roundcube on Ubuntu 18.04

Next, decompress it.

:~$ tar -xvzf tar -xvzf roundcubemail-1.3.9-complete.tar.gz

And move it to the Apache folder.

:~$ sudo mv roundcubemail-1.3.9 /var/www/html/roundcube

After that, the Roundcube database has to be started. To do this, run the following command:

:~$ cd /var/www/html/roundcube
:~$ sudo mysql -u [user] -p [database] < SQL/mysql.initial.sql

8.- Installing Roundcube
8.- Installing Roundcube

After all this, it is necessary to assign the Rouncube folder the necessary permissions to avoid execution problems.

:~$ sudo chown -R www-data:www-data /var/www/html/roundcube/
:~$ sudo find /var/www/html/roundcube/ -type d -exec chmod 750 {} \;
:~$ sudo find /var/www/html/roundcube/ -type f -exec chmod 640 {} \;

9.- Set the permission to the folder
9.- Set the permission to the folder

Next, you need to create a new virtual host for Roundcube.

:~$ sudo nano /etc/apache2/sites-available/roundcube.conf

And add the following:

<VirtualHost *:80>
     ServerAdmin [email protected]
     DocumentRoot /var/www/html/roundcube
     ServerName your-server.com

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

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

</VirtualHost>

10.- Creating a new virtualhost for Roundcube
10.- Creating a new virtualhost for Roundcube

Save the changes and close it.

Finally, enable the new virtual host and restart Apache.

:~$ sudo a2ensite roundcube.conf
:~$ sudo systemctl reload apache2

11.- Restart Apache
11.- Restart Apache

Now, you can complete the installation using the web interface.

Set up Rouncube

Now, open your web browser and access to your server and start the installer. http://your-server/installer

12.- Installer
12.- Installer

Next, config the database and the IMAP parameters and start the installation.

13.- MariaDB parameters
13.- MariaDB parameters

Next, log in on http://your-server/

And that’s it.

Conclusion

Roundcube is a great alternative to many web clients who are heavy. In addition, Rouncube is easy to install on our private server, which gives us total control over it.

Don’t forget to share this post with your friends using social networks.

 

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article