Skip to main content
Get your Lineage 2 Chronicle 4 server up and running with this streamlined guide.

Prerequisites

Before you begin, ensure you have:
  • Java 25 JDK installed (Installation Guide)
  • MySQL 5.7+ or MariaDB 10.3+ installed
  • Apache Ant 1.8.2+ for building
  • At least 4GB RAM (16GB+ recommended)
  • 10GB free disk space

Quick Setup

1

Download and Build

Clone the repository and build the server:
# Clone the repository
git clone https://github.com/fermanzolido/L2C4.git
cd L2C4

# Build with Ant
ant
The build process creates LoginServer.jar and GameServer.jar in build/dist/libs/.
2

Set Up Database

Create the database and install the schema:
# Create MySQL database
mysql -u root -p
CREATE DATABASE l2jmobiusc4 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'l2jmobius'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON l2jmobiusc4.* TO 'l2jmobius'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Configure database connection in dist/db_installer/config/Database.ini:
Driver = com.mysql.jdbc.Driver
URL = jdbc:mysql://localhost/l2jmobiusc4
Login = l2jmobius
Password = your_password
Run the Database Installer:
cd build/dist/db_installer
java -jar DatabaseInstaller.jar
Select options:
  1. Install login and game server schemas
  2. Create tables and import base data
3

Configure Servers

Configure the LoginServer in dist/login/config/Database.ini:
URL = jdbc:mysql://localhost/l2jmobiusc4
Login = l2jmobius
Password = your_password
Configure the GameServer in dist/game/config/Database.ini:
URL = jdbc:mysql://localhost/l2jmobiusc4
Login = l2jmobius
Password = your_password
For local testing, default network settings work out of the box. For public servers, see Configuration Guide.
4

Launch Servers

Start the LoginServer first:
cd build/dist/login
./startLoginServer.sh    # Linux/Mac
# or
startLoginServer.bat     # Windows
Wait for “LoginServer is now listening on *:2106” message.Then start the GameServer:
cd build/dist/game
./startGameServer.sh     # Linux/Mac
# or
startGameServer.bat      # Windows
Wait for “GameServer is now listening on *:7777” message.
5

Create Admin Account

Connect with your Lineage 2 client and create a character.Then grant admin access via MySQL:
USE l2jmobiusc4;
UPDATE characters SET accesslevel = 100 WHERE char_name = 'YourCharName';
Restart the GameServer for changes to take effect.
Access level 100 grants full GM privileges. Use carefully!

Verify Installation

Test your server is working:
# Check if LoginServer is listening
netstat -an | grep 2106

# Expected output:
# tcp    0    0 0.0.0.0:2106    0.0.0.0:*    LISTEN
Check logs in dist/login/log/ for any errors.
# Check if GameServer is listening
netstat -an | grep 7777

# Expected output:
# tcp    0    0 0.0.0.0:7777    0.0.0.0:*    LISTEN
Check logs in dist/game/log/ for any errors.
USE l2jmobiusc4;
SELECT COUNT(*) FROM characters;
SELECT COUNT(*) FROM items;
SELECT COUNT(*) FROM npc;
All queries should return counts without errors.

Common Issues

Solution: Ensure Java 25 JDK is installed and JAVA_HOME is set correctly:
java -version    # Should show version 25
echo $JAVA_HOME  # Should point to JDK 25
Solution: Verify MySQL is running and credentials are correct:
# Test connection
mysql -u l2jmobius -p -h localhost l2jmobiusc4
Check Database.ini files match your MySQL credentials.
Solution: Check if another service is using ports 2106 or 7777:
# Linux/Mac
sudo lsof -i :2106
sudo lsof -i :7777

# Windows
netstat -ano | findstr :2106
netstat -ano | findstr :7777
Stop conflicting services or change ports in server configs.
Solution: Ensure your Lineage 2 client is configured for Chronicle 4 (protocol 656/660).Check dist/game/config/ipconfig.xml for correct server IP configuration.

Next Steps

Now that your server is running:

Explore Features

Learn about Olympiad, Seven Signs, and custom systems

Configuration

Customize rates, features, and gameplay settings

Admin Commands

Master GM commands for server management

Scripting Guide

Create custom quests and AI scripts

Performance Tips

For optimal performance:
  • Allocate sufficient JVM memory: -Xmx16g -Xms8g for medium servers
  • Use MySQL query cache and InnoDB engine
  • Enable geodata for accurate pathfinding
  • Configure thread pools in Threads.ini
  • Monitor with //serverinfo command in-game
For detailed server configuration, see the Server Setup section.

Build docs developers (and LLMs) love