Differences between revisions 8 and 47 (spanning 39 versions)
Revision 8 as of 2020-04-28 12:55:00
Size: 3924
Editor: BrianEMWD
Comment:
Revision 47 as of 2021-02-26 20:02:13
Size: 0
Editor: BrianEMWD
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= How to Install Mailman 3 on a Debian 10 Server. =

This document is a How-To on installing Mailman 3 on a Debian 10 server. The server environment will include Debian 10, NGINX, Let's Encrypt, Postfix, and PosgresDB.

== Prepare Server Environment ==

1. Create a VPS running Debian 10. I recommend something from Digital Ocean or Linode. The server should be a minimum of 1 CPU and 2 Gigabyte of Memory. 25-50 Gb of storage should be sufficient.

2. Log into the server as root.

{{{
$ ssh root@your_server_ip
}}}

3. Create a New User: mailman

{{{
# adduser mailman
}}}

You will be asked some questions about this new user when running the above command. Please make sure you use a strong password for mailman as it will be typically known that any server running Mailman 3 will have a mailman user setup on it.

4. Let's go ahead and grant the 'mailman' user SUDO privileges while logged in as root:

{{{
# usermod -aG sudo mailman
}}}

5. I recommend setting up a basic firewall to tighten up security on this Mailman 3 server. UFW is one that can be installed on a Debian 10 server:

{{{
# apt update
# apt install ufw
}}}

Once UFW is installed, you need to make sure you allow the various applications that Mailman 3 will be using through UFW. Some of these applications are the following: OpenSSH, Nginx Full, and Postfix.

So here is an example of what to do immediately after you install UFW:

{{{
# ufw app list
}}}

{{{
Output
Available applications:
 . . .
 OpenSSH
 . . .
}}}

This tells us what available applications we can configure UFW to allow. So let's add OpenSSH to UFW:

{{{
# ufw allow OpenSSH
}}}

Now we can enable UFW:

{{{
# ufw enable
}}}

You can see what is allowed through the UFW firewall by running the following command:


{{{
# ufw status
}}}


{{{
Output
Status: active

To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)
}}}

== Webserver Installation: NGINX ==

1. Both Django, Postorius, and Hyperkitty requires a web server. So let's install NGINX.

{{{
apt install nginx
}}}

2. Now that Nginx is installed, we need to allow it through the UFW Firewall.

{{{
# ufw allow 'Nginx Full'
}}}

Let's verify the change.

{{{
# ufw status
}}}

{{{
Output
Status: active

To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
Nginx HTTP ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)
Nginx HTTP (v6) ALLOW Anywhere (v6)
}}}

3. Let's make sure Nginx is running.

{{{
# systemctl status nginx
}}}

{{{
Output
● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2019-07-03 12:52:54 UTC; 4min 23s ago
     Docs: man:nginx(8)
 Main PID: 3942 (nginx)
    Tasks: 3 (limit: 4719)
   Memory: 6.1M
   CGroup: /system.slice/nginx.service
           ├─3942 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
           ├─3943 nginx: worker process
           └─3944 nginx: worker process
}}}

If your output has Active: active (running) then you are good to go.

With Nginx confirmed to be running you should be able to access it via your server' IP address:

{{{
http://your_server_ipaddress
}}}

Learning how to manage the Nginx processes and setting up server blocks is beyond the scope of this How-To. However feel free to contact me if you would like for me to edit this document and add those instructions into this particular section.

== Securing Your Nginx Installation: Let's Encrypt ==

MailmanWiki: DOC/Howto_Install_Mailman3_On_Debian10 (last edited 2023-11-24 16:09:02 by msapiro)