FeministWiki:Server setup: Difference between revisions

No edit summary
No edit summary
 
Line 146: Line 146:
     mariadb-server \
     mariadb-server \
     nginx-extras \
     nginx-extras \
    opendkim \
    opendmarc \
     postfix \
     postfix \
     postfix-ldap \
     postfix-ldap \
    rspamd \
     slapd
     slapd


Line 157: Line 156:


  apt-get install ejabberd/$(lsb_release -sc)-backports # e.g. ejabberd/bookworm-backports
  apt-get install ejabberd/$(lsb_release -sc)-backports # e.g. ejabberd/bookworm-backports
=== Make sure Postfix can connect to OpenDKIM & OpenDMARC ===
Postfix's SMTPD daemon runs in a chroot in {{C|/var/spool/postfix}}, so the configuration of OpenDKIM and OpenDMARC arrange for their respective Unix sockets to be created in subdirectories therein; we must ensure that these exist and have the correct permissions:
mkdir -p /var/spool/postfix/opendkim
mkdir -p /var/spool/postfix/opendmarc
chown opendkim:opendkim /var/spool/postfix/opendkim
chown opendmarc:opendmarc /var/spool/postfix/opendmarc
adduser postfix opendkim
adduser postfix opendmarc


=== Install PHP and modules ===
=== Install PHP and modules ===
Line 204: Line 192:
  dpkg -L php-luasandbox
  dpkg -L php-luasandbox


=== Copy over certificates ===
=== Copy over certificates and DKIM key ===


Copy over the certs from the old server:
Copy over the certs from the old server:


  # Run on old server
  # Run on old server
  rsync -avz /etc/feministwiki/certs feministwiki.dev:/etc/feministwiki/certs
  rsync -avz /etc/feministwiki/certs feministwiki.dev:/etc/feministwiki


The {{C|/etc/feministwiki/certs}} directory and its contents should be owned by the group {{C|ssl-cert}}.  Make sure this is the case on the new server after running the command above, since the group ID might be different on the new server.  If the group doesn't exist at all, just create it.
The {{C|/etc/feministwiki/certs}} directory and its contents should be owned by the group {{C|ssl-cert}}.  Make sure this is the case on the new server after running the command above, since the group ID might be different on the new server.  If the group doesn't exist at all, just create it.
Line 225: Line 213:
  # Run on old server
  # Run on old server
  rsync -avz /etc/letsencrypt/{archive,live} feministwiki.dev:/etc/letsencrypt
  rsync -avz /etc/letsencrypt/{archive,live} feministwiki.dev:/etc/letsencrypt
Finally, copy over the DKIM signing key:
rsync -avz /etc/feministwiki/dkim.key feministwiki.dev:/etc/feministwiki
This file must be owned by the {{C|_rspamd}} user and not readable by anyone else.


=== Put config files in place ===
=== Put config files in place ===
Line 549: Line 543:
  systemctl stop inspircd
  systemctl stop inspircd
  systemctl stop nginx
  systemctl stop nginx
systemctl stop opendkim
  systemctl stop postfix
  systemctl stop postfix
systemctl stop rspamd
  systemctl stop slapd
  systemctl stop slapd


Line 574: Line 568:
  systemctl stop inspircd
  systemctl stop inspircd
  systemctl stop nginx
  systemctl stop nginx
systemctl stop opendkim
  systemctl stop postfix
  systemctl stop postfix
systemctl stop rspamd
  systemctl stop slapd
  systemctl stop slapd