The jwtplus.yaml
file is the core configuration file for JWTPlus, defining how the service operates, where it listens for connections, and how it interacts with the database. This guide explains each section of the configuration file and provides best practices for setting it up.
The jwtplus.yaml
file should be stored in one of the following locations:
/opt/jwtplus/jwtplus.yaml
/etc/jwtplus/jwtplus.yaml
Below is a breakdown of the default jwtplus.yaml file:
debug: false
server:
ip: 127.0.0.1
port: 2025
domain: example.com
db:
location: 0.0.0.0
port: 3306
username: jwtengine
password: 123456
dbname: jwtengine
debug: false
true
for verbose logging, useful for debugging.false
in production for security and performance.server:
ip: 0.0.0.0
port: 2025
domain: example.com
ip
& port
: Defines where JWTPlus listens for incoming requests.domain
: If specified, JWTPlus automatically provisions an SSL certificate using Let's Encrypt.Important Considerations for Domain Usage
domain
is provided, the ip
& port
field should not be written.domain
is set, JWTPlus runs on the specified ip
and port
without SSL.db:
location: 127.0.0.1
port: 3306
username: jwtengine
password: 123456
dbname: jwtengine
location
: The database server address, typically 127.0.0.1 for local installations.port
: The database port, default is 3306 for MySQL/MariaDB.username
& password
: Credentials for the JWTPlus database user.dbname
: The name of the JWTPlus database.Security Tip: Avoid using weak passwords like 123456. Instead, generate a strong password and store it securely.
jwtplus.yaml
file is correctly formatted in YAML syntax.domain
, ensure that the DNS is configured before running JWTPlus./opt/jwtplus/
or /etc/jwtplus/
folder for proper service recognition.