Deploying pimentaCHAT Server Binaries on a FreeBSD system

Note: This deployment method is not officially supported by pimentaCHAT, you might need to build your own or find a community version of the tar file.

This is the recommended production deployment method on and is based on the excellent Meteor Universal fork by Tom Freudenberg.

As root:

# pkg install bash git GraphicsMagick mongodb python scons gmake
# sysrc mongod_enable=YES
# service mongod start
# pw groupadd pimentachat
# pw useradd pimentachat -g pimentachat -s /usr/local/bin/bash -m
# su -l pimentachat

As user running pimentaCHAT:

$ git clone --depth 1 -b release-1.2.1-universal https://github.com/4commerce-technologies-AG/meteor
$ cd meteor
$ ./meteor --version
$ cd $HOME
$ tar xf pimenta.chat-freebsd-develop.tgz
$ cd $HOME/bundle/programs/server
$ $HOME/meteor/dev_bundle/bin/npm install
$ cd $HOME/bundle
$ export MONGO_URL=mongodb://localhost:27017/pimentachat
$ export Accounts_UseDNSDomainCheck=false
$ export ROOT_URL=http://your.host:3000
$ export PORT=3000
$ export ADMIN_PASS=supersecret
$ export ADMIN_USER=admin
$ $HOME/meteor/dev_bundle/bin/node $HOME/bundle/main.js

A very crude startup file for the server, (very ugly, does not fork, don’t set pimentachat_enable=YES):


# PROVIDE: pimentachat
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
# pimentachat_enable (bool): Set to "NO" by default.
# pimentachat_env (str): List of environment variables passed to pimentachat

. /etc/rc.subr


load_rc_config $name

: ${pimentachat_enable="NO"}
: ${pimentachat_env="MONGO_URL=mongodb://localhost:27017/pimentachat PORT=3000"}
: ${pimentachat_user="pimentachat"}
: ${pimentachat_group="pimentachat"}


run_rc_command "$1"