Skip to main content

Getting started


If you want us to install minetrax for your servers or stuck in any step and need help, Feel free to join our Discord group and ask in help section or ping Xinecraft#2139. Its free. ¯\_(ツ)_

Server Requirements


The installation steps given in this docs consider you using debian based OS eg: Ubuntu 20.04. If your server is running any other OS then you might have to do slight adjustments as per need during the process. Feel free to contact us in Discord for any help.

MineTrax is designed to run on your web server of choice. It is recommended to use a VPS or Dedicated Server as hosting and not any shared hosting.

Web requires a VPS or Dedicated Server with atleast 1GB of RAM and 1 CPU. Ubuntu 20.04 is recommended.

Software Dependencies:

  • PHP 8.1+
  • MySQL 5.7+ or MariaDB 10.2.7+
  • Apache2 or Nginx
  • NodeJS 12+
  • Redis Server
  • Git
  • Composer
  • Supervisor
  • Sendmail

It is recommended to start with a fresh server to follow along. A small Virtual Server with 1 vCPU should be fine to start with. Cloud providers like DigitalOcean & Hetzner give credit upto 100$ to get started for free.

Installing Dependencies

Update operating system to make sure all existing packages are up to date:

sudo apt update && sudo apt upgrade -y


First, install the prerequisites and PPA and update.

sudo apt install software-properties-common && sudo add-apt-repository ppa:ondrej/php -y
sudo apt update

Install PHP 8.1 and all required extensions.

sudo apt -y install curl php8.1 php8.1-{cli,gd,mysql,pdo,mbstring,tokenizer,bcmath,xml,fpm,curl,zip,intl,redis}

MySQL / MariaDB


Make sure to only install one. Either MySQL or MariaDB. If installing MariaDB, make sure its version is >10.2.7.

To install MySQL run the below command in terminal.
sudo apt install mysql-server

Apache2 / Nginx


Make sure to only install one. Either Nginx or Apache2.

Install Apache2 server and php extension for it.
sudo apt install apache2 libapache2-mod-php8.1
sudo systemctl restart apache2


Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you. You'll need composer installed before continuing in this process.

curl -sS | sudo php -- --install-dir=/usr/local/bin --filename=composer


Add the Node PPA and update (here we are installing version 16, you can change if you want).

curl -sL -o /tmp/
sudo bash /tmp/

Install NodeJS from APT

sudo apt install nodejs

Redis Server, Git, Sendmail & Supervisor

sudo apt install redis-server git supervisor sendmail unzip
sudo systemctl enable --now redis-server


Cloning the codes from Github

Create a folder where the web will live and move to that folder.

mkdir -p /var/www/minetrax
cd /var/www/minetrax

Now clone the MineTrax git repo to the newly created folder and fix permissions.

git clone .
sudo chmod -R 775 storage/* bootstrap/cache/

Setup the Database

You need to create a MySQL/MariaDB database and a user with all permission to that database.

// If below command ask for password just press enter. If not work then try sudo mysql
mysql -u root -p

// Create the database
// Create the user, change 'randomStrongPassword' to any strong password of your choice.
CREATE USER 'minetrax'@'localhost' IDENTIFIED BY 'randomStrongPassword';
// Give permission of the DB to user
GRANT ALL PRIVILEGES ON minetrax.* TO 'minetrax'@'localhost' WITH GRANT OPTION;

Environment and Migration

Now that the database is up we need to go back to the minetrax folder and copy .env.example file to .env.

cd /var/www/minetrax
cp .env.example .env

Install the composer dependencies.

composer install

Now generate a new key using.

# Only run the if you are doing fresh install and don't have data in the database.
php artisan key:generate --force

Next, change the database related variables in the .env file to match your database user credentials

APP_URL= # Change this to the URL which you wanna setup minetrax on.


Migration and Seed the database, run the below command in terminal:

php artisan migrate --seed

Create symlink for storage

php artisan storage:link

It is highly recommended to copy .env file and backup it somewhere safe. It contain very important information like APP_KEY which is used to encrypt critical data before storing in database (eg: api keys and server credentials). Without that key recovering data won't be possible.

Also, always keep that key secret.

Fix permissions

Fix permissions for the web folder so webserver can access the files.

# If using Apache (not on CentOS):
chown -R $USER:www-data /var/www/minetrax/*

# or, If using Apache on CentOS
chown -R $USER:apache /var/www/minetrax/*

Setup Queue Listeners

Queue are used to run long running task like sending email, clearing stale data and importing data from servers. Queue workers in need to setup for these tasks to run.

Add the cron

Firstly, need to add the scheduler runner command to cron. Open crontab sudo crontab -e and add then following in a new line there.

* * * * * php /var/www/minetrax/artisan schedule:run >> /dev/null 2>&1

Create queue worker:

We use supervisor for running of queue worker so incase they crash supervisor will automatically restart them.

Configuration file for supervisor are stored in folder /etc/supervisor/conf.d. All supervisor conf file we create will be in there.

Default queue:

Create a new file called minetrax-worker-default.conf and put below context in there.

command=php /var/www/minetrax/artisan queue:work --sleep=3 --tries=3 --max-time=3600

Long queue:

Create a new file called minetrax-worker-long.conf and put below context in there.

command=php /var/www/minetrax/artisan queue:work --queue=longtask,default redis-longtask --timeout=0 --sleep=3 --tries=3 --max-jobs=500

Start the supervisor workers:

sudo supervisorctl reread
sudo supervisorctl update

sudo supervisorctl start minetrax-worker-default:*
sudo supervisorctl start minetrax-worker-long:*
Restart the queue

Whenever any change is made to code, queue worker don't pick them up as they are long running. To make laravel queue restart we run:

php artisan queue:restart

WebSocket setup (optional)


This step is optional but highly recommended. By default minetrax will use polling to fetch and reload data from server without reloading. (eg: every 5 seconds).

If you want your site to feel more responsive and instant or you have a large audience and want to reduce the load on your server then you should setup websocket.

In this step we are going to setup Pusher as our websocket server.

  1. Go to and create a account.
  2. In dashboard select "Channels" and then click "Create app" option to create a new app.
  3. Name your app anything you like and choose a location closest to your server location. Choose Vue.js in Frontend and Laravel in Backend dropdowns.
  4. Click Create App.
  5. Now go to App Keys section and note down the app_id, key, secret and cluster variables. Eg:
app_id = "1367909";
key = "4b48b850682acb371c34";
secret = "41cc8be68c0d57fea4f3";
cluster = "ap2";

After this open your .env file and replace the pusher related credentials to match above.


Also change broadcast driver to pusher.


Next, restart the queue workers:

cd /var/www/minetrax
php artisan queue:restart
pusher alternatives

Pusher provide 200k messages per day in free tier, which is more than enough for most cases, but if you have a very large userbase that might not be enough. In that case please check Websocket Options page to learn how to setup Pusher alternatives.

It is recommended to go for alternatives only after giving Pusher a try and its limit runs out.

Web Server Configuration

Finally lets setup the web server to access the web. Make sure your domain name is pointing to the IP address of the VPS/Dedicated server in which we are setting up the web. To do that you need to create an A record for your domain to the webserver IP from your domain DNS Provider.


Follow either Nginx or Apache2 steps as per your installation.

Apache2 Setup

First, Create a new file with any name(eg: minetrax.conf) in the Apache2 sites directory /etc/apache2/sites-available with context provided below replacing highlighted section as per your installation.

sudo nano /etc/apache2/sites-available/minetrax.conf
<VirtualHost *:80>
DocumentRoot "/var/www/minetrax/public"

AllowEncodedSlashes On

<Directory "/var/www/minetrax/public">
AllowOverride all
Require all granted

Next, enable rewrite mod & the site, and finally restart apache2 to reflect the changes.

sudo a2enmod rewrite
sudo a2ensite minetrax.conf

sudo systemctl restart apache2

You should disable default site /etc/apache2/sites-enabled/000-default.conf.

sudo a2dissite 000-default.conf
sudo systemctl restart apache2


Now minetrax should be up and running on your domain

A SuperAdmin user is created already for you, you can login and change the password:

Username: superadmin
Password: admin123

It is very important that you change the password & email of the superadmin user after logging in.

You can change password from Edit Profile section and email from Admin > Users section

After checking your site is up and running, make sure to change APP_ENV=production and APP_DEBUG=false in the .env file.


It is very important that you change your APP_ENV to production and APP_DEBUG to false in the .env file when you are done testing and setting up the site.

Keeping APP_ENV to local or APP_DEBUG to true might expose sensitive information to end users.

What's Next?

Now you are all set to go, you can start using minetrax and add your servers to it.

  1. Add your First Minecraft Server to Web
  2. Install Plugin on your Minecraft Server