Skip to main content

System Requirements

Before installing L2J Mobius Chronicle 4, ensure your system meets the following requirements:

Hardware Requirements

  • CPU: Multi-core processor (4+ cores recommended)
  • RAM: Minimum 4GB (16GB+ recommended for production)
  • Storage: 10GB+ free disk space
  • Network: Stable internet connection with static IP (for public servers)

Software Requirements

Java 25 is required for L2J Mobius Chronicle 4. Earlier versions will not work.
  • Java Development Kit (JDK) 25
  • Apache Ant 1.8.2+ (for building from source)
  • MySQL 5.7+ or MariaDB 10.3+
  • Operating System: Linux (recommended), Windows, or macOS

Installing Java 25

# Download and install OpenJDK 25
wget https://download.oracle.com/java/25/latest/jdk-25_linux-x64_bin.tar.gz
tar -xzf jdk-25_linux-x64_bin.tar.gz
sudo mv jdk-25 /opt/

# Set environment variables
export JAVA_HOME=/opt/jdk-25
export PATH=$JAVA_HOME/bin:$PATH

# Add to .bashrc or .profile for persistence
echo 'export JAVA_HOME=/opt/jdk-25' >> ~/.bashrc
echo 'export PATH=$JAVA_HOME/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

# Verify installation
java -version

Installing Apache Ant

sudo apt-get update
sudo apt-get install ant

# Verify installation
ant -version

Build Process

1

Clone or Download Source

Download the L2J Mobius Chronicle 4 source code to your server:
cd /opt
git clone <repository-url> l2jmobius-c4
cd l2jmobius-c4
The source directory contains the build.xml file which defines the build process.
2

Build with Ant

The build process compiles the source code and creates JAR files for the LoginServer, GameServer, and DatabaseInstaller.
# Run the build from the source directory
ant
The build process performs the following steps:
  • Validates Java 25 is installed
  • Compiles Java source code from java/ directory
  • Creates JAR files in ../build/dist/libs/:
    • LoginServer.jar
    • GameServer.jar
    • DatabaseInstaller.jar
  • Packages everything into L2J_Mobius_C4_ScionsOfDestiny.zip
The build.xml file at ~/workspace/source/build.xml:55 explicitly checks for Java 25:
<fail unless="JDK25.present" message="Java 25 is required..." />
3

Verify Build Output

After successful build, verify the JAR files were created:
ls -lh ../build/dist/libs/
You should see:
GameServer.jar
LoginServer.jar
../build/dist/db_installer/DatabaseInstaller.jar
4

Deploy Distribution Files

The compiled server is ready in the dist/ directory:
# Distribution structure
dist/
├── game/          # GameServer files
├── login/         # LoginServer files
├── db_installer/  # Database installation tool
├── libs/          # Required JAR libraries
└── backup/        # Database backups location
Copy or extract the distribution to your deployment location:
# Option 1: Use the existing dist folder
cd dist

# Option 2: Extract the built zip
unzip ../build/L2J_Mobius_C4_ScionsOfDestiny.zip -d /opt/l2j-server
cd /opt/l2j-server

Directory Structure

After installation, your server directory structure will be:
l2j-server/
├── game/
│   ├── config/           # GameServer configuration files
│   ├── data/            # Game data (XML files)
│   ├── log/             # Server logs
│   ├── GameServer.sh    # Linux startup script
│   ├── GameServerTask.sh
│   └── java.cfg         # JVM settings
├── login/
│   ├── config/          # LoginServer configuration files
│   ├── log/            # Login server logs
│   ├── LoginServer.sh   # Linux startup script
│   ├── LoginServerTask.sh
│   ├── GameServerRegister.sh
│   └── java.cfg        # JVM settings
├── db_installer/
│   ├── sql/            # Database schemas
│   └── DatabaseInstaller.sh
├── libs/               # JAR libraries
└── backup/            # Database backup storage

JVM Configuration

The server uses configuration files to set JVM parameters:
-server -Dfile.encoding=UTF-8
-Djava.util.logging.manager=org.l2jmobius.log.ServerLogManager
-Dorg.slf4j.simpleLogger.log.com.zaxxer.hikari=warn
-XX:+UseZGC
-Xmx32g      # Maximum heap: 32GB (adjust for your system)
-Xms16g      # Initial heap: 16GB
Adjust -Xmx and -Xms values based on your available system RAM. The GameServer requires significantly more memory than the LoginServer.

Next Steps

After successful installation:
  1. Set up the database
  2. Configure the LoginServer
  3. Configure the GameServer
  4. Review configuration files

Build docs developers (and LLMs) love