1. Log in via SSH and update the system<\/h3>\n\n\n\nssh root@IP_Address -p Port_number<\/pre>\n\n\n\nOnce logged in, run the following command to update all installed packages to the latest available version<\/p>\n\n\n\n
apt update && apt upgrade<\/pre>\n\n\n\n2. Create\/Edit Hostname<\/h3>\n\n\n\n You need to have a proper Fully Qualified Domain Name (FQDN) as your server’s hostname to be able to install iRedmail. The FQDN should be like sub.domain.com, if your hostname is only a domain name, iRedmail would not install properly. Once created, you also need to create A record for it. For example, in this tutorial, we will use mailx.domain.com.<\/p>\n\n\n\n
hostnamectl set-hostname mailx.domain.com<\/pre>\n\n\n\nBesides creating A record for the hostname, you also need to create an MX record. An MX record of your domain name should be pointed to the mail server’s hostname. As for A record for your hostname, should be pointed to your server IP address.<\/p>\n\n\n\n
If you are using our Free Managed DNS server (dns1.rosehosting.com, and dns2.rosehosting.com), you can edit\/add A and MX records for your domain name through the client area. Or, if you don’t know or have a doubt on how to do it, you can contact our support team anytime.<\/p>\n\n\n\n
You can invoke the following command to see your hostname:<\/p>\n\n\n\n
hostnamectl status<\/pre>\n\n\n\nYou will see output like this:<\/p>\n\n\n\n
root@server ~ # hostnamectl status\nStatic hostname: mailx.domain.com\nIcon name: computer-vm\nChassis: vm\nMachine ID: 13fced5cb25a4188a476f6010ac63a68\nBoot ID: f75fc7bec4bf4dcb8718c8c550dd7e6f\nVirtualization: kvm\nOperating System: Ubuntu 20.04.2 LTS\nKernel: Linux Linux 5.4.0-65-generic\nArchitecture: x86-64<\/pre>\n\n\n\nTo see the changes, log out from SSH and re-login, then invoke:<\/p>\n\n\n\n
hostname -f<\/pre>\n\n\n\n3. Download iRedmail<\/h3>\n\n\n\n You can go to their official download page to get the latest version. As of June 2021, at the time of this blog writing, the latest version was 1.4.0, we use that version for this tutorial purpose.<\/p>\n\n\n\n
wget https:\/\/github.com\/iredmail\/iRedMail\/archive\/1.4.0.tar.gz<\/pre>\n\n\n\nLet’s uncompress it.<\/p>\n\n\n\n
tar -xf 1.4.0.tar.gz<\/pre>\n\n\n\n4. Install iRedmail<\/h3>\n\n\n\n Let’s proceed with the installation now.<\/p>\n\n\n\n
cd iRedMail-1.4.0\/\nchmod +x iRedmail.sh\n.\/iRedmail.sh<\/pre>\n\n\n\nYou will be brought to a setup wizard, press Y to continue.<\/p>\n\n\n\n
In this step, you are asked to specify the storage path, you can use the default one and continue<\/p>\n\n\n\n
<\/figure><\/div>\n\n\n\nChoose whether you want to install Nginx or no, you will need to access webmail and mail administration page to manage your domain, email accounts, etc. So, it is better to choose Nginx as the web server, press Next to continue.<\/p>\n\n\n\n
<\/figure><\/div>\n\n\n\nChoose your preferred storage backend to store mail accounts and all. In this tutorial, we use MariaDB as the storage backend.<\/p>\n\n\n\n
<\/figure><\/div>\n\n\n\nNow, you are asked to create a password for MySQL root user, please create and save a copy of it, you might need it in the future. Please note that if you chose MariaDB in the previous step, even you created a password for the root user, you can still log in to MariaDB shell as root without being asked for a password. It is because MariaDB uses unix_socket authentication plugin, it means that it allows users to use OS credentials to connect to MariaDB server.<\/p>\n\n\n\n
<\/figure><\/div>\n\n\n\nAs seen in the picture, you will need to specify your domain name, which cannot be the same as your server’s hostname:<\/p>\n\n\n\n
<\/figure><\/div>\n\n\n\nOnce the domain is specified, you will be asked to create a password for postmaster@yourdomain.com, this credentials will be needed to manage your email accounts and domains.<\/p>\n\n\n\n
<\/figure><\/div>\n\n\n\nChoose additional components to install. We will install Roundcube, which is a fast and lightweight webmail client.<\/p>\n\n\n\n
<\/figure><\/div>\n\n\n\nPress Next to continue with the installation. The installation script will display all selected options.<\/p>\n\n\n\n
<\/figure><\/div>\n\n\n\nReview the options and press Y then ENTER to continue with the installation of the necessary components.<\/p>\n\n\n\n
<\/figure><\/div>\n\n\n\nPress ENTER Press ENTER again to restart the firewall.<\/p>\n\n\n\n
After this, you will be shown your iRedmail installation details.<\/p>\n\n\n\n
Now, go to your https:\/\/mailx.domain.com\/iredadmin\/ to access iRedAdmin’s admin panel, where you can manage your domains and email accounts<\/p>\n\n\n\n