Server Setup

This guide provides instructions for setting up Mission Donor Manager daemon on a Debian 12 host.

Install Dependancies

Open a terminal

su
apt-get install git qtbase5-dev qtbase5-private-dev libqt5websockets5-dev build-essential libssl-dev libcrypto++-dev libpoco-dev
exit

Build and Install QtCipherSqlitePlugin

Mission Donor Manager daemon requires QtCipherSqlitePlugin installed on the host. This is not packaged in Debian as of writing this, so it must be compiled.

cd /tmp
git clone https://github.com/devbean/QtCipherSqlitePlugin.git
mkdir build_cipher
cd build_cipher
qmake ../QtCipherSqlitePlugin/sqlitecipher/sqlitecipher.pro
make
cd plugins/sqldrivers/
su
cp libsqlitecipher.so /usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers/
exit
cd ../../../../

Optionally delete build dir

rm -rf build_cipher

Optionally delete QtCipherSqlitePlugin source code dir

rm -rf QtCipherSqlitePlugin.git

Build and Install Mission Donor Manager Daemon

git clone https://gitlab.com/craftsmanshipsoftware/mission-donor-manager.git
cd mission-donor-manager
git submodule update --init --recursive
cd ../
mkdir build
cd build
qmake ../mission-donor-manager/daemon
make
su
cp mission-dm-daemon /usr/bin/
exit
cd ../

Optionally delete build dir

rm -rf build

Optionally delete Mission Donor Manager source code dir

rm -rf mission-donor-manager

Create a user to run the deamon under

User name mdm is used in this example, you can make it something else if desired.

su
/sbin/adduser mdm
exit

Just hit enter for the questions

Generate RSA Key and Certificate

Switch to mdm user

su mdm
cd ~

Start Mission Donor Manager Daemon breifly to create config dir. You must choose the port you want the daemon to run on. The example uses 11022. This will create a config dir in /home/mdm/.config/mission-dm-daemon/11022/ The database will eventually be put in this dir as well. Run the command below and then press Ctrl+c

mission-dm-daemon -p 11022 -platform offscreen

cd to the Mission Donor Manager config dir for 11022 instance

cd .config/mission-dm-daemon/11022/

Create the RSA key and Certificate (command below makes a 10 year certificate)

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650 -nodes

Enter your country code and press enter
Enter your state or province and press enter
Enter your city and press enter
Enter the name of you organization and press enter
Enter Mission Donor Manager
Enter the url of the server
Enter an email address (example, donor relations)

Start Daemon on boot

mission-dm-daemon should not be run as root. Ideally create a user just for it. Login as the user for mission-dm-daemon. In that users home directory under .config/systemd/user/ create a systemd user service file with the contents below. This example will use a file called mdm-daemon.service and a user called mdm-11022.

[Unit]
Description=Mission Donor Manager Service
After=default.target

[Service]
ExecStart=/usr/bin/mission-dm-daemon -p 11022 -d /home/mdm-11022/ -platform offscreen

[Install]
WantedBy=default.target

Enable the service to start when the user logs in

systemctl --user enable mdm-11011.service

Start mdm-11022 enabled services on boot - this must be run as root

loginctl enable-linger mdm-11022
exit

Open port in Firewall