Zimbra Single-Server Installation on Ubuntu LTS

Note: Zimbra contains a set of modules that can be installed on the same server (single server installations) or that can be distributed across multiple servers (multi-server installations). If you are new to Zimbra and want to set it up for the first time it’s best to try the single server installation first. You can use this guide for the installation of Zimbra OSE on Ubuntu LTS. This guide is very simple and suitable even for beginners. Here we use Ubuntu 18.04.5 LTS (Bionic Beaver) desktop version but you can use any other versions of Ubuntu as long as it is supported by Zimbra.

Installation requirements

  • 8GB of RAM
  • 10 GB free disk space
  • A clean installation of Ubuntu LTS
  • FQDN (Fully Qualified Domain Name), for example, “mail.domain.test”
  • A & MX record for your Server

Some checks

Internet connectivity

The first thing you want to check is the internet connectivity, otherwise, you will face some problems and errors which does not necessarily declare there is a problem with the network connectivity. To do so you have several options but we use the one which might not be the most comfortable one but it is a good exercise to start using the terminal.

Open terminal and type

ping google.com

You should not get any errors if you are connected to the internet. You will see a series of something like this

64 bytes from mil07s12-in-f14.1e100.net ( icmp_seq=9 ttl=113 time=10.0 ms

To stop it you can hit CTRL+C.

You need also to update the operating system by this command

sudo apt update

There are two packages we are going to use for this guide which are probably pre-installed on Ubuntu but you can run these install commands anyway to make sure.

sudo apt install wget
sudo install nano

and then reboot the system by



You also configure the firewall to open some ports. Install firewalld

sudo apt install firewalld

Open these ports and reload

firewall-cmd --permanent --add-port={25,80,110,143,443,465,587,993,995,5222,5223,9071,7071}/tcp

firewall-cmd --reload

Root access

As you see up to this point you should enter your password each time you use sudo command, to make this easier you can access the root by entering the password only one time. For some configuration we want to make in the future it will be also necessary to access the root. To do so type this command

sudo -i

Enter the user password and you will be the root user. You should see the command line now contains the word root and $ changed to #

Knowing network interfaces of your machine

In this section, you learn how to acquire the name of the network interface that should be configured for
static IP. To find out the name of your machine’s network interfaces you can use the command

ip addr

The result would be different based on how many network adapters you have and the operating system you use.

In our case, as you see in the figures one of the network interfaces is called enp0s3 (alternatively you may
find it under the name eth0). This is the one you should configure in the next section.

Static IP

From the last part you know which network interface you should work on. Let’s call yourInterface, in our case, it is called only enp0s3 (the other common name you may find for it would be eth0).

You should look inside the netplan folder to find a .yaml file, we should do this because the name of the file can vary from machine to machine. So, let’s list all the files inside the netplan folder

ls /etc/netplan

You can find the name of the file in the output. Let’s say the name of the file is yourFileName.yaml you should open it with nano to edit the content

nano /etc/netplan/yourFileName.yaml


  • yourFileName should be replaced with the file name on your machine.

You should configure the file like this

      dhcp4: false
      addresses: [yourStaticIP/24]
  version: 2


  • yourInterface should be replaced by the name of your network interface which came with the
    installation of the operating system. Usually called enp0s3 or eth0, in our case, it is enp0s3.
  • yourStaticIP should be replaced by the IP address you want to set for your machine, in our case we chose

Save the file by CTRL+S and close it by CTRL+X.

Then we apply the netplan by

netplan apply

You shouldn’t get any error otherwise you may misspell something or the indentation is wrong (the indentation in this file is very important).

If you set everything correctly you should see your chosen IP under the network interface name when you enter ip addr command

ip addr

For example, here we see the IP address under enp0s8.


Let’s create a local DNS resolution. First, install and configure resolv.conf file

apt install resolvconf

Open head file with nano

nano /etc/resolvconf/resolv.conf.d/head

Now we add the line nameserver to the file which is empty other than some commented lines

This way you changed the resolv.conf file permanently otherwise it will go back to its default after the reboot.

Tell resolvconf to regenerate the resolv.conf file. This automatically adds the line to resolv.conf file

resolvconf -u

The hostname of your machine will be your server name. In order to find out your current hostname, you can run this command


If you want to change it (not necessary) you can do it by

hostnamectl set-hostname yourServerName

Where you replace

  • yourServerName with your preferred name. In our example the hostname (server name) is mail.

Then install DNSMasq by

apt install dnsmasq

Then configure dnsmasq.conf file by

nano /etc/dnsmasq.conf

You’ll see a lot of commented lines starting by # at the beginning of the file. what we want to do is to add these lines at the beginning of the file

ptr-record= yourRreverseIP.in-addr.arpa,yourServerName.yourDomainName.yourTLD


  • yourStaticIP is your static address you set before.
  • YourServeName is your hostname (server name).
  • yourRreverseIP is the same as the yourStaticIP you set but in reverse format. For example, if yourStaticIPis, yourRreverseIP would be
  • yourDomainName will be your preferred name for the second-level domain of your email address.
  • yourTLD will be your preferred top-level domain of your email address.

Here is the purpose of each of those 8 lines

# Name Server(s) to use for resolution, like Google's public DNS servers (,
# Other Zimbra servers on the network can query your server, by default only localhost can talk to it.
# Your Zimbra server's domain.
# DNS A Record-Equivalent.
# DNS PTR Record-Equivalent.
# DNS MX Record-Equivalent.
# DNS MX Record-Equivalent.
# Where your server finds out about other hosts before it asks the public nameservers.
# Increases the number of host lookups cached from the default 150.

Configuring hosts file

Here you should add a line in the hosts file. Open the file by

nano /etc/hosts

You should delete the second line and add this line instead

yourStaticIP yourServerName.yourDomainName.yourTLD yourServerName


  • yourServerName is your hostname (server name)
  • yourStaticIP is the static IP you set before.

You can use both TAB and Space between the yourStaticIP, yourServerName.yourDomainName.yourTLD, and yourServerName

Now reboot and test all the configurations by

dig a yourDomainName.yourTLD
dig mx yourDomainName.yourTLD

You will see some results, the thing you should notice is that you have 1 package as query and 1 as the answer. If the answer is 0 there would be some mistakes in the previous steps.

Installation of Zimbra

Download Zimbra by wget something like the command

wget https://files.zimbra.com/downloads/zimbraVersion/zimbraFileName

but with a Zimbra version compatible with your server machine. To find out the address of the file you should substitute with the address above you should go here and copy the address of 64bitx86 download link and put it in front of wget command. For example:

If you run one of the Ubuntu 14.04 LTS operating systems you should use this command

wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_3869.UBUNTU14_64.20190918004220.tgz

If you run one of the Ubuntu 16.04 LTS operating systems you should use this command

wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_3869.UBUNTU16_64.20190918004220.tgz

If you run one of the Ubuntu 18.04 LTS operating systems you should use this command

wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_3869.UBUNTU18_64.20190918004220.tgz

Then extract it by

tar zxvf zimbraFileName.tgz

Note that you should put only the file name and .tgz not the download link. The file name starts by zcs. like zcs-8.8.15_GA_3869.UBUNTU18_64.20190918004220.tgz

And go to the extracted folder by

cd zimbraFileName

Note that you should put only the file name not the . tgz which is the name of the extracted folder. Something like cd zcs-8.8.15_GA_3869.UBUNTU18_64.20190918004220.

Now install Zimbra by running the install.sh file using the screen command

screen ./instal.sh

There are different packages that installation asks you to choose if you want to install or not. Should say yes to all but zimbra-imapd.

You should not install zimbra-dnscache too because you use a local DNS as you configured before with dnsmasq, otherwise, they may clash.

Here you may get an error if you haven’t inserted the MX record for yourServerName.yourDomainName.yourTLD (for example in our case “mail.domain.test”) in the dnsmasq.conf file, but as you did it already in line 7 of dnsmasq.conf file you’re good to go.

After all these you reach where you can configure Zimbra which you don’t need to since it has all the proper configurations predefined. You only need to set an admin password for that. To do so you type 6
and hit ENTER then 4 and ENTER then you type the password you chose and hit ENTER. Then enter character a followed by ENTER and answer yes to the last two questions and last ENTER and done.

Now you can go to your browser with other machines (like the one you installed your virtual machine on it) and enter into the address bar https://yourStaticIP:7071/zimbraAdmin/where you substitute yourStaticIP with the IP you set or it can be your domain you chose. It will say the connection is not private and you have to accept to go inside by hitting advanced and Proceed. Then you see this

Now you can test your server

Go back from the Zimbra folder by

cd ..

Switch to Zimbra by

su - zimbra

You can type this command to see which services are running

zmcontrol status

To restart services run this command

zmcontrol restart

Post your comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

How to Install Zimbra OSE on CentOS/RHEL
ZIMBRA Multi Server Installation on CentOS / RHEL