Automated Installation Guide for JWTPlus

Setting up JWTPlus is now easier than ever with our automated installation scripts. Whether you're using a Debian-based OS, an RPM-based OS, or Alpine Linux, these scripts will handle the installation, configure the database, and set up JWTPlus as a system service.

What the Script Does

  • Updates the system packages
  • Installs necessary dependencies (MariaDB, UFW, wget, etc.)
  • Configures a secure MariaDB database for JWTPlus
  • Downloads and installs the latest JWTPlus binary
  • Generates a secure jwtplus.yaml configuration file
  • Sets up JWTPlus as a system service for automatic startup
  • Enables necessary firewall rules for secure access

Kickstart the installation

Before proceeding, ensure your system meets the JWTPlus system requirements.

For Deb based OS: Execute the below script from root user which will kickstart the installation process.

curl -s https://jwtplus.com/scripts/deb.sh | bash

For RPM based OS: Execute the below script from root user which will kickstart the installation process.

curl -s https://jwtplus.com/scripts/rpm.sh | bash

For Alpine OS: Execute the below script from root user which will kickstart the installation process.

curl -s https://jwtplus.com/scripts/alpine.sh | bash

Setting Up CRON for Automated Maintenance

To ensure JWTPlus runs efficiently, you should add two CRON jobs that execute every minute:

Open the CRON editor:

crontab -e

Add the following lines at the end of the file:

* * * * * /opt/jwtplus/jwtplus clean
* * * * * /opt/jwtplus/jwtplus rotate

Save and exit.

This ensures that expired tokens are regularly removed, and JWTPlus automatically rotates keys when the time arises.

Once the installation is complete, you can retrieve important details:

  • JWTPlus Root Key: Located in /root/root-key.txt
  • Database Credentials: Stored in /root/database.txt
  • JWTPlus Config file: Stored in /opt/jwtplus/jwtplus.yaml