Excision Mail is a mail server software that is built on the Nix package manager. In this tutorial, you will learn how to install Excision Mail on the latest version of NixOS.
Before we start, make sure that you have the following prerequisites installed:
Excision Mail requires the following dependencies to be installed on your system:
You can install these dependencies using the following command:
sudo nix-env -iA nixos.nix
sudo nix-env -iA nixos.nixops
sudo nix-env -iA nixos.postgresql
sudo nix-env -iA nixos.redis
Next, you need to clone the Excision Mail repository from GitHub. You can do this using the following command:
git clone https://github.com/Excision-Mail/Excision-Mail.git
Navigate to the cloned repository and modify the configuration.nix
file to match your server configuration. Make sure to replace the domain
and hostname
values with the name of your domain and hostname.
{
nixpkgs.config.allowUnfree = true;
services.mail = {
enable = true;
domain = "example.com";
hostname = "mail.example.com";
ssl = {
enable = true;
certificateFile = "/etc/ssl/certs/example.com.pem";
privateKeyFile = "/etc/ssl/private/example.com.key";
dhParamsFile = "/etc/ssl/certs/dhparam.pem";
};
};
}
Deploy Excision Mail using NixOps by running the following command:
nixops create ./nixops/mail-server.nix ./nixops/mail-server-deploy.nix -d mail-server
This command will create a virtual machine on your server with Excision Mail installed and configured.
Check the status of Excision Mail by running the following command:
nixops deploy -d mail-server --show-trace
This command will show the status of Excision Mail and any errors that occur during deployment.
Congratulations! You have installed Excision Mail on NixOS Latest. You can now send and receive emails using your own mail server.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!