Skip to main content

Install the Database

Get L2J CLI

L2J CLI is a tool that allows us to implement automated deployments and initial configurations.

mkdir C:\opt\l2j\cli
cd C:\opt\l2j\cli
curl -o l2jcli.zip -L https://l2jserver.com/api/download/cli/latest
tar -xf l2jcli.zip

Configure the CLI

Inside the folder config edit both files login-server.properties and game-server.properties and configure DatabaseUser and DatabasePassword accordingly to the user and password that has been configured for the database.

Execute the CLI

Run l2jcli.bat and run the following commands:

l2jcli.bat
db install -sql C:\opt\l2j\server\login\sql -u l2j -p l2jserver2019 -m FULL -t LOGIN -c -mods
db install -sql C:\opt\l2j\server\game\sql -u l2j -p l2jserver2019 -m FULL -t GAME -c -mods

The parameters are:

ParameterDescription
-sql pathPath to SQL files
-u userDatabase user
-p passwordDatabase password
-m modeInstallation mode FULL or UPDATE
-t typeServer type LOGIN or GAME
-cInstall custom tables
-modsInstall mods tables

Create Administrator Account

Use the L2J CLI to create an administrator account, 8 is the maximum account level (master):

account create -u Zoey76 -p -a 8
quit