Setting Up iRedMail with Digital Ocean

Hi. It’s my first time using digital ocean so forgive me for a noob question.

I’m currently setting up iRedMail with digital ocean. I’ve followed Step 1 and Step 3 of the instructions in “

My hostname is “iredmail-testEmailServer” and i put “iredmai” on /etc/hostname. In my /etc/hosts I put “ iredmail-testEmailServer iredmail localhost locahost.localdomain”

After performing those things and running “bash” the following error shows up: “Please configure a fully qualified domain name (fqdn) in /etc/hosts before we go further.”

My question is, why does it return the error above even when I’ve provided my FQDN in /etc/hosts?

Thanks in advance.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hey kikorugeria, Your first entry in /etc/hosts doesn’t actually include a fully qualified domain name (“iredmail-testEmailServer” is just the short hostname, a FQDN would look like “”).

Is “iredmail-testEmailServer” the name of your droplet? If so, it isn’t immediately relevant to the configuration inside.

Try this:

Have ‘iredmail’ in /etc/hostname

This means the short hostname of your droplet is simply ‘iredmail’

and in /etc/hosts have localhost localhost.localdomain

This would make your FQDN for the host to be ‘

If you were planning on using your own domain you could change to whatever you domain is, for example (this would also require configuring your domain name in digital oceans admin panel)

You can verify that the FQDN is correct by running the following command:

hostname -f

which should display ‘’ (or similar) and not just ‘iredmail’.

After this you should be able to run

Hope this helps!