LoginCreate Account
Menu

How to Create a Metin2 Private Server in 2026 (Complete Step-by-Step Guide)

Complete Metin2 Private Server Setup Guide


⚠️ Important Warnings Before Starting

  • Legal gray area: Private servers use GameForge/Ymir Entertainment assets without official permission. Tolerated for personal/educational non-commercial use. Avoid monetizing.
  • Security risks: Only download files from metin2.dev. Scan every archive with antivirus before running. Use strong passwords and proper firewalls.
  • Skill level: You will need SSH, basic command-line comfort, and patience. Expect debugging.
  • Hardware recommendations:
    • Local testing: Any decent PC (4 GB RAM minimum)
    • Public server: VPS or dedicated server — FreeBSD 13.x preferred, 4–8 GB RAM, SSD, good CPU
  • Recommended providers: Hetzner, OVH, Contabo (all support FreeBSD images)

Required Tools

ToolPurposeDownload
VirtualBoxLocal VM testingvirtualbox.org
PuTTYSSH client (Windows)putty.org
WinSCPFile transfer over SSHwinscp.net
Navicat Premium / HeidiSQLMySQL GUInavicat.com / heidisql.com
Notepad++ or VS CodeConfig file editingnotepad-plus-plus.org
EterNexusPack/unpack .eix/.epk client filesmetin2.dev
7-ZipArchive extraction7-zip.org

Register an account at https://metin2.dev before starting. You will need it to download the server files, binaries, and tools.


This is the fastest way to get a working server on your own PC before touching a real server.

Step 1: Download and Import the VM

  1. Download and install VirtualBox from virtualbox.org.
  2. On metin2.dev, find the thread: "How to create a Metin2 private server on dedicated server with Metin2 Project" and download the OVA Virtual Machine image.
  3. Open VirtualBox → File → Import Appliance → select the .ova file.
  4. In the import settings, set the Network Adapter to Bridged Adapter so the VM gets its own IP on your network.
  5. Click Import and wait for it to finish.

Step 2: Start the VM and Get Its IP

  1. Start the VM in VirtualBox.
  2. Log in using the credentials provided in the tutorial thread (usually root / metin2).
  3. Run ifconfig in the VM console and note the IP address (e.g., 192.168.1.X).
  4. From your Windows machine, open PuTTY, connect to that IP on port 22.
  5. You should now have an SSH session into the VM.

Step 3: Upload Server Files

  1. Download the Metin2 Project server files archive from metin2.dev (same thread as the VM).
  2. Open WinSCP, connect to the VM IP using the same credentials.
  3. Upload the archive to /home/metin2/ (or whichever path the tutorial specifies).
  4. In PuTTY, extract the archive:
    cd /home/metin2
    tar -xzf metin2project.tar.gz
    

Step 4: Configure Client

  1. Download the Metin2 client (the same version as the server files — check metin2.dev for the matching client).
  2. In the client folder, locate serverinfo.py (or serverinfo.cfg depending on client version).
  3. Open it in Notepad++ and change the IP to your VM's IP:
    SERVER_IP = "192.168.1.X"   # Replace with your VM IP
    SERVER_PORT = 13000
    
  4. Save and close.
  5. If the client uses .eix/.epk packed files, use EterNexus to unpack, edit, and repack them (see Part 3 — Client Configuration for details).

Step 5: Start the Server and Test

  1. In PuTTY, navigate to the server directory and run the startup script:
    cd /home/metin2/server
    sh start.sh
    
  2. Wait ~30 seconds for all services to initialize.
  3. Launch the Metin2 client from your PC and log in.
  4. Create a character and test movement, combat, and item drops to confirm the server is working.

Part 2 — Production Setup on a Dedicated Server / VPS

Step 1: Provision Your Server

  1. Rent a VPS or dedicated server from Hetzner, OVH, or Contabo.
  2. During setup, choose FreeBSD 13.x as the operating system (most stable option for Metin2 binaries).
  3. Take note of your server's public IP address and root password.

Step 2: Initial System Update

SSH in as root and update the package repository and base system:

# Update package repository
pkg update && pkg upgrade -y

# Install essential tools
pkg install -y bash wget curl nano git screen htop

Step 3: Install Required Packages

Install all dependencies the Metin2 server needs:

# MySQL (MariaDB is recommended — more stable)
pkg install -y mariadb106-server mariadb106-client

# Python (server scripts use Python 2.7 in most builds)
pkg install -y python27

# Libraries required by Metin2 binaries
pkg install -y libstdc++ libiconv boost-libs

# Enable MySQL to start on boot
sysrc mysql_enable="YES"

# Start MySQL service now
service mysql-server start

Note: If you see errors about missing .so libraries when starting the server later, install compat13x or the specific library package the error names.

Step 4: Secure MySQL and Create Databases

Run the MySQL security wizard:

mysql_secure_installation
  • Set a strong root password (save it — you'll need it)
  • Answer Y to all prompts (remove anonymous users, disable remote root, remove test DB)

Now log into MySQL and create all required databases:

mysql -u root -p

Inside the MySQL shell, run:

-- Create databases
CREATE DATABASE account CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE DATABASE common CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE DATABASE player CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE DATABASE log CHARACTER SET utf8 COLLATE utf8_general_ci;

-- Create a dedicated server user (don't use root for the game)
CREATE USER 'metin2'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';

-- Grant permissions on all game databases
GRANT ALL PRIVILEGES ON account.* TO 'metin2'@'localhost';
GRANT ALL PRIVILEGES ON common.* TO 'metin2'@'localhost';
GRANT ALL PRIVILEGES ON player.* TO 'metin2'@'localhost';
GRANT ALL PRIVILEGES ON log.* TO 'metin2'@'localhost';

FLUSH PRIVILEGES;
EXIT;

Step 5: Import the Database Schema

Upload your Metin2 Project SQL files via WinSCP to /home/metin2/sql/, then import them in this order:

# Import each database schema
mysql -u metin2 -p account  < /home/metin2/sql/account.sql
mysql -u metin2 -p common   < /home/metin2/sql/common.sql
mysql -u metin2 -p player   < /home/metin2/sql/player.sql
mysql -u metin2 -p log      < /home/metin2/sql/log.sql

Verify the tables were created:

mysql -u metin2 -p -e "SHOW TABLES;" account
mysql -u metin2 -p -e "SHOW TABLES;" player

You should see tables like account, item, player, guild, etc.

Step 6: Create Your First GM Account

The account passwords in Metin2's database are stored in a custom hash format, not plain MD5 or bcrypt. You must use the password encryptor tool from metin2.dev.

  1. Download the password encryptor tool from the metin2.dev forum (in the Metin2 Project thread).
  2. Run it to generate the hash for your chosen password.
  3. Insert your account into the database:
mysql -u metin2 -p account

INSERT INTO account (login, password, social_id, email, status)
VALUES ('YourGMUsername', 'HASHED_PASSWORD_HERE', '000000-0000000', '[email protected]', 'OK');

EXIT;

You will set the in-game GM level after first login using a server command (see Part 4 — First Launch).

Step 7: Upload and Extract Server Files

Use WinSCP to transfer the Metin2 Project server archive to /home/metin2/, then extract:

mkdir -p /home/metin2/server
cd /home/metin2
tar -xzf metin2project_server.tar.gz -C /home/metin2/server

Make sure binary files are executable:

chmod +x /home/metin2/server/game/game
chmod +x /home/metin2/server/db/db
chmod +x /home/metin2/server/auth/auth
chmod +x /home/metin2/server/channel*/game

Step 8: Edit Configuration Files

All config files are in the server directory. Open each with nano and fill in your values.

db/conf.txt — Database server config

DBName		player
DBHost		localhost
DBPort		3306
DBUser		metin2
DBPassword	YourStrongPasswordHere

CommonDBName	common
CommonDBHost	localhost
CommonDBUser	metin2
CommonDBPassword YourStrongPasswordHere

db/conf_account.txt — Account database

DBName		account
DBHost		localhost
DBPort		3306
DBUser		metin2
DBPassword	YourStrongPasswordHere

channel1/config — Game channel config (repeat for each channel)

HOSTNAME	game01
IP		YOUR.PUBLIC.IP.HERE    # <-- your server's public IP
PORT		13001
DB_ADDR		127.0.0.1
DB_PORT		15000
P2P_PORT	16000
LOG_LEVEL	0

Channel ports typically follow this layout:

  • Auth server: 13000
  • Channel 1: 13001
  • Channel 2: 13002
  • Channel 3: 13003
  • DB server (internal): 15000
  • P2P between channels: 16000–16003

auth/config — Auth server

HOSTNAME	auth
IP		YOUR.PUBLIC.IP.HERE
PORT		13000
DB_ADDR		127.0.0.1
DB_PORT		15000

Step 9: Configure the Firewall

Open all required ports in FreeBSD's ipfw or pf firewall. Using pf (edit /etc/pf.conf):

# Allow SSH
pass in on em0 proto tcp to port 22

# Allow game ports
pass in on em0 proto tcp to port { 13000, 13001, 13002, 13003 }

# Allow auth
pass in on em0 proto tcp to port 13000

Reload the firewall:

service pf reload

Or if using ipfw:

ipfw add allow tcp from any to any dst-port 13000-13003
ipfw add allow tcp from any to any dst-port 22

Important: Do NOT open ports 15000 or 16000–16003 to the public — those are internal only.

Step 10: Start the Server

Start all server processes in the correct order:

# 1. Start the DB server first
cd /home/metin2/server/db
screen -S db ./db &

# 2. Start the auth server
cd /home/metin2/server/auth
screen -S auth ./auth &

# 3. Start each game channel
cd /home/metin2/server/channel1
screen -S ch1 ./game &

cd /home/metin2/server/channel2
screen -S ch2 ./game &

Using screen keeps processes running after you disconnect from SSH. To re-attach: screen -r ch1

Alternatively, use the all-in-one start.sh script included in the Metin2 Project files:

cd /home/metin2/server
bash start.sh

To check if the processes are running:

ps aux | grep game
ps aux | grep db

Part 3 — Client Configuration

Locate Client Files

The key files are inside .eix/.epk archives in the client's pack/ folder. Use EterNexus to unpack them:

  1. Open EterNexus → Open → select the .eix file (e.g., root.eix)
  2. Click Extract All to a working folder
  3. Edit the needed files
  4. Use EterNexus to Repack back to .eix/.epk

Edit serverinfo.py

This is the main file controlling which server the client connects to. It is typically inside root.eix:

SERVER_ADDR = "YOUR.PUBLIC.IP.HERE"  # or VM IP for local testing
SERVER_PORT = 13000

For multi-channel setups:

g_channelList = [
    {"name": "CH1", "ip": "YOUR.PUBLIC.IP.HERE", "tcp": 13001, "udp": 0, "mark": 0},
    {"name": "CH2", "ip": "YOUR.PUBLIC.IP.HERE", "tcp": 13002, "udp": 0, "mark": 0},
]

Repack the Client Files

After editing:

  1. In EterNexus, select all edited files in the working folder
  2. Right-click → Pack → choose output as the original .eix/.epk name
  3. Replace the original files in your client's pack/ folder
  4. Test by launching metin2client.exe

Part 4 — First Launch and Basic Testing

Grant GM Privileges

After logging in to the game for the first time with your account, grant yourself GM status using the DB:

mysql -u metin2 -p player

UPDATE player SET gm = 100 WHERE name = 'YourCharacterName';

EXIT;

Or using the in-game command (if enabled in your server config):

/set YourCharacterName gm 100

Test Checklist

  • Character creation works
  • You can move between maps
  • Monsters spawn and are killable
  • Items drop from monsters
  • NPCs are visible and interactable
  • Chat works
  • You can teleport with GM commands (e.g., /warp 0 0 or /goto mapname)

Useful GM Commands

CommandEffect
/set [name] gm 100Grant GM level 100
/item [vnum]Spawn item by ID
/warp [x] [y]Teleport to coordinates
/goto [mapname]Teleport to a map
/dc [name]Disconnect a player
/notice [message]Server-wide announcement

Part 5 — Common Errors and Fixes

Server won't start / crashes immediately

  • Check logs in channel1/syslog.txt and db/syslog.txt
  • Missing .so library: run ldd ./game to find missing libs, then pkg install the package that provides them
  • Wrong MySQL credentials: re-check conf.txt passwords

Client can't connect

  • Confirm server processes are running: ps aux | grep game
  • Confirm firewall ports are open: netstat -an | grep 13000
  • Confirm serverinfo.py has the correct IP
  • Confirm client and server versions match (mismatch = instant disconnect)

MySQL import errors

  • Encoding issue: ensure databases were created with CHARACTER SET utf8 COLLATE utf8_general_ci
  • Import order matters: always import account and common before player

Invisible/missing NPCs or monsters

  • The mob_proto and item_proto files must match between client and server
  • Re-download the matching client pack from metin2.dev if they diverge

GM commands not working

  • Confirm your character's gm column in the player table is set to 100
  • Some builds require a server restart after DB changes

Part 6 — Advanced Configuration

Customizing Drop Rates and XP

Edit the following files in your server's data/ directory:

  • mob_drop_item.txt — What each monster drops and at what rate
  • common/etc_drop_item.txt — Common drops across all monsters
  • char.cpp or config files — XP rate multiplier (search for EXP_BONUS)

Example mob drop entry:

# MobVnum  ItemVnum  Count  Probability(0-100%)
101        27002     1      5     # 5% chance to drop item 27002

Adding Custom Items or Mobs

  1. Edit item_proto (server-side) and repack item_proto in the client
  2. Edit mob_proto for custom monsters
  3. Use the proto tools from metin2.dev to convert between binary and text formats

Setting Rates via Config

In many Metin2 Project builds, channel1/config supports rate multipliers:

RATE_EXP        200        # 2x EXP
RATE_ITEM       150        # 1.5x item drops
RATE_MONEY      200        # 2x yang drops

Monitoring the Server

Install Netdata for real-time resource monitoring:

pkg install -y netdata
sysrc netdata_enable="YES"
service netdata start

Access at http://YOUR.SERVER.IP:19999


Key Resources

ResourceLink
Main tutorial threadhttps://metin2.dev/topic/26184
Metin2Dev forumhttps://metin2.dev
EterNexus downloadAvailable on metin2.dev tools section
HeidiSQL (free MySQL GUI)https://heidisql.com
WinSCPhttps://winscp.net

Start with the VirtualBox VM method for the easiest local experience. Once your local server is stable, replicate the configuration on your dedicated server. Good luck!