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
| Tool | Purpose | Download |
|---|---|---|
| VirtualBox | Local VM testing | virtualbox.org |
| PuTTY | SSH client (Windows) | putty.org |
| WinSCP | File transfer over SSH | winscp.net |
| Navicat Premium / HeidiSQL | MySQL GUI | navicat.com / heidisql.com |
| Notepad++ or VS Code | Config file editing | notepad-plus-plus.org |
| EterNexus | Pack/unpack .eix/.epk client files | metin2.dev |
| 7-Zip | Archive extraction | 7-zip.org |
Register an account at https://metin2.dev before starting. You will need it to download the server files, binaries, and tools.
Part 1 — Local Testing with VirtualBox (Recommended for Beginners)
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
- Download and install VirtualBox from virtualbox.org.
- 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.
- Open VirtualBox → File → Import Appliance → select the
.ovafile. - In the import settings, set the Network Adapter to Bridged Adapter so the VM gets its own IP on your network.
- Click Import and wait for it to finish.
Step 2: Start the VM and Get Its IP
- Start the VM in VirtualBox.
- Log in using the credentials provided in the tutorial thread (usually
root/metin2). - Run
ifconfigin the VM console and note the IP address (e.g.,192.168.1.X). - From your Windows machine, open PuTTY, connect to that IP on port 22.
- You should now have an SSH session into the VM.
Step 3: Upload Server Files
- Download the Metin2 Project server files archive from metin2.dev (same thread as the VM).
- Open WinSCP, connect to the VM IP using the same credentials.
- Upload the archive to
/home/metin2/(or whichever path the tutorial specifies). - In PuTTY, extract the archive:
cd /home/metin2 tar -xzf metin2project.tar.gz
Step 4: Configure Client
- Download the Metin2 client (the same version as the server files — check metin2.dev for the matching client).
- In the client folder, locate
serverinfo.py(orserverinfo.cfgdepending on client version). - 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 - Save and close.
- If the client uses
.eix/.epkpacked files, use EterNexus to unpack, edit, and repack them (see Part 3 — Client Configuration for details).
Step 5: Start the Server and Test
- In PuTTY, navigate to the server directory and run the startup script:
cd /home/metin2/server sh start.sh - Wait ~30 seconds for all services to initialize.
- Launch the Metin2 client from your PC and log in.
- 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
- Rent a VPS or dedicated server from Hetzner, OVH, or Contabo.
- During setup, choose FreeBSD 13.x as the operating system (most stable option for Metin2 binaries).
- 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
.solibraries when starting the server later, installcompat13xor 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.
- Download the password encryptor tool from the metin2.dev forum (in the Metin2 Project thread).
- Run it to generate the hash for your chosen password.
- 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
15000or16000–16003to 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:
- Open EterNexus → Open → select the
.eixfile (e.g.,root.eix) - Click Extract All to a working folder
- Edit the needed files
- 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:
- In EterNexus, select all edited files in the working folder
- Right-click → Pack → choose output as the original
.eix/.epkname - Replace the original files in your client's
pack/folder - 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 0or/goto mapname)
Useful GM Commands
| Command | Effect |
|---|---|
/set [name] gm 100 | Grant 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.txtanddb/syslog.txt - Missing
.solibrary: runldd ./gameto find missing libs, thenpkg installthe package that provides them - Wrong MySQL credentials: re-check
conf.txtpasswords
Client can't connect
- Confirm server processes are running:
ps aux | grep game - Confirm firewall ports are open:
netstat -an | grep 13000 - Confirm
serverinfo.pyhas 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
accountandcommonbeforeplayer
Invisible/missing NPCs or monsters
- The
mob_protoanditem_protofiles 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
gmcolumn in theplayertable is set to100 - 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 ratecommon/etc_drop_item.txt— Common drops across all monsterschar.cppor config files — XP rate multiplier (search forEXP_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
- Edit
item_proto(server-side) and repackitem_protoin the client - Edit
mob_protofor custom monsters - 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
| Resource | Link |
|---|---|
| Main tutorial thread | https://metin2.dev/topic/26184 |
| Metin2Dev forum | https://metin2.dev |
| EterNexus download | Available on metin2.dev tools section |
| HeidiSQL (free MySQL GUI) | https://heidisql.com |
| WinSCP | https://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!