Ubuntu 20.04

This guide assumes that you already have SSH (console) access to a clean Ubuntu installation. If you do not already have a server, check out the recommended server specs.

Steps summary:

You will learn how to setup the LAMP stack and how to install userTrack.

LAMP Setup

Run each of those commands to install, in order: Apache, PHP, MariaDB sudo apt install apache2

sudo apt install apache2
sudo apt install php libapache2-mod-php
sudo apt install mariadb-server
sudo apt-get install php-mysql

Basic Security

Use those commands to enable firewall (ufw) and improve the default MySQL security.

Those steps are optional, but recommended. Follow the prompts whenever necessary.

sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https
sudo ufw enable
sudo mysql_secure_installation

Installing userTrack

Replace YOUR_ROOT_DATABASE_PASSWORD with the password chosen when you ran mysql_secure_installation.

cd /var/www/html
curl -Lo userTrack.zip https://www.usertrack.net/trial-download
apt install unzip
unzip userTrack.zip
rm userTrack.zip
mv userTrack/* userTrack/.* .
find . -type d -exec chmod 0777 {} +
find . -type f -exec chmod 0666 {} +
rm userTrack -r
ust_rootp=YOUR_ROOT_DATABASE_PASSWORD
ust_db=userTrack
ust_user=userTrack
ust_password="$(openssl rand -base64 12)"
mysql -u root -p"$ust_rootp" -e "CREATE DATABASE $ust_db /*\!40100 DEFAULT CHARACTER SET utf8 */;"
mysql -u root -p"$ust_rootp" -e "CREATE USER [email protected]'%' IDENTIFIED BY \"$ust_password\";"
mysql -u root -p"$ust_rootp" -e "GRANT ALL PRIVILEGES ON $ust_db.* TO [email protected]'%';FLUSH PRIVILEGES;"
sed -i "s*password = ''*password = '$ust_password'*" server/dbconfig.php
sed -i "s*username = 'root'*username = '$ust_user'*" server/dbconfig.php
sed -i "s*db_name = 'usertrack'*db_name = '$ust_db'*" server/dbconfig.php
sed -i "s*host = '127.0.0.1'*host = '$ust_host'*" server/dbconfig.php
apt-get install php-zip -y
a2enmod headers rewrite
systemctl restart apache2

Adding your domain name

Install certbot

Certbot is used to generate a free Let's Encrypt certificate and manage its auto-renewal.

sudo apt update
sudo apt install snapd -y
sudo snap install snap-store
sudo snap install --classic certbot

To set your own domain name for this dashboard, see this adding your domain name section.