{"id":6279,"date":"2020-07-01T22:48:59","date_gmt":"2020-07-01T19:48:59","guid":{"rendered":"https:\/\/kifarunix.com\/?p=6279"},"modified":"2024-03-14T22:17:46","modified_gmt":"2024-03-14T19:17:46","slug":"install-and-setup-roundcube-webmail-on-ubuntu","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-and-setup-roundcube-webmail-on-ubuntu\/","title":{"rendered":"Install and Setup Roundcube Webmail on Ubuntu 22.04\/20.04"},"content":{"rendered":"\n<p>In this tutorial, we are going to learn how to install and setup Roundcube webmail on Ubuntu 22.04\/20.04.\u00a0<a href=\"https:\/\/roundcube.net\/\" target=\"_blank\" rel=\"noreferrer noopener\">Roundcube<\/a>\u00a0webmail is a free and open source web-based IMAP email client. It is written in PHP and works just like any other email client.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#what-the-are-features-of-roundcube\">What the are Features of Roundcube?<\/a><\/li><li><a href=\"#installing-roundcube-webmail-on-ubuntu-22-04-20-04\">Installing Roundcube Webmail on Ubuntu 22.04\/20.04<\/a><ul><li><a href=\"#prerequisites\">Prerequisites<\/a><ul><li><a href=\"#install-apache-web-server-on-ubuntu\">Install Apache Web Server on Ubuntu<\/a><\/li><li><a href=\"#install-my-sql-maria-db-on-ubuntu-22-04-20-04\">Install MySQL\/MariaDB on Ubuntu 22.04\/20.04<\/a><\/li><li><a href=\"#install-php-8-on-ubuntu\">Install PHP 8 on Ubuntu<\/a><\/li><\/ul><\/li><li><a href=\"#install-roundcube-webmail-on-ubuntu-22-04-20-04\">Install Roundcube Webmail on Ubuntu 22.04\/20.04<\/a><ul><li><a href=\"#download-roundcube\">Download Roundcube<\/a><\/li><li><a href=\"#extract-roundcube-to-apache-web-root-directory\">Extract Roundcube to Apache Web  Root Directory<\/a><\/li><\/ul><\/li><li><a href=\"#configure-apache-virtual-host-for-roundcube\">Configure Apache VirtualHost for Roundcube<\/a><\/li><li><a href=\"#setup-roundcube-database\">Setup Roundcube Database<\/a><ul><li><a href=\"#create-roundcube-database-and-database-user\">Create Roundcube Database and Database User<\/a><\/li><li><a href=\"#import-roundcube-initial-database\">Import Roundcube initial database<\/a><\/li><\/ul><\/li><li><a href=\"#configure-php-for-roundcube\">Configure PHP for Roundcube<\/a><\/li><li><a href=\"#finalize-roundcube-webmail-setup-on-ubuntu-22-04-20-04\">Finalize Roundcube Webmail Setup on Ubuntu 22.04\/20.04<\/a><ul><li><a href=\"#check-the-prerequisites\">Check the Prerequisites<\/a><\/li><li><a href=\"#create-roundcube-configuration\">Create Roundcube Configuration<\/a><\/li><\/ul><\/li><li><a href=\"#login-to-roundcube-webmail\">Login to Roundcube Webmail<\/a><\/li><li><a href=\"#further-reading\">Further Reading<\/a><\/li><li><a href=\"#related-tutorials\">Related Tutorials<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-the-are-features-of-roundcube\">What the are Features of Roundcube?<\/h2>\n\n\n\n<p>It provides a handful of features;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Full support for MIME and HTML messages<\/li>\n\n\n\n<li>Sophisticated privacy protection<\/li>\n\n\n\n<li>Compose messages with attachments<\/li>\n\n\n\n<li>Multiple sender identities<\/li>\n\n\n\n<li>Full featured address book with groups and LDAP connectors<\/li>\n\n\n\n<li>Find-as-you-type address book integration<\/li>\n\n\n\n<li>Richtext\/HTML message composing<\/li>\n\n\n\n<li>Forwarding messages with attachments<\/li>\n\n\n\n<li>Searching messages and contacts<\/li>\n\n\n\n<li>Spell checking<\/li>\n<\/ul>\n\n\n\n<p>You can find comprehensive list of features of Roundcube&nbsp;<a href=\"https:\/\/roundcube.net\/about\/\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installing-roundcube-webmail-on-ubuntu-22-04-20-04\">Installing Roundcube Webmail on Ubuntu 22.04\/20.04<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"prerequisites\">Prerequisites<\/h3>\n\n\n\n<p>As stated, Roundcube Webmail is written in PHP and thus it runs on a standard LAMPP server. The following are the minimum server requirements;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Apache, Lighttpd, Nginx, Cherokee or Hiawatha web server<\/li>\n\n\n\n<li>PHP Version 7.3 or greater<\/li>\n\n\n\n<li>MySQL, PostgreSQL, SQLite, MSSQL or Oracle database<\/li>\n\n\n\n<li>SMTP server and IMAP server with IMAP4 rev1 support<\/li>\n\n\n\n<li>PEAR packages distributed with Roundcube<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"install-apache-web-server-on-ubuntu\">Install Apache Web Server on Ubuntu<\/h4>\n\n\n\n<p>In this tutorial, we are going to use Apache as our web server. Therefore, follow through to install and configure it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">apt install apache2 -y<\/pre>\n\n\n\n<p>Apache is started and enabled by default after installation.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status apache2<\/code><\/pre>\n\n\n\n<p>If not running, then execute the command below to start and enable it to run on system boot;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl enable --now apache2<\/code><\/pre>\n\n\n\n<p>Roundcube supports various database backends as stated above. In this guide, we are going to use MySQL.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"install-my-sql-maria-db-on-ubuntu-22-04-20-04\">Install MySQL\/MariaDB on Ubuntu 22.04\/20.04<\/h4>\n\n\n\n<p>MariaDB is available on default Debian repositories and can be installed as shown in this guide.<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/?s=mariadb+ubuntu\" target=\"_blank\" rel=\"noreferrer noopener\">How to install MariaDB on Ubuntu<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/?s=mysql+ubuntu\" target=\"_blank\" rel=\"noreferrer noopener\">How to Install MySQL on Ubuntu<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"install-php-8-on-ubuntu\">Install PHP 8 on Ubuntu<\/h4>\n\n\n\n<p>PHP is a server side scripting language that helps generate dynamic web content.<\/p>\n\n\n\n<p>On Ubuntu 22.04;<\/p>\n\n\n\n<p>To install PHP and all the requires dependencies for Roundcube, run the command below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install openssl composer php-{net-smtp,mysql,gd,xml,mbstring,intl,zip,json,pear,bz2,gmp,\\\nimap,imagick,auth-sasl,mail-mime,net-ldap3,net-sieve,curl} libapache2-mod-php curl -y<\/code><\/pre>\n\n\n\n<p>On Ubuntu 20.04, to install PHP 8.2, you need additional Ondej Repo.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install software-properties-common ca-certificates lsb-release apt-transport-https <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>add-apt-repository ppa:ondrej\/php --yes<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install openssl composer php-{net-smtp,mysql,gd,xml,mbstring,intl,zip,\\\npear,bz2,gmp,imap,imagick,auth-sasl,mail-mime,net-ldap3,net-sieve,curl} \\\nlibapache2-mod-php curl -y<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-roundcube-webmail-on-ubuntu-22-04-20-04\">Install Roundcube Webmail on Ubuntu 22.04\/20.04<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"download-roundcube\">Download Roundcube<\/h4>\n\n\n\n<p>The latest stable release version for Roundcube can be installed by downloading the source code from the&nbsp;<a href=\"https:\/\/roundcube.net\/download\/\" target=\"_blank\" rel=\"noreferrer noopener\">Roundcube downloads page<\/a>.<\/p>\n\n\n\n<p>NOTE that Rouncube is available on the default Ubuntu repos. However, the available version is not up-to-date.<\/p>\n\n\n\n<p>As of this writing, Roundcube 1.6.2 is the latest stable release version. You can simply get the link and pull the tarball as follows;<\/p>\n\n\n\n<p><strong>Be sure to download the complete package<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>VER=1.6.2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/github.com\/roundcube\/roundcubemail\/releases\/download\/${VER}\/roundcubemail-${VER}-complete.tar.gz<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"extract-roundcube-to-apache-web-root-directory\">Extract Roundcube to Apache Web  Root Directory<\/h4>\n\n\n\n<p>Extract the Roundcube tarball archive to your web root directory, in our case, this directory is <code>\/var\/www\/html\/roundcube<\/code>.<\/p>\n\n\n\n<p>Create this directory if it doesn&#8217;t exist.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/var\/www\/html\/roundcube<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>tar xzf roundcubemail-${VER}-complete.tar.gz -C \/var\/www\/html\/roundcube --strip-components 1<\/code><\/pre>\n\n\n\n<p>Set proper ownership for roundcube root directory and permissions for Roundcube&nbsp;<code>\/temp<\/code>&nbsp;and&nbsp;<code>\/logs<\/code>&nbsp;directories;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chown -R www-data:www-data \/var\/www\/html\/roundcube\/<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod -R 775 \/var\/www\/html\/roundcube\/{temp,logs}<\/code><\/pre>\n\n\n\n<p>The&nbsp;<code>\/config<\/code>,&nbsp;<code>\/temp<\/code>&nbsp;and&nbsp;<code>\/logs<\/code>&nbsp;directories should be protected against access from the browser.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"configure-apache-virtual-host-for-roundcube\">Configure Apache VirtualHost for Roundcube<\/h3>\n\n\n\n<p>Create a dedicated Apache VirtualHost configuration file for Roundcube;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim \/etc\/apache2\/sites-available\/roundcube.conf<\/code><\/pre>\n\n\n\n<p>Paste the content below.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>\n&lt;VirtualHost *:80>\n        ServerName roundcube.kifarunix-demo.com\n        ServerAdmin master@kifarunix-demo.com\n        DocumentRoot \/var\/www\/html\/roundcube\n\n\t&lt;Directory \/var\/www\/html\/roundcube>\n\t\tOptions +FollowSymLinks\n\t\tAddType text\/x-component .htc\n\t\t&lt;IfModule mod_php.c>\n\t\t\tphp_flag        display_errors  Off\n\t\t\tphp_flag        log_errors      On\n\t\t\tphp_value       upload_max_filesize     10M\n\t\t\tphp_value       post_max_size           12M\n\t\t\tphp_value       memory_limit            64M\n\t\t\tphp_flag        zlib.output_compression         Off\n\t\t\tphp_flag        magic_quotes_gpc                Off\n\t\t\tphp_flag        magic_quotes_runtime            Off\n\t\t\tphp_flag        zend.ze1_compatibility_mode     Off\n\t\t\tphp_flag        suhosin.session.encrypt         Off\n\t\t\tphp_flag        session.auto_start      Off\n\t\t\tphp_value       session.gc_maxlifetime  21600\n\t\t\tphp_value       session.gc_divisor      500\n\t\t\tphp_value       session.gc_probability  1\n\t\t&lt;\/IfModule>\n\t\t&lt;IfModule mod_rewrite.c>\n\t\t\tRewriteEngine On\n\t\t\tRewriteRule ^favicon\\.ico$ skins\/larry\/images\/favicon.ico\n\t\t\tRewriteRule ^(?!installer)(\\.?[^\\.]+)$ - [F]\n\t\t\tRewriteRule ^\/?(\\.git|\\.tx|SQL|bin|config|logs|temp|tests|program\\\/(include|lib|localization|steps)) - [F]\n\t\t\tRewriteRule \/?(README\\.md|composer\\.json-dist|composer\\.json|package\\.xml)$ - [F]\n\t\t&lt;\/IfModule>\n\t\t&lt;IfModule mod_deflate.c>\n\t\t\tSetOutputFilter DEFLATE\n\t\t&lt;\/IfModule>\n\t\t&lt;IfModule mod_headers.c>\n\t\t\t# replace 'append' with 'merge' for Apache version 2.2.9 and later\n\t\t\t# Header append Cache-Control public env=!NO_CACHE\n\t\t&lt;\/IfModule>\n\t\t&lt;IfModule mod_expires.c>\n\t\t\tExpiresActive On\n\t\t\tExpiresDefault \"access plus 1 month\"\n\t\t&lt;\/IfModule>\n\t\tFileETag MTime Size\n\t\t&lt;IfModule mod_autoindex.c>\n\t\t\tOptions -Indexes\n\t\t&lt;\/ifModule>\n\t\tAllowOverride None\n\t\tRequire all granted\n\t&lt;\/Directory>\n\t\n\t&lt;Directory \/var\/www\/html\/roundcube\/plugins\/enigma\/home>\n\t\tOptions -FollowSymLinks\n\t\tAllowOverride None\n\t\tRequire all denied\n\t&lt;\/Directory>\n\t&lt;Directory \/var\/www\/html\/roundcube\/config>\n\t\tOptions -FollowSymLinks\n\t\tAllowOverride None\n\t\tRequire all denied\n\t&lt;\/Directory>\n\t&lt;Directory \/var\/www\/html\/roundcube\/temp>\n\t\tOptions -FollowSymLinks\n\t\tAllowOverride None\n\t\tRequire all denied\n\t&lt;\/Directory>\n\t&lt;Directory \/var\/www\/html\/roundcube\/logs>\n\t\tOptions -FollowSymLinks\n\t\tAllowOverride None\n\t\tRequire all denied\n\t&lt;\/Directory>\n        ErrorLog ${APACHE_LOG_DIR}\/roundcube-error.log\n        CustomLog ${APACHE_LOG_DIR}\/roundcube-access.log combined\n&lt;\/VirtualHost>\n<\/code><\/pre>\n\n\n\n<p>Save and quit the configuration file.<\/p>\n\n\n\n<p>If you need to use HTTPS, obtain the SSL\/TLS certificates and configure Apache appropriately.<\/p>\n\n\n\n<p>Disable Apache default site<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>a2dissite 000-default<\/code><\/pre>\n\n\n\n<p>Enable Roundcube site.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>a2ensite roundcube<\/code><\/pre>\n\n\n\n<p>Enable the following Apache Modules<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>a2enmod deflate expires headers rewrite<\/code><\/pre>\n\n\n\n<p>Verify syntactical errors in Rouncube site configuration.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apachectl -t<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Syntax OK<\/code><\/pre>\n\n\n\n<p>If there are syntax errors, restart Apache if there is error.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart apache2<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"setup-roundcube-database\">Setup Roundcube Database<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"create-roundcube-database-and-database-user\">Create Roundcube Database and Database User<\/h4>\n\n\n\n<p>Roundcube supports various database backends as stated above.<\/p>\n\n\n\n<p>In this guide, we are going to use MySQL server which we already installed in the guide whose link is given above.<\/p>\n\n\n\n<p>Login to MySQL and create Roundcube databases.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl enable --now mariadb<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p<\/code><\/pre>\n\n\n\n<p>Replace the database and database user names accordingly.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>create database roundcube;<\/code><\/pre>\n\n\n\n<p>Create Roundcube database user and grant all privileges on Roundcube database.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>create user rcadmin@localhost identified by 'StrongPassword';<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>grant all on roundcube.* to rcadmin@localhost;<\/code><\/pre>\n\n\n\n<p>Reload privileges tables and exit the database;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>flush privileges;\nquit<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"import-roundcube-initial-database\">Import Roundcube initial database<\/h4>\n\n\n\n<p>Import Roundcube initial database into MySQL database created above;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u rcadmin -p roundcube &lt; \/var\/www\/html\/roundcube\/SQL\/mysql.initial.sql<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"configure-php-for-roundcube\">Configure PHP for Roundcube<\/h3>\n\n\n\n<p>To begin, ensure the mbstring, xml, dom, intl PHP modules are enabled;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php -m | grep -iE \"mbstring|xml|dom|intl\"<\/code><\/pre>\n\n\n\n<p>Set default time zone in php.ini;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sed -i 's\/^;date.timezone =\/date.timezone = Asia\\\/Nicosia\/' \/etc\/php\/*\/apache2\/php.ini<\/code><\/pre>\n\n\n\n<p>And restart Apache;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart apache2<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"finalize-roundcube-webmail-setup-on-ubuntu-22-04-20-04\">Finalize Roundcube Webmail Setup on Ubuntu 22.04\/20.04<\/h3>\n\n\n\n<p>You can now complete the setup of Roundcube from browser by accessing the <code><strong>http:\/\/server-IP-or-hostname\/installer<\/strong><\/code> link.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"check-the-prerequisites\">Check the Prerequisites<\/h4>\n\n\n\n<p>When the installer runs, it first checks if all required dependencies are met. Ensure that everything is in an <strong>OK<\/strong> state before proceeding.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1470\" height=\"674\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/07\/check-roundcube-php-requirements.png\" alt=\"\" class=\"wp-image-17845\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/07\/check-roundcube-php-requirements.png?v=1689357518 1470w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/07\/check-roundcube-php-requirements-768x352.png?v=1689357518 768w\" sizes=\"(max-width: 1470px) 100vw, 1470px\" \/><\/figure>\n\n\n\n<p>Database and other libs checks;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1079\" height=\"598\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/check-database-and-required-libs.png\" alt=\"\" class=\"wp-image-17846\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/check-database-and-required-libs.png?v=1689357541 1079w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/check-database-and-required-libs-768x426.png?v=1689357541 768w\" sizes=\"(max-width: 1079px) 100vw, 1079px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"create-roundcube-configuration\">Create Roundcube Configuration<\/h4>\n\n\n\n<p>Once all the requirements are met, go to the next step to create configuration for Roundcube.<\/p>\n\n\n\n<p>For the <strong>General configuration<\/strong> and <strong>Logging &amp; Debugging<\/strong> settings, let us go with the defaults.<\/p>\n\n\n\n<p>Set the database connection settings as per what you created above.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"911\" height=\"396\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/07\/database-settings.png\" alt=\"\" class=\"wp-image-6285\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/07\/database-settings.png?v=1593631991 911w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/07\/database-settings-768x334.png?v=1593631991 768w\" sizes=\"(max-width: 911px) 100vw, 911px\" \/><\/figure><\/div>\n\n\n<p>For both IMAP and SMTP settings, we are using GMAIL relay. Hence just set the hosts and ports.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1455\" height=\"770\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/imap-settings.png\" alt=\"\" class=\"wp-image-17847\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/imap-settings.png?v=1689358049 1455w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/imap-settings-768x406.png?v=1689358049 768w\" sizes=\"(max-width: 1455px) 100vw, 1455px\" \/><\/figure>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1463\" height=\"330\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/smtp-settings.png\" alt=\"\" class=\"wp-image-17848\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/smtp-settings.png?v=1689358064 1463w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/smtp-settings-768x173.png?v=1689358064 768w\" sizes=\"(max-width: 1463px) 100vw, 1463px\" \/><\/figure><\/div>\n\n\n<p>For the rest of the settings, you can leave the defaults or update them to your preference.<\/p>\n\n\n\n<p>Read more on the <a href=\"https:\/\/github.com\/roundcube\/roundcubemail\/wiki\/Configuration\" target=\"_blank\" rel=\"noreferrer noopener\">configurations page<\/a>.<\/p>\n\n\n\n<p>At the bottom of the page, <strong>CREATE CONFIG<\/strong> to create your Roundcube configuration with the options you have defined.<\/p>\n\n\n\n<p>The configs are written to <strong><code>\/var\/www\/html\/roundcube\/config\/config.inc.php<\/code><\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat \/var\/www\/html\/roundcube\/config\/config.inc.php<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\n&lt;?php\n\n\/* Local configuration for Roundcube Webmail *\/\n\n\/\/ ----------------------------------\n\/\/ SQL DATABASE\n\/\/ ----------------------------------\n\/\/ Database connection string (DSN) for read+write operations\n\/\/ Format (compatible with PEAR MDB2): db_provider:\/\/user:password@host\/database\n\/\/ Currently supported db_providers: mysql, pgsql, sqlite, mssql, sqlsrv, oracle\n\/\/ For examples see http:\/\/pear.php.net\/manual\/en\/package.database.mdb2.intro-dsn.php\n\/\/ Note: for SQLite use absolute path (Linux): 'sqlite:\/\/\/\/full\/path\/to\/sqlite.db?mode=0646'\n\/\/       or (Windows): 'sqlite:\/\/\/C:\/full\/path\/to\/sqlite.db'\n\/\/ Note: Various drivers support various additional arguments for connection,\n\/\/       for Mysql: key, cipher, cert, capath, ca, verify_server_cert,\n\/\/       for Postgres: application_name, sslmode, sslcert, sslkey, sslrootcert, sslcrl, sslcompression, service.\n\/\/       e.g. 'mysql:\/\/roundcube:@localhost\/roundcubemail?verify_server_cert=false'\n$config['db_dsnw'] = 'mysql:\/\/rcadmin:StrongPassword@localhost\/roundcube';\n\n\/\/ ----------------------------------\n\/\/ IMAP\n\/\/ ----------------------------------\n\/\/ The IMAP host (and optionally port number) chosen to perform the log-in.\n\/\/ Leave blank to show a textbox at login, give a list of hosts\n\/\/ to display a pulldown menu or set one host as string.\n\/\/ Enter hostname with prefix ssl:\/\/ to use Implicit TLS, or use\n\/\/ prefix tls:\/\/ to use STARTTLS.\n\/\/ If port number is omitted it will be set to 993 (for ssl:\/\/) or 143 otherwise.\n\/\/ Supported replacement variables:\n\/\/ %n - hostname ($_SERVER['SERVER_NAME'])\n\/\/ %t - hostname without the first part\n\/\/ %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)\n\/\/ %s - domain name after the '@' from e-mail address provided at login screen\n\/\/ For example %n = mail.domain.tld, %t = domain.tld\n\/\/ WARNING: After hostname change update of mail_host column in users table is\n\/\/          required to match old user data records with the new host.\n$config['imap_host'] = 'ssl:\/\/imap.gmail.com:993';\n\n\/\/ ----------------------------------\n\/\/ SMTP\n\/\/ ----------------------------------\n\/\/ SMTP server host (and optional port number) for sending mails.\n\/\/ Enter hostname with prefix ssl:\/\/ to use Implicit TLS, or use\n\/\/ prefix tls:\/\/ to use STARTTLS.\n\/\/ If port number is omitted it will be set to 465 (for ssl:\/\/) or 587 otherwise.\n\/\/ Supported replacement variables:\n\/\/ %h - user's IMAP hostname\n\/\/ %n - hostname ($_SERVER['SERVER_NAME'])\n\/\/ %t - hostname without the first part\n\/\/ %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)\n\/\/ %z - IMAP domain (IMAP hostname without the first part)\n\/\/ For example %n = mail.domain.tld, %t = domain.tld\n\/\/ To specify different SMTP servers for different IMAP hosts provide an array\n\/\/ of IMAP host (no prefix or port) and SMTP server e.g. ['imap.example.com' => 'smtp.example.net']\n$config['smtp_host'] = 'tls:\/\/smtp.gmail.com:587';\n\n\/\/ provide an URL where a user can get support for this Roundcube installation\n\/\/ PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!\n$config['support_url'] = '';\n\n\/\/ This key is used for encrypting purposes, like storing of imap password\n\/\/ in the session. For historical reasons it's called DES_key, but it's used\n\/\/ with any configured cipher_method (see below).\n\/\/ For the default cipher_method a required key length is 24 characters.\n$config['des_key'] = 'oHdGSqFPedBi919AL0Kfkwa5';\n\n\/\/ ----------------------------------\n\/\/ PLUGINS\n\/\/ ----------------------------------\n\/\/ List of active plugins (in plugins\/ directory)\n$config['plugins'] = [];\n<\/code><\/pre>\n\n\n\n<p>You should see a message that the configuration has been created successfully.<\/p>\n\n\n\n<p>Click <strong>CONTINUE<\/strong> to proceed and <strong>Test the configuration.<\/strong><\/p>\n\n\n\n<p>Test your mail relay message deliverability by entering your email and password and click <strong>Send Test mail<\/strong>.<\/p>\n\n\n\n<p>Test your message receivability, click <strong>Check login<\/strong> to verify.<\/p>\n\n\n\n<p>You need to use App password for the Gmail Account.<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/configure-postfix-to-use-gmail-app-passwords\/\" target=\"_blank\" rel=\"noreferrer noopener\">Configure Postfix to Use Gmail App Passwords<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1191\" height=\"782\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/test-email-settings-roundcube.png\" alt=\"\" class=\"wp-image-17849\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/test-email-settings-roundcube.png?v=1689358546 1191w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/07\/test-email-settings-roundcube-768x504.png?v=1689358546 768w\" sizes=\"(max-width: 1191px) 100vw, 1191px\" \/><\/figure>\n\n\n\n<p>After completing the installation and the final tests <strong>remove<\/strong>&nbsp;the whole installer folder from the web root directory.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rm -rf \/var\/www\/html\/roundcube\/installer\/<\/code><\/pre>\n\n\n\n<p>You can simply disable the installer by running the command below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"$config&#91;'enable_installer'] = false;\" &gt;&gt; \/var\/www\/html\/roundcube\/config\/config.inc.php<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"login-to-roundcube-webmail\">Login to Roundcube Webmail<\/h3>\n\n\n\n<p>You can now access your Roundcube webmail via the address <strong>http:\/\/server-IP-or-hostname<\/strong>. This takes you to the login screen.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1289\" height=\"562\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/07\/roundcube-login.png\" alt=\"\" class=\"wp-image-6292\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/07\/roundcube-login.png?v=1593632476 1289w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/07\/roundcube-login-768x335.png?v=1593632476 768w\" sizes=\"(max-width: 1289px) 100vw, 1289px\" \/><\/figure><\/div>\n\n\n<p>Use your email account credentials for logging in. In my case, am using my Gmail account.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1757\" height=\"959\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/roundcube-dashboard.png\" alt=\"\" class=\"wp-image-11953\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/roundcube-dashboard.png?v=1648505340 1757w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/roundcube-dashboard-768x419.png?v=1648505340 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/03\/roundcube-dashboard-1536x838.png?v=1648505340 1536w\" sizes=\"(max-width: 1757px) 100vw, 1757px\" \/><\/figure><\/div>\n\n\n<p>There you go. Roundcube is now up and running on Ubuntu 22.04\/20.04. You can explore various functionalities of the tool further.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"further-reading\">Further Reading<\/h3>\n\n\n\n<p><a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/github.com\/roundcube\/roundcubemail\/wiki\" target=\"_blank\" rel=\"noreferrer noopener\">Roundcube HowTo wiki<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"related-tutorials\">Related Tutorials<\/h3>\n\n\n\n<p><a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/how-to-install-and-setup-roundcube-webmail-on-debain-9\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Install and Setup Roundcube Webmail on Debian 12\/11<\/a><\/p>\n\n\n\n<p><a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/configure-sendmail-to-use-gmail-relay-on-ubuntu-18-04-debian-10-9\/\" target=\"_blank\" rel=\"noreferrer noopener\">Configure Sendmail to Use Gmail Relay on Ubuntu 18.04\/Debian 10\/9<\/a><\/p>\n\n\n\n<p><a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/how-to-setup-iredmail-mail-server-on-ubuntu-18-04-lts\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Install and Setup iRedMail Mail Server on Ubuntu 18.04 LTS<\/a><\/p>\n\n\n\n<p><a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-zimbra-mail-server-on-fedora30-29-centos-7\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Zimbra Mail Server on Fedora 30\/29\/CentOS 7<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we are going to learn how to install and setup Roundcube webmail on Ubuntu 22.04\/20.04.\u00a0Roundcube\u00a0webmail is a free and open source web-based<\/p>\n","protected":false},"author":1,"featured_media":11954,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,272],"tags":[1746,1008,1748,1745,270,1749,1200,1747],"class_list":["post-6279","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-email","tag-configure-roundcube-webmail-on-ubuntu-20-04","tag-gmail-relay","tag-imap","tag-install-roundcube-on-ubuntu-20-04","tag-roundcube","tag-smtp","tag-ubuntu-20-04","tag-webmail","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/6279"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=6279"}],"version-history":[{"count":7,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/6279\/revisions"}],"predecessor-version":[{"id":21460,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/6279\/revisions\/21460"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/11954"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=6279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=6279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=6279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}