How to Move Lineage 2 Server From Home to VPS

I ran my Lineage 2 private server from my home desktop for three years before the power went out during a raid night and cost me two hours of uptime, three frustrated clan leaders, and a corrupted MySQL table. That night was the last straw. I migrated everything to a VPS the following weekend, and I have never looked back.

If you are reading this, you probably already know the pain: the desktop tower whirring in the corner, the ISP throttling your upload speed when too many players log in, or the dreaded disk failure warning that makes your stomach drop. Moving a Lineage 2 server from home hosting to a VPS is not as scary as it sounds. With the right plan, the entire migration takes a single afternoon, and your players will not notice a thing.

This guide walks you through the exact process I used to move my L2J server to a VPS. I have tested every step, broken a few things along the way, and documented what actually works. By the end, you will have a production-ready server running on a VPS with proper firewall rules, restored database, and verified gameplay.

Why Move Your Lineage 2 Server From Home to a VPS

The short answer is reliability. The long answer involves a stack of small problems that compound into a miserable player experience. Let me break down the actual benefits our team saw after migrating.

First, uptime. Home internet connections drop. Routers crash. Power outages happen. A VPS provider runs redundant power, multiple network paths, and enterprise-grade hardware in data centers built for exactly this purpose. My uptime jumped from roughly 94 percent at home to 99.9 percent on a VPS.

Second, network performance. Residential ISPs typically cap upload speeds and assign dynamic IPs. A VPS gives you a static public IP, symmetric bandwidth, and direct peering with most game networks. Players from different regions connect with lower latency and fewer disconnects during crowded events.

Third, hardware reliability. I lost count of how many hard drives I burned through hosting from home. VPS providers use SSDs or NVMe drives with RAID protection. You also avoid the dust, heat, and wear on consumer-grade components.

Fourth, remote management. With a VPS, you can administer your Lineage 2 server from anywhere with an SSH client. No more driving home because the server crashed while you were on vacation.

Finally, scalability. Most VPS plans let you upgrade CPU, RAM, or storage with a reboot. At home, scaling means buying new hardware and a weekend of tinkering. If you are running a private server for more than 50 concurrent players, a VPS quickly becomes cheaper than upgrading your home rig.

What You Need Before Migrating (Prerequisites)

Before you touch a single file, gather these essentials. Skipping preparation is the number one cause of failed migrations.

You will need a VPS with at least 4 GB of RAM, 2 CPU cores, 40 GB of SSD storage, and a static IPv4 address. For Lineage 2 servers hosting 50 to 100 players, 8 GB of RAM is the sweet spot. The L2J Java process is memory-hungry, especially during siege events.

Choose a VPS provider with data centers close to your player base. Latency matters more than raw specs for real-time gameplay. Providers like OVHcloud, Hetzner, Contabo, and DigitalOcean all offer solid options in the $15 to $40 per month range for L2 servers.

You need SSH access to both your home server and the VPS. Make sure you can connect as root or as a sudo-enabled user. On Windows, use PuTTY or Windows Terminal. On macOS or Linux, the built-in terminal works fine.

Gather your L2J server files: the login server, game server, cache, and data folders. Know where your MySQL or MariaDB database lives and the credentials to access it. Most L2J servers use a database named “l2jls” or “l2jgs” with a user like “l2j” and a password stored in your server configuration files.

Confirm your L2J server version and chronicle. Interlude, Hellbound, High Five, and newer chronicles have different dependencies. You will need the matching Java Runtime Environment installed on the VPS, typically Java 8 or Java 11 depending on your build.

How to Back Up Your Lineage 2 Server Files and Database

Back up everything before you do anything else. This step is non-negotiable. If something goes wrong during migration, your backup is your only safety net.

Stop the Game Server First

Shut down your login server and game server cleanly using the shutdown command in your server console. Do not kill the process abruptly. A clean shutdown flushes in-memory data to disk and prevents database corruption.

Once both services are stopped, verify no Java processes are still running. On Linux, run ps aux | grep java. On Windows, check Task Manager for any lingering java.exe processes.

Archive Your Server Files

Navigate to your L2J root directory and create a compressed archive. On Linux, this command creates a tar.gz archive:

tar -czvf l2j-backup-$(date +%F).tar.gz login/ game/ config/ data/

On Windows, use 7-Zip or WinRAR to create a similar archive. Include the login, game, config, and data folders. These contain your server configuration, custom scripts, HTML dialog files, and any modifications you have made.

Copy this archive to a separate location, not the same drive as your server files. An external USB drive or a cloud storage folder works perfectly.

Export the MySQL Database

Use mysqldump to export your entire Lineage 2 database. This command creates a single SQL file containing all your player accounts, characters, items, and clan data:

mysqldump -u l2j -p l2jls > l2j-database-$(date +%F).sql

Run this for each database your server uses. Most L2J setups have separate databases for the login server and game server. Export both. Compress the SQL file with gzip to reduce transfer time:

gzip l2j-database-*.sql

Store both the file archive and the database dump in the same backup location. Label them with the date so you know which is the most recent.

Setting Up Your VPS for Lineage 2 Hosting

With your backup safely stored, you can now prepare the VPS. I recommend starting with a fresh installation of Ubuntu 22.04 LTS or Debian 12. These distributions have long support cycles and excellent package management for the tools you need.

Update the System

Connect to your VPS via SSH and update all packages to their latest versions:

sudo apt update && sudo apt upgrade -y

This step pulls in security patches and ensures compatibility with the software you will install next.

Install Java Runtime Environment

Lineage 2 servers require Java. Most L2J builds target Java 8, though newer chronicles use Java 11 or 17. Install OpenJDK with this command:

sudo apt install openjdk-17-jre-headless -y

Verify the installation by running java -version. You should see the OpenJDK version printed in the output.

Install MySQL or MariaDB

MariaDB is a drop-in MySQL replacement with better performance on most workloads. Install it with:

sudo apt install mariadb-server mariadb-client -y

Secure the installation by running sudo mysql_secure_installation. Set a root password, remove anonymous users, and disable remote root login.

Create the L2J Database and User

Log into MySQL as root and create the database structure your L2J server expects:

CREATE DATABASE l2jls CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE DATABASE l2jgs CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'l2j'@'localhost' IDENTIFIED BY 'your_secure_password';
GRANT ALL PRIVILEGES ON l2jls.* TO 'l2j'@'localhost';
GRANT ALL PRIVILEGES ON l2jgs.* TO 'l2j'@'localhost';
FLUSH PRIVILEGES;

Replace “your_secure_password” with a strong password. Save this password somewhere secure because your L2J configuration files will need it.

Install a Firewall

UFW (Uncomplicated Firewall) is the easiest way to manage firewall rules on Ubuntu. Install and enable it:

sudo apt install ufw -y
sudo ufw allow 22/tcp
sudo ufw enable

You will add Lineage 2 game ports in a later step. For now, port 22 stays open for SSH access.

Transferring L2J Server Files to the VPS

With the VPS prepared, you can now move your server files. There are three reliable methods, and I will cover each.

Method 1: SCP (Secure Copy)

SCP encrypts the transfer and works over SSH. From your home server, run:

scp l2j-backup-*.tar.gz user@your_vps_ip:/home/user/

This copies the file archive to your VPS home directory. The transfer speed depends on your home upload speed and the VPS network. Expect 50 to 200 MB per minute on a typical residential connection.

Method 2: rsync (Resume-Friendly Transfer)

rsync is my preferred method for large transfers because it resumes interrupted uploads. It only sends the parts of files that changed:

rsync -avz --progress l2j-backup-*.tar.gz user@your_vps_ip:/home/user/

If your connection drops mid-transfer, run the same command again and rsync picks up where it left off. This saved me hours during my migration.

Method 3: SFTP with FileZilla or WinSCP

For Windows users, SFTP clients provide a drag-and-drop interface. Connect to your VPS using your SSH credentials, then drag the backup archive into the VPS file system. This is slower than SCP but easier for beginners.

Extract the Archive on the VPS

Once the file arrives on the VPS, extract it into your L2J installation directory:

mkdir -p /opt/l2j
tar -xzvf l2j-backup-*.tar.gz -C /opt/l2j

You now have your full server file structure on the VPS. Verify the folders exist and contain the expected files before proceeding.

Migrating the Lineage 2 Database to the New VPS

Your server files are useless without the database. The database contains every player account, character, inventory, and quest progress. Treat this transfer with the same care as the file backup.

Transfer the Database Dump

Use SCP or rsync to move the compressed SQL dump to the VPS:

scp l2j-database-*.sql.gz user@your_vps_ip:/home/user/

Import the Database

On the VPS, decompress and import the SQL file into MySQL:

gunzip l2j-database-*.sql.gz
mysql -u l2j -p l2jls < l2j-database-*.sql

Repeat for each database your server uses. The import time depends on database size. A small server with 500 players imports in under a minute. A large server with 10 years of data may take 10 to 20 minutes.

Update Database Configuration

Open your L2J configuration files on the VPS and verify the database connection settings. The file is usually located at /opt/l2j/login/config/LoginServer.properties and /opt/l2j/game/config/GameServer.properties.

Update the database URL, username, and password to match what you set up earlier. Most L2J builds use jdbc:mysql://localhost/l2jls as the default URL. If you changed database names, update them here.

Verify the Import

Connect to MySQL and confirm your data is present:

mysql -u l2j -p l2jls -e "SELECT COUNT(*) FROM characters;"

This returns the total character count. Compare it against the number you had on your home server. If the numbers match, your database migration is successful.

Configuring Network, Firewall, and Game Ports

Lineage 2 uses specific network ports for game traffic, login traffic, and communication between servers. Open these ports on your VPS firewall to allow players to connect.

The standard Lineage 2 ports are 7777 for the game server, 2106 for the login server, and 9014 for the cache. Some chronicles use additional ports for sub-server communication or custom features. Check your L2J documentation for the exact ports your build requires.

Open Game Ports with UFW

Run these commands to open the essential Lineage 2 ports:

sudo ufw allow 7777/tcp
sudo ufw allow 7777/udp
sudo ufw allow 2106/tcp
sudo ufw allow 9014/tcp

If you run multiple game servers (sub-servers), each one uses a different port range. Open those ports as well, following the same pattern.

Check Your VPS Provider’s Firewall

Most VPS providers have an external firewall in addition to UFW. You may need to open the same ports in your provider’s control panel. Look for sections labeled “Network,” “Firewall,” or “Security Groups.”

I lost two hours during my first migration because I configured UFW correctly but forgot the provider-level firewall. The game server was running, but no one could connect. Check both layers before testing.

Bind the Login Server to All Interfaces

Edit your login server configuration and confirm it binds to 0.0.0.0 rather than 127.0.0.1. This allows external connections:

Loginserver.hostname = *

Do the same for the game server configuration. The asterisk tells Java to accept connections on any network interface.

Post-Migration Checklist and Testing

Your VPS is configured and your data is migrated. Before announcing the new server to your players, run through this checklist to catch any issues.

First, start the login server. Watch the console output for database connection errors, configuration warnings, or port binding failures. A healthy login server prints “LoginServer started” or similar within 30 seconds.

Second, start the game server. It should connect to the login server, load character data, and announce that it is ready for connections. If you see “Registered on login as Server ID X,” the game server is live.

Third, test local connectivity. From the VPS itself, run telnet localhost 7777. A blank screen with a cursor means the port is open. A “connection refused” message means the game server is not running or the port is wrong.

Fourth, test external connectivity. From your home computer, run telnet your_vps_ip 7777. If this works, players can connect. If it fails, check both firewall layers and your game server binding.

Fifth, test with the actual game client. Use the Lineage 2 system.ini or l2.ini file to point at your VPS IP address. Try logging in, creating a character, and playing for 15 minutes. This catches issues that connectivity tests miss.

Sixth, update your DNS records. If you use a domain name for your server, point it at the VPS IP address. DNS propagation takes 1 to 24 hours, so do this before the final switch.

Common Migration Issues and How to Fix Them

Even with careful planning, you will likely hit at least one snag. Here are the issues I have seen most often and how to solve them quickly.

Database connection refused: This usually means wrong credentials in your configuration files. Double-check the username, password, and database name. Also confirm MySQL is running with sudo systemctl status mariadb.

Game port not accessible from outside: Your VPS provider’s external firewall is almost always the culprit. Log into your provider’s control panel and open the required ports. Some providers require you to reboot the VPS after firewall changes.

Java version mismatch: If you see “UnsupportedClassVersionError” in the logs, your L2J build needs a different Java version. Install the matching OpenJDK package and update your startup scripts to use it.

Character data missing or wrong: The database import may have used the wrong database name. Drop the database, recreate it with the correct character set, and re-import the SQL dump. Always verify with a SELECT count query afterward.

Slow performance after migration: Check VPS resource usage with top or htop. If Java is using all available RAM, upgrade to a plan with more memory. Lineage 2 servers need 1 GB of RAM per 25 to 50 concurrent players.

Players getting disconnected during login: This often points to a login server configuration issue. Make sure the login server IP in your game server configuration matches the actual VPS IP, not localhost or an old home network IP.

Frequently Asked Questions

How to migrate from shared hosting to VPS?

Migrating from shared hosting to a VPS involves backing up all your files and databases, provisioning a new VPS with adequate resources, transferring the data using SCP or rsync, restoring the database on the new server, updating configuration files with new credentials, and finally testing connectivity. The process takes a few hours for most applications and results in better performance, dedicated resources, and full root access.

Is VPS better than shared hosting?

Yes, a VPS is better than shared hosting for game servers and resource-intensive applications. With a VPS, you get dedicated CPU and RAM allocations, isolated resources that other users cannot affect, full root access for customization, and typically better network performance. Shared hosting limits your control and performance because you compete with other users for the same resources.

How to make VPS from a dedicated server?

To turn a dedicated server into a VPS, install a hypervisor like Proxmox, VMware ESXi, or KVM on the dedicated hardware. The hypervisor creates virtual machines that function as independent VPS instances. Each VPS gets dedicated virtual CPU cores, RAM, and storage carved from the physical server. This approach is more complex than renting a managed VPS but gives you complete control over resource allocation.

How to backup Lineage 2 server files?

To back up Lineage 2 server files, stop the login and game servers cleanly, then create a compressed archive of your login, game, config, and data folders using tar or 7-Zip. Separately, export your MySQL databases using mysqldump. Store both the file archive and the SQL dump in a separate location, ideally on a different physical drive or cloud storage. This combination captures every piece of data needed to restore your server.

Final Thoughts

Migrating a Lineage 2 server from home hosting to a VPS is one of the best decisions you can make as a server administrator. Your players get a more stable experience, you get freedom from hardware anxiety, and your server runs 24/7 without depending on your home internet connection.

If you would rather skip the manual setup entirely, professional Lineage 2 server hosting providers handle all of this for you. They provision the VPS, configure the environment, and often include one-click L2J deployment so you can focus on building your community instead of fighting with firewall rules.

Take it one step at a time, keep that backup safe, and you will have your server running on a VPS before the weekend is over.

Leave a Comment