monica
self hosted personal CRM system
WWW CVSWeb GITHub-
Package versionmonica-4.0.0p0
-
MaintainerAisha Tammy
Monica is a personal CRM designed to help remember everything about
friends, family and business relationships. It provides a web UI,
designed with simplicity and ease of use in mind, while allowing
users to organize and track of interactions and important events
with their contacts.
+-------------------------------------------------------------------------------
| Running ${PKGSTEM} on OpenBSD
+-------------------------------------------------------------------------------
Configuration and setup
=======================
The configuration file for monica is ${LOCALSTATEDIR}/www/monica/.env which
should be configure according to the upstream documentation at
https://github.com/monicahq/monica/blob/main/docs/installation/providers/generic.md
The initial setup should be done as follows:
# cd ${LOCALSTATEDIR}/www/monica && \
su -s /bin/ksh www -c "${MODPHP_BIN} artisan setup:production -v"
Monica sets up absolute paths during the above setup, which can cause issues
when using a web server, such as httpd(8) or nginx, which run in a chroot
inside /var/www/. To work around this issue, create a relative symlink such as:
# ln -s .. /var/www/var/www
Exposing a webserver
====================
An example nginx config is provided for reference:
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name <server-name>;
ssl_certificate /etc/ssl/monica.crt;
ssl_certificate_key /etc/ssl/private/monica.key;
rewrite .well-known/caldav /dav/ permanent;
rewrite .well-known/carddav /dav/ permanent;
rewrite .well-known/security.txt$ /security.txt permanent;
rewrite carddav/(.*) /dav/$1 permanent;
root /monica/public;
location / {
try_files $uri $uri/ /index.php$query_string;
}
location ~ ^(.*\.php)(.*)$ {
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_split_path_info ^(.*\.php)(.*)$;
fastcgi_pass unix:run/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
}
}
PHP cron jobs
=============
Monica needs to run periodic book-keeping tasks. These need to be
scheduled using cron(8), via the crontab for the www user.
$ crontab -l -u www
#
SHELL=/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
HOME=/var/www
#
#minute hour mday month wday [flags] command
* * * * * -n cd ${LOCALSTATEDIR}/www/monica && ${MODPHP_BIN} artisan schedule:run
- archivers/bzip2
- lang/php/8.1,-curl
- lang/php/8.1,-gd
- lang/php/8.1,-gmp
- lang/php/8.1,-intl
- lang/php/8.1,-mysqli
- lang/php/8.1,-pdo_mysql
- lang/php/8.1,-soap
- lang/php/8.1,-zip
- graphics/pecl-imagick,php81
- php->=8.1,<8.2:lang/php/8.1