Roundcube is a popular open-source webmail client that allows you to access your emails from anywhere using a web browser. In this tutorial, we will show you how to install Roundcube on Ubuntu Server Latest.
Before starting, you will need:
The easiest way to install Roundcube is to add its official repository to your Ubuntu Server. Use the following commands to add the repository.
$ sudo apt-get install lsb-release
$ echo 'deb https://ftp.roundcube.net/ubuntu/ '$(lsb_release -sc)' main' | sudo tee /etc/apt/sources.list.d/roundcube.list
Update the local package index to reflect the new repository.
$ sudo apt-get update
Now that you’ve added Roundcube’s repository to your Ubuntu Server, it’s time to install Roundcube. Use the following command to install Roundcube.
$ sudo apt-get install roundcube -y
This command will download and install all the required packages for Roundcube webmail.
Roundcube requires a database to store its necessary data like user accounts, emails, and settings. So, let’s create a new MySQL database for Roundcube. Use the following commands to create a new MySQL database, a MySQL user, and grant all permissions to it.
$ sudo apt-get install mysql-server -y
$ sudo mysql -u root -p
Enter your MySQL root password, then run the following commands to create a new database for Roundcube.
create database roundcubemail;
GRANT ALL PRIVILEGES ON roundcubemail.* TO 'roundcube'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
quit
Make sure to replace 'password' in the above command with a strong password of your choice.
Now that Roundcube is installed on Ubuntu Server and our MySQL database is ready, it’s time to configure Roundcube. Run the following command to open the Roundcube’s default configuration file in your text editor.
$ sudo nano /etc/roundcube/config.inc.php
In the configuration file, search for the following lines:
$config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail';
Replace the ‘pass’ with the database password you created in the previous step.
$config['db_dsnw'] = 'mysql://roundcube:<your_database_password>@localhost/roundcubemail';
Save and close the file.
After making the changes in the Roundcube configuration file, you need to reload your Apache web server for the changes to take effect.
$ sudo systemctl restart apache2
Congratulations! You have successfully installed Roundcube on Ubuntu Server, and it is now ready to use. Enter your domain name or IP address followed by '/roundcube/' in your web browser's address bar:
http://yourdomain.com/roundcube/
Or,
http://your-ip-address/roundcube/
You will be directed to the Roundcube’s login page. You can log in using your email address and password.
In this tutorial, we showed you how to install Roundcube on Ubuntu Server. We also explained how to create a MySQL database for Roundcube, configure Roundcube, and access the webmail. We hope this tutorial helped you install Roundcube webmail on your Ubuntu Server.
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!