Raspberry Pi Email Server using Citadel

What is

Preliminary Note

In this tutorial, I will use the IP address, gateway and DNS, These settings might differ for you, so you have to replace them where appropriate. You can write the commands below directly in the terminal or remote connect using a SSH client like PuTTY.

Before proceeding further you need to have Raspberry Pi OS Lite / Desktop installed on your Raspberry Pi device. If you don’t already have this, you can use the Tutorial: Installing Raspberry Pi OS to install the Operating System.


  1. Raspberry Pi 2 or greater
  2. Power supply
  3. Micro SD card 8/16GB
  4. Ethernet cord


1 Update system.

sudo apt-get update && sudo apt-get upgrade -y

2 Configure Network.

sudo nano /etc/dhcpcd.conf

Scroll to the end and the following:

interface eth0
static ip_address=
static routers=
static domain_name_servers=

Press ctrl + x, and then press y + enter to save.

Reboot with:

sudo reboot

3 Installing packages.

sudo apt install build-essential curl g++ gettext shared-mime-info libssl-dev zlib1g-dev 

4 Compiling

Login as root:

sudo su


wget -q -O - http://easyinstall.citadel.org/install | bash

Select y and press enter.

Accept the terms by writing y and then press enter.

Next press y to install dependencies

Select y and press enter to start the installation.

5 Configure

Step 1

Now, it’s time to configure Citadel. You’ll be asked to enter a username for the admin user. By default, that’s admin and you can either enter a new value or hit Enter to leave the Citadel email server username unchanged. 

Step 2

Similarly, the installation process prompts you fo enter an admin password. The default password is citadel and you can enter a new value or hit Enter to leave it unchanged. It’s optional but a security best practice to at least change the password.

Step 3

Once you’ve set a username and password, you’ll need to pick a user for Citadel to run under. The default user is root, so either enter a new value such as citadel, or leave it unchanged. It’s best to create a new user rather than run Citadel email server as root. 

Step 4

Citadel lets you enter a specific IP address for your Raspberry Pi email server to listen in on. At default, Citadel listens on all addresses, so you can leave this unchanged and hit Enter, or select a specific port. I wrote to listen on all addresses using only ipv4.

Step 5

You’ll need to pick an authentication method. Your options are:

0. Self-contained authentication

1. Host system integrated authentication

2. External LDAP – RDC 2307 POSIX schema

3. External LDAP – MS Active Directory schema

By default, option 0, self-contained authentication, is selected. Unless you need to, leave this unchanged. If you’d like to use a host system integrated authentication method, or external LDAP choices, enter the corresponding number and hit Enter. Otherwise, just leave it at 0 and press Enter.

Step 6

Lastly, choose a port for the Citadel web user-interface (web UI). If you’re running a web server like Apache or WordPress, you might want to set the HTTP port to 8080, and HTTPS port as 8433. If you aren’t running another web server, you could leave the HTTP port as 80 and HTTPS as 443. When that’s finished, you should be all ready to start using Citadel on the Raspberry Pi!

I will be using port 80 for HTTP and port 443 for HTTPS.

Step 7

When you’ve successfully installed Citadel email server on the Raspberry Pi, it’s time to actually set it up. Head to your Raspberry Pi’s IP address either on the Pi itself or from a different computer on the same network as your Pi. You can find your Raspberry Pi’s IP address with:

hostname -I

In a browser, head to http://RASPBERRY PI IP ADDRESS/. Then, the Citadel login page should pop up and prompt you for your user name and password. If that’s left unchanged, you’ll enter root and citadel, but if you changed these to custom variables, use those instead.

From here you will be able to configure citadel.


Leave a Reply