Server Installation Guide

AtomJump Messaging Server

Installation Guide

Requirements

  • PHP. This software has been fully tested on PHP 5.3, 5.5, 7.0, 7.1, 7.2, 7.4 (with php-curl, php-mbstring, php-zip, php-xml support added). Note: Preliminary tests have been carried out with PHP 8.0 and 8.1, and most features appear to work, but we cannot yet guarantee 100% compatibility, although this will come in time.
  • MySQL 5+
  • Apache 2
  • Linux server (though a Windows server may be partially functional)

Recommended pre-installation steps

Modify the upload size in both Apache php.ini and command-line php.ini (found in e.g. /etc/php/7.4/apache2/php.ini, and /etc/php/7.4/cli/php.ini)

upload_max_filesize = 10M
post_max_size = 13M
max_execution_time = 200
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED

Then

sudo service apache2 reload

Imagemagick can be used to handle image uploads (Ubuntu command):

sudo apt-get install imagemagick

To keep timing in-sync (Ubuntu command):

sudo apt-get install ntp

MySQL >= 5.7 users: add this ‘SQL mode’ into your my.cnf MySQL configuration file (found in e.g. /etc/mysql/mysql.conf.d/mysqld.cnf)

sql_mode = STRICT_TRANS_TABLES

and restart the MySQL server with

sudo service mysql restart

For live video and audio recordings, you are ideally on an “https” server (the camera feature will work on an http server, but audio and video need it).
You will need to install ffmpg (Ubuntu command):

sudo apt-get install ffmpeg

You should also update your config.json, ‘recording.supported’ to ‘true’.
(Note: this is a fairly large installation, approx 250MB, but you can install AtomJump without having this live recording capability)


Optional Components

  • Multi-server MySQL clusters (single-write or multi-write)
  • Load balancers with haproxy
  • SSL messaging server
  • SSL database connection

Installation

On your Linux server, download and unzip the latest release of the loop-server from https://src.atomjump.com/atomjump/loop-server/releases

https://src.atomjump.com/atomjump/loop-server/releases

Or git clone

git clone https://git.atomjump.com/loop-server.git

Or using composer https://getcomposer.org/ see https://packagist.org/packages/atomjump/loop-server

composer require atomjump/loop-server

We will refer to paths as being from the root of the loop-server folder.

  1. /server folder. You can refer to some example server configuration files. Replace “atomjump” with your own domain, and put any relevant files into your Apache ‘sites available’ setup. You will likely need to restart Apache.
  2. /config/configORIGINAL.json. Copy this file to /config/config.json. Replace the options with your own accounts and paths (see the Server Options page for a description of each field). Copy /config/messagesORIGINAL.json to /config/messages.json. Replace these options with your own words or languages.
  3. Allow image uploads, and image caching by the browser within /images/im
a2enmod expires     [optional, and may already be enabled]
chmod 777 /images/im
sudo service apache2 restart
  1. Copy /SET_AS_htaccess to /.htaccess and replace “atomjump.com” with your own domain in this file. You will likely need to enable the Rewrite module with
a2enmod rewrite
sudo service apache2 restart
  1. Customer defined themes must be on a secure server if the server is on ssl.
  2. To the ajFeedback object in your index.html, add a parameter
 "server": "http://yourserver.com"
      1. In a MySQL prompt, run ‘create database atomjump’. Then from the command line:
 mysql -u youruser -p atomjump < db/atomjump-loop-shell.sql

Optional Installation

Add 4 cron tasks to your server:

      • A typing cleanup task. On rare instances, a ‘typing…’ message is left (if the machine cut out etc.). This cleans up any of these old messages periodically (every 5 minutes).
      • A system monitoring warning, that checks whether the server’s CPU or disk space have gone over a threshold. See warningDiskUsage, warningCPUUsage in the “Server Options” section, for more details.
sudo crontab -e  
*/5 * * * *	/usr/bin/php /yourserverpath/typing-cron.php 
*/5 * * * *     /usr/bin/php /yourserverpath/monitor.php  
      • A sentiment analysis task. This sentiment is reflected when you download a spreadsheet of the messages. It requires nodejs to be installed and available to be run by a cron job.

On your internet server, first install NodeJS and npm. See Ubuntu install notes at https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server, but there are several ways to do this depending on your platform e.g. MacOSX may vary slightly.

cd /yourserverpath/node  
npm install  
sudo crontab -e  
 */1 * * * * /usr/bin/nodejs /yourserverpath/node/sentiment.js -production  

This will update the production database message sentiments once every minute (or remove the -production to go to staging).

    • An embedded video conference connector updater. This keeps your AtomJump Messaging Server in-sync with the embedded Jitsi video conferencing, automatically
sudo crontab -e
0 * * * * /usr/bin/php /yourserverpath/get-latest-vid-js.php

Windows installation

Running on Windows has currently not been tested, but you can use a Ubuntu 14.04 virtual machine from https://bitnami.com/stack/lamp/virtual-machine


Once this is installed…

Please see the server user guide to configure the server correctly.


License

This software is open source under the MIT license. Copyright is with the AtomJump Foundation (New Zealand), a non-profit society. You can use this software for any commercial purposes.