How to Create a Metin2 Private Server With a Virtual Machine (September 2026)

Setting up a Metin2 private server with a virtual machine gives you complete control over rates, drops, maps, and gameplay mechanics without touching your main operating system. I have helped dozens of server admins get their first Metin2 server running, and the VM approach is the most reliable method for beginners and experienced developers alike.

This guide walks you through every step from downloading VirtualBox to opening your server to the public. By the end, you will have a fully functional Metin2 server running inside a virtual machine that you can use for local testing or public hosting.

Whether you want a private testing environment for development or you are building the next big community server, the process is the same. The key is following each step in order and avoiding the common pitfalls that trip up first-time server admins.

Our team has tested this setup process on multiple machines and configurations to make sure the instructions work for 2026. If you hit a snag, the troubleshooting section near the end covers the errors that come up most often in the Metin2 community on Reddit, metin2.dev, and RaGEZONE.

Prerequisites and System Requirements

Before you start building your Metin2 private server, you need the right hardware and software. Running a game server inside a virtual machine requires more resources than casual gaming, so pay close attention to the requirements below.

Minimum Hardware Requirements

Your host machine needs at least 8 GB of RAM, a quad-core processor with virtualization support, and 60 GB of free disk space. The virtual machine will claim 4 GB of RAM and 40 GB of storage on its own, so your host needs enough overhead to stay responsive.

If you plan to host more than 20 players, bump your total RAM to 16 GB and use an SSD instead of a mechanical hard drive. Server performance scales directly with disk speed and available memory, especially during combat-heavy events.

Software You Will Need

Download these tools before you start. Having everything ready saves hours of back-and-forth later:

Virtualization software: VirtualBox (free) or VMware Workstation Player (free for personal use). VirtualBox is the easiest for beginners and works on Windows, macOS, and Linux.

FreeBSD ISO: Metin2 server files are built to run on FreeBSD. You need FreeBSD 13.x or 14.x depending on your server file version. Most modern server packs target FreeBSD 13.2 or later.

SSH client: PuTTY (Windows) or the built-in terminal (macOS and Linux). You will use this to connect to your VM and run server commands.

Database tool: Navicat, HeidiSQL, or DBeaver. These give you a visual interface for managing your MySQL databases without typing SQL commands.

Metin2 server files: Get these from trusted community sources like metin2.dev, Metin2Hub, or the MT2Dev GitHub repositories. Avoid random file-sharing sites, as many contain malware or outdated code.

SFTP client: WinSCP or FileZilla for transferring files between your host machine and the virtual machine.

Quick-Start Checklist

Use this checklist to verify you have everything before starting the setup process:

– Host machine with 8 GB+ RAM and virtualization enabled in BIOS
– VirtualBox or VMware installed
– FreeBSD ISO downloaded (13.x or 14.x)
– PuTTY or terminal SSH client ready
– Navicat or HeidiSQL installed
– WinSCP or FileZilla installed
– Metin2 server files from a trusted source
– Metin2 client matching your server file version

Setting Up Your Virtual Machine

This is the step where most beginners get stuck, so we will go through it carefully. The goal is to create a virtual machine running FreeBSD that will host your Metin2 server files and databases.

Step 1: Enable Hardware Virtualization

Restart your computer and enter BIOS or UEFI settings. Look for Intel VT-x or AMD-V (sometimes called SVM Mode) and make sure it is enabled. Without hardware virtualization, your VM will run slowly or fail to start at all.

Most modern CPUs support this feature, but it is often disabled by default. If VirtualBox throws an error about VT-x when you try to boot the FreeBSD ISO, this is the fix.

Step 2: Create the Virtual Machine in VirtualBox

Open VirtualBox and click “New” to create a new virtual machine. Use these settings for optimal Metin2 server performance:

Name: Metin2Server (or any name you prefer)
Type: BSD
Version: FreeBSD (64-bit)
RAM: 4096 MB (4 GB) minimum, 6144 MB if your host has 16 GB+
CPU cores: 2 minimum, 4 recommended
Disk size: 40 GB dynamically allocated
Disk type: VDI (VirtualBox Disk Image)

After creating the VM, go to Settings and make these adjustments. They matter more than you might think:

System > Processor: Enable PAE/NX and set the processor count to at least 2.

System > Acceleration: Set paravirtualization interface to “Default” and enable VT-x/AMD-V with Nested Paging.

Network > Adapter 1: Set to “Bridged Adapter” and select your main network interface. Bridged mode gives your VM its own IP address on your local network, which is necessary for port forwarding and remote connections later.

Storage: Attach the FreeBSD ISO to the empty optical drive under the storage controller.

Step 3: Install FreeBSD

Boot the virtual machine. FreeBSD will load from the ISO and present an installation menu. Follow these steps:

1. Select “Install” from the boot menu.
2. Choose your keyboard layout.
3. Set the hostname to something recognizable, like “metin2server”.
4. When prompted for distribution sets, select “lib32 compatibility” (32-bit libraries) in addition to the base system. Many Metin2 server binaries require this.
5. For partitioning, choose “Auto (ZFS)” if available, or “Auto (UFS)” for simpler setups. ZFS offers better performance and snapshots for backups.
6. Set the root password and remember it. You will need it for every SSH session.
7. Create a user account if desired, but root access is what you will primarily use for server management.
8. Under network configuration, make sure IPv4 is enabled via DHCP. Write down the IP address the installer assigns, as you will need it for SSH connections.
9. Finish the installation and reboot into your new FreeBSD system.

Step 4: Verify SSH Access

After FreeBSD boots, open PuTTY or your terminal and connect to the VM IP address on port 22. Log in as root with the password you set during installation.

If the connection fails, check that SSH is running by typing service sshd status at the VM console. If it is not running, type service sshd start and try connecting again.

From this point forward, you can do everything through SSH instead of the VirtualBox console window. It is faster and lets you copy and paste commands.

Installing Metin2 Server Files

With FreeBSD running in your virtual machine, the next step is getting the Metin2 server files installed and ready to configure. This is where the quality of your source files matters enormously.

Choosing Trusted Server Files

The Metin2 community has produced many server file packs over the years. I recommend starting with files from metin2.dev or the MT2Dev GitHub repository, as these are actively maintained and community-vetted.

Avoid files from unverified file-sharing sites. Many contain backdoors, outdated libraries, or malware. The time you save downloading a sketchy pack is nothing compared to the hours you will spend debugging a compromised server.

Check that the server file version matches your FreeBSD version. Most modern packs specify their target FreeBSD release in the documentation. Using mismatched versions is a leading cause of server crashes that we see in forum posts.

Transferring Files to Your VM

Open WinSCP or FileZilla and connect to your VM using the same IP address and root credentials as SSH. Use the SFTP protocol on port 22.

Server files typically belong in the /usr/home/mt2 or /usr/home/metin2 directory. Create this directory if it does not exist:

mkdir -p /usr/home/mt2

Upload the server files archive to this directory. Once the upload completes, extract the archive. The exact command depends on the format:

tar -xzf serverfiles.tar.gz -C /usr/home/mt2/
unzip serverfiles.zip -d /usr/home/mt2/

After extraction, verify the directory structure. You should see folders for channel data, the auth server, the database connectors, and configuration files. If something is missing, your archive may be corrupted, and you should re-download it.

Setting Permissions

Metin2 server binaries need execute permissions to run. Navigate to your server files directory and set permissions:

cd /usr/home/mt2
chmod -R 770 db/
chmod -R 770 auth/
chmod -R 770 channel1/
chmod -R 770 channel2/
chmod -R 770 channel3/
chmod -R 770 channel4/
chmod -R 770 game99/

If your file structure uses different folder names, adjust accordingly. The key is making sure the game and database binaries are executable by the root user.

Installing Required Libraries

Most Metin2 server files depend on additional FreeBSD packages. Install them through the package manager:

pkg install mysql57-server mysql57-client libstdc++ compat8x-amd64 python2

Some older server files require Python 2 for their management scripts. Newer packs may use Python 3 instead. Check the documentation for your specific files.

Enable MySQL to start on boot:

sysrc mysql_enable="YES"
service mysql-server start

Database Configuration

The database stores all player accounts, characters, items, and game data. Getting this right is critical, and it is one of the most common areas where beginners run into trouble.

Securing MySQL

After starting MySQL for the first time, run the security script:

mysql_secure_installation

Follow the prompts to set a root password, remove anonymous users, disable remote root login for now, and drop the test database. You can re-enable remote root access later when you need Navicat or HeidiSQL to connect.

Importing Metin2 Databases

Metin2 server files include SQL dumps that create the necessary database structure. These are usually found in the server files directory under folders like /db/sql/ or /sql/.

Log into MySQL from the VM console:

mysql -u root -p

Create the required databases. Most server files use these three:

CREATE DATABASE account;
CREATE DATABASE common;
CREATE DATABASE player;
CREATE DATABASE hotbackup;

Import the SQL files into each database. The exact filenames depend on your server file version, but the process is the same:

USE account;
SOURCE /usr/home/mt2/db/sql/account.sql;
USE common;
SOURCE /usr/home/mt2/db/sql/common.sql;
USE player;
SOURCE /usr/home/mt2/db/sql/player.sql;

If you get errors during import, check that your MySQL version is compatible with the SQL syntax in the dump files. Some older dumps use syntax that newer MySQL versions reject.

Configuring Database Access

Your server files need to know how to connect to MySQL. Edit the database configuration files, typically found in /usr/home/mt2/db/conf.txt or similar paths:

Set the MySQL host to localhost, the username to root or a dedicated user you created, and the password to match your MySQL configuration. The default port for MySQL is 3306.

Connecting Navicat or HeidiSQL

For easier database management, connect Navicat or HeidiSQL from your host machine to the VM. First, allow remote MySQL connections by editing /var/db/mysql/my.cnf and commenting out the bind-address line, then restarting MySQL.

Create a new connection in Navicat using the VM IP address, port 3306, and your MySQL root credentials. If the connection fails, check that port 3306 is open in the FreeBSD firewall and that your VM network is set to Bridged mode.

Server Configuration

With the database ready, you need to configure the game server itself. This includes setting up channels, defining ports, and editing the configuration files that control how your server behaves.

Channel Setup

A Metin2 server typically runs multiple channels (CH1 through CH4) plus a game99 channel for special events and an auth server for login. Each channel runs as a separate process.

The default port assignments for Metin2 servers are:

Port 11002: Auth server (handles login requests)
Port 13000: Channel 1
Port 13001: Channel 2
Port 13002: Channel 3
Port 13003: Channel 4
Port 13004: Channel 99 (events and special maps)
Port 3306: MySQL database

Write these down. You will need them for port forwarding later.

Editing CONFIG Files

Each channel directory contains a file called CONFIG. This file tells the server binary where to find the database, which port to listen on, and what the server name should be.

Open the CONFIG file in each channel directory and verify these settings:

HOSTNAME: channel1
CHANNEL: 1
PORT: 13000
P2P_PORT: 14000
DB_PORT: 15000
DB_ADDR: localhost
MAP_ALLOW: 1 3 4 21 41 61 65 104 999
BIND_IP: your.vm.ip.address

The BIND_IP field should match your VM IP address. If you leave it blank or set it incorrectly, channels will fail to start or clients will not be able to connect.

Repeat this process for each channel, changing the channel number and port accordingly.

Configuring serverinfo.py

The serverinfo.py file is what the client uses to find your server. It defines server names, channel ports, and IP addresses that players connect to.

For local testing, set the server IP to your VM address. For public hosting, set it to your public IP or domain name later. The file typically looks like this:

SERVER01 = channel1
SERVER02 = channel2
SERVER03 = channel3
SERVER04 = channel4
SERVER_EVENT = channel99

Each entry maps to a port number. Make sure these match the ports in your channel CONFIG files.

Starting the Server

Start the server components in this specific order:

1. Start the database connector first: cd /usr/home/mt2/db && ./db
2. Start the auth server: cd /usr/home/mt2/auth && ./auth
3. Start each channel: cd /usr/home/mt2/channel1 && ./game
4. Start game99: cd /usr/home/mt2/game99 && ./game

Each component should print boot messages without errors. If you see connection failures or crashes, check the troubleshooting section below.

Testing Your Server Locally

Before you worry about making the server public, verify that it works on your own machine. Local testing catches configuration errors early when they are easy to fix.

Preparing the Client

You need a Metin2 client that matches your server file version. Version mismatches between client and server are the most common cause of connection failures, and forum users report this issue constantly.

Check your server files documentation for the recommended client version. Using a client that is even slightly different from what the server expects will cause crashes, missing textures, or failed logins.

Editing the Client serverinfo.py

Inside the client files, there is also a serverinfo.py file, typically found in the root directory of the client or in the pack folder. Edit the server IP to match your VM IP address.

Set all channel IP addresses to your VM IP. The port numbers must match the ones you configured in the server-side CONFIG files (13000 through 13004).

Launching and Connecting

Launch the client executable. If everything is configured correctly, you should see your server name in the server selection screen. Click it, select a channel, and create a character.

If you see the server but cannot log in, the auth server on port 11002 may not be running or may have a database connection issue. Check the auth server console output for error messages.

If you can log in but channels show as offline, the channel processes are not running or the ports do not match between the client and server configurations.

Verifying Game Functionality

Once in-game, test the basic functions: move between maps, attack mobs, pick up items, and check the database to confirm that your character data is being saved. If items disappear after relogging, your player database tables may be incomplete or the database connector is not running.

This is also the time to test experience and drop rates. These are configured in the server files, typically in files like special_item_group.txt, mob_drop_item.txt, and the CONFIG files under each channel directory.

Making Your Server Public

Once local testing passes, you can open your server to other players. This requires port forwarding on your router, or moving to a VPS for better reliability.

Local Hosting vs VPS

Running the server on your home machine through a VM works fine for small communities of 10 to 30 players. However, there are tradeoffs to consider.

Local hosting pros: No monthly cost, full hardware control, easy file access, good for development.

Local hosting cons: Server goes down when your PC is off, home internet may not handle many connections, your public IP exposes your location, and dynamic IPs change with each router restart.

VPS hosting pros: 24/7 uptime, dedicated bandwidth, static IP address, professional data center network, isolation from your personal machine.

VPS hosting cons: Monthly cost, limited by your hosting plan resources, requires remote management only.

If you want a serious server with a growing community, a VPS is the way to go. You can use the exact same setup process described in this guide, just on a VPS running FreeBSD instead of a local VirtualBox VM.

Port Forwarding for Local Hosting

To let external players connect to your local server, forward these ports on your router to your VM IP address:

TCP 11002 (auth server)
TCP 13000 (channel 1)
TCP 13001 (channel 2)
TCP 13002 (channel 3)
TCP 13003 (channel 4)
TCP 13004 (channel 99)

Log into your router admin panel (usually at 192.168.1.1 or 192.168.0.1). Find the port forwarding section, sometimes called virtual servers or NAT rules. Create a rule for each port listed above, forwarding TCP traffic to your VM IP address.

If your VM IP is something like 192.168.1.100, forward all listed ports to that address. Save the rules and restart your router if prompted.

Updating the Public Client

For players connecting over the internet, the client serverinfo.py needs to point to your public IP address, not the local VM IP. Find your public IP by searching “what is my IP” in any browser.

Update all channel IP entries in the client serverinfo.py to your public IP. Distribute the modified client to your players through a download link or torrent.

If you have a dynamic IP that changes periodically, consider using a dynamic DNS service like DuckDNS or No-IP. This gives you a hostname that automatically tracks your changing IP, so players do not need a new client every time your router restarts.

Firewall Configuration

On your FreeBSD VM, make sure the firewall allows incoming connections on the game ports. If you are using PF (Packet Filter), add rules to allow traffic on ports 11002, 13000-13004:

pass in on em0 proto tcp from any to any port {11002, 13000, 13001, 13002, 13003, 13004} keep state

Reload the firewall rules after making changes: pfctl -f /etc/pf.conf.

Troubleshooting Common Metin2 Server Errors

Even with careful setup, you will likely encounter some errors. These are the most common issues reported in the Metin2 community, along with their solutions.

Server Files Will Not Start

If a channel or database process crashes immediately on launch, the most likely cause is missing library dependencies. Run ldd ./game or ldd ./db in the channel directory to see which shared libraries are missing.

Install the missing libraries with pkg install. The most commonly missing ones are libstdc++, compat8x-amd64, and MySQL client libraries.

Cannot Connect to Database

If the server processes start but cannot connect to MySQL, check three things. First, verify MySQL is running with service mysql-server status. Second, confirm the database credentials in the CONFIG file are correct. Third, make sure the database names in the CONFIG match the databases you created.

A quick test is to connect manually: mysql -u root -p -h localhost. If that works but the server cannot connect, the credentials in the CONFIG file are wrong.

Client Cannot See the Server

If the client server list shows no servers, the serverinfo.py in the client does not match your server configuration. Double-check the IP address and port numbers.

If the server appears but channels show as offline, the channel processes are either not running or listening on the wrong ports. Check the CONFIG files and verify each channel process is running with ps aux | grep game.

Version Mismatch Crashes

This is the most frustrating error for new admins. The client and server must use the same protocol version. If the server uses files from one version and the client from another, you will see crashes, failed logins, or corrupted character data.

Always download the client that is specifically paired with your server files. Trusted sources like metin2.dev provide matched client and server packs to eliminate this problem.

Port Forwarding Not Working

If players outside your network cannot connect but local connections work, port forwarding is the issue. Verify the ports are forwarded to the correct internal IP address and that the protocol is set to TCP, not UDP.

Some ISPs use carrier-grade NAT (CGNAT), which blocks port forwarding entirely. If that is the case, you need a VPS or a VPN service that supports port forwarding. Test your forwarded ports using an online port checker tool.

Login Server Timeout

If the client hangs on the login screen, the auth server on port 11002 is likely the problem. Check that the auth process is running and that it can reach the database. The auth server log will show connection errors if the database credentials are wrong.

Server Maintenance and Backups

Once your server is running, regular maintenance keeps it stable and your players happy. These practices separate serious server admins from weekend hobbyists.

Database Backups

Back up your databases daily using mysqldump. Create a simple script that exports all databases to a compressed file:

mysqldump -u root -p --all-databases | gzip > /backup/metin2_$(date +%Y%m%d).sql.gz

Schedule this with cron to run automatically every night. Keep at least two weeks of backups so you can roll back if something goes wrong after an update.

If you are using ZFS on FreeBSD, you can also take filesystem snapshots for instant rollback capability. This is one of the biggest advantages of choosing ZFS during installation.

Performance Optimization

Monitor your server resources with top or htop. If MySQL is consuming too much memory, tune the buffer pool size in my.cnf. For servers with many players, increasing the innodb_buffer_pool_size to 50-60% of available RAM makes a noticeable difference.

Keep the number of active channels proportional to your player count. Running four channels with five players each wastes resources. Start with one or two channels and add more as your community grows.

Security Best Practices

Change default passwords on everything: MySQL root, SSH access, and the FreeBSD root account. Disable SSH password authentication and use key-based authentication instead.

Never run your server as root in production. Create a dedicated user with limited permissions. This limits the damage if an attacker finds a vulnerability in the server files.

Keep FreeBSD and MySQL updated with security patches. Run freebsd-update fetch install and pkg upgrade regularly, but test updates on a development copy first to avoid breaking your live server.

Frequently Asked Questions

How do I create a Metin2 private server?

To create a Metin2 private server, download trusted server files from communities like metin2.dev, set up a FreeBSD virtual machine in VirtualBox, install and configure MySQL, import the game databases, edit the channel CONFIG files with correct ports and IP addresses, start the server processes, then connect with a matching client. The entire process typically takes 2 to 4 hours for a first-time setup.

How to create a virtual private server?

Install VirtualBox on your computer, create a new VM with at least 4 GB RAM and 40 GB storage, attach a FreeBSD ISO, and install the operating system. Set the network adapter to Bridged mode so the VM gets its own IP on your local network. Enable SSH access so you can manage the server remotely from your host machine.

How to create a server in a virtual machine?

After installing FreeBSD in your VM, upload Metin2 server files via SFTP, install required packages like MySQL and Python, import the database SQL files, configure each channel with the correct port numbers (13000 through 13004), and start the server processes in order: database connector, auth server, then channels. Test locally by connecting a matched client to the VM IP address.

How to host your own private server?

To make your Metin2 server public, forward TCP ports 11002 and 13000-13004 on your router to your VM IP address, update the client serverinfo.py to use your public IP, and distribute the modified client to your players. For better uptime and reliability, consider renting a VPS with FreeBSD support and running the same setup there.

Conclusion

Creating a Metin2 private server with a virtual machine is a rewarding project that gives you full creative control over one of the most beloved MMORPGs. The VM approach isolates your server environment, makes backups simple, and lets you experiment freely without risking your main system.

The setup breaks down into clear stages: build the FreeBSD VM, install the server files, configure the database, set up channels and ports, test locally, then go public. Each step has its own troubleshooting considerations, and the community on metin2.dev and Reddit is a valuable resource when you hit a wall.

Start small with a local testing server before going public. Get comfortable with the FreeBSD command line, the database structure, and the configuration files. Once you understand how the pieces fit together, customizing drop rates, adding maps, and building unique content becomes much more approachable.

Your next step is to download VirtualBox and a FreeBSD ISO, then follow the VirtualBox setup section above. Within a few hours, you can have your first Metin2 private server running inside a virtual machine, ready for testing, customization, and eventually, players.

Leave a Comment