apt install postgresql postgresql-contrib
Schönes Passwort erstellen
pwgen 20
Dann Passwort für Nutzer listmonk verwenden:
passwd postgres
Datenbank erstellen, dazu in die Datenbankanwendung psql wechseln:
sudo -u postgres psql
create user listmonk with password 'einanderespasswortauspwgen';
CREATE DATABASE listmonk;
GRANT ALL PRIVILEGES ON DATABASE listmonk TO listmonk;
Jetzt wieder raus aus psql.
Nutzer anlegen
adduser --system --group --shell="/sbin/nologin" --home="/var/lib/listmonk" listmonk
Listmonk herunterladen
wget https://github.com/knadh/listmonk/releases/download/hier_aktuelle_release_eintragen
Software entpacken
tar xzf datei.tar.gz
Listmonk installieren
install -v listmonk /usr/local/bin/
Config dir anlegen
mkdir /etc/listmonk
https://gorbe.io/posts/listmonk/install/
560 nano config.toml
561 listmonk --install
562 chown -R listmonk:listmonk /etc/listmonk/
563 nano /usr/lib/systemd/system/listmonk.service
564 systemctl daemon-reload
565 systemctl enable --now listmonk.service
566 systemctl status listmonk.service
567 cd ../nginx/sites-available/
568 ls -la
569 nano webmail
570 nano listmonk
571 certbot certonly -d list.hardwarepunk.de
572 systemctl stop nginx.service
573 certbot certonly -d list.hardwarepunk.de
574 systemctl start nginx.service
575 cd ../
576 cd sites-enabled/
577 ln -s ../sites-available/listmonk
578 ls -la
579 systemctl restart nginx.service
Nginx config
server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name list.domain.tld;
ssl_certificate /etc/letsencrypt/live/list.domain.tld/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/list.domain.tld/privkey.pem;
add_header Strict-Transport-Security max-age=15768000;
location / {
proxy_pass http://localhost:9000/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
if ($ssl_protocol = "") {
return 301 https://$server_name$request_uri;
}
}