howTo

Citadel Let's Encrypt certificate authority setup

Signed TLS certificates are now available at no cost from the nonprofit Let’s Encrypt Certificate Authority. To use these on a Citadel system, you will need the Certbot utility installed. export CIT_DOMAIN_NAME=mail.example.net certbot certonly --agree-tos --non-interactive --text --rsa-key-size 4096 \ --email admin@${CIT_DOMAIN_NAME} \ --webroot --webroot-path /usr/local/webcit \ --domains ${CIT_DOMAIN_NAME} cp /etc/letsencrypt/live/${CIT_DOMAIN_NAME}/privkey.pem /usr/local/citadel/keys/citadel.key cp /etc/letsencrypt/live/${CIT_DOMAIN_NAME}/fullchain.pem /usr/local/citadel/keys/citadel.cer Now create these two files. cat /etc/letsencrypt/renewal-hooks/pre/citadel.sh #!/bin/sh docker stop citadel # cat /etc/letsencrypt/renewal-hooks/post/citadel.

Citadel QnA & Tricks

Some of the tricks one picks up over time in the support forum. Q&A How did you change the Lobby /dotskip?room=BASEROOM to wiki?page=home? webcit has a “-g” flag that will enter its value as the first command sent to it. (The container has a similar flag that will pass it along to webcit.) So you can do something like webcit [other commands] -g "/dotgoto?room=Welcome" You can put anything in there you want.

Change Citadel Domain

We will use mail as hostname, mail.example.net as our original domain, and mail.example.com as our new domain; and 203.0.113.1 as our public facing IP address on this page for the citadel server. Replace with your own. Pre-Install Before you start set your DNS to point your domain to the servers IP. How to do that is out of this manuals scope. Next we will set some variables, replace with your domain and IP address then execute following in your servers shell.

Citadel Docker

We will use mail as hostname, mail.example.net as our domain, and 203.0.113.1 as our public facing IP address on this page for the citadel server. Replace with your own. Pre-Install Before you start set your DNS to point your domain to the servers IP. How to do that is out of this manuals scope. Make sure docker is installed already. Installation of docker is a prerequisite that is out of scope of this documentation.

Lighttpd Webserver for Citadel

Lighttpd is a free and open-source web server, designed for speed, efficiency, and flexibility. This tutorial is designed to work hand in glove with our citadel docker installation tutorial. We will install this on Void Linux but besides the lighttpd installation, everything should work on any NIX. Void Linux Installation xbps-install -Suv xbps-install -S lighttpd configuration file location /etc/lighttpd/lighttpd.conf Check that your configuration is ok: lighttpd -tt -f /etc/lighttpd/lighttpd.

msmtp

/etc/msmtprc defaults maildomain example.net syslog LOG_MAIL aliases /etc/aliases account default host mail.example.net port 587 from srv7@example.net auth on user user@example.net password ******** tls on tls_starttls on #tls_certcheck off tls_fingerprint DB:A0:2A:07:00:F9:E3:23:7D:07:E7:52:3C:95:9D:E6:7E:12:54:3F You may need a manual for a tls fingerprint Your alias file # /etc/aliases default: me@example.net A php script to send mail #!/usr/bin/php <?php define('TAB',"\t"); $user = $_SERVER['LOGNAME']; $host = exec("hostname -f"); $from = $user.'@'.$host; $to = 'sweety@example.net'; $subject = 'Testing msmtp'; $message = 'hello from '.

Send mail with sendmail

#!/bin/bash SENDMAIL=/usr/sbin/sendmail RECIPIENT=tosomeone@example.com FROM=me@example.com cat <<EOF | $SENDMAIL -t ${RECIPIENT} From: ${FROM} To: ${RECIPIENT} Subject: testmail some test text as body of the email. EOF

Git Alias

Git Alias: I thought this deserves it’s own little page. Following will create an alias for git add, commit, and push git config alias.acp '! acp() { git add . && git commit -m \"$1\" && git push ; } ; acp' Use it like this: git acp "your commit message" Depending on your setup, you may also want to add git pull before you git add, but I am sure you can figure out how to do that.

Git Howto

Git Setup There is now a manual in the git book that is better. 4.4 Git on the Server - Setting Up the Server Remote Server Go to your web root directory cd /var/www/ identify your self to git git config --global user.name "Your Name" git config --global user.email "alias@example.com" Create git git init Create a live branch git branch live Make the live branch active git checkout live Local Go to your working directory

UTF-8 Character List

Common: “ ” ‘ ’ – — … ‐ ‒ ° © ® ™ • ½ ¼ ¾ ⅓ ⅔ † ‡ µ ¢ £ € « » ♠ ♣ ♥ ♦ ¿ � Math: - × ÷ ± ∞ π ∅ ≤ ≥ ≠ ≈ ∧ ∨ ∩ ∪ ∈ ∀ ∃ ∄ ∑ ∏ ← ↑ → ↓ ↔ ↕ ↖ ↗ ↘ ↙ ↺ ↻ ⇒ ⇔