TopGaming  

How to Set Up a Ragnarok Online Private Server Using Hercules Emulator

Follow this step-by-step guide to create a Ragnarok Online private server using the Hercules emulator.

Step 1: Install Prerequisites

Open your terminal and run the following commands to install the necessary tools:

sudo apt update
sudo apt install git gcc make mysql-server

Ensure the MySQL service is running:

sudo systemctl start mysql
sudo systemctl enable mysql

Step 2: Download the Hercules Emulator

Clone the Hercules repository to get the latest version of the emulator files:

git clone https://github.com/HerculesWS/Hercules.git
cd Hercules

Step 3: Configure MySQL Database

Log into MySQL to set up a new database and user for your server:

sudo mysql -u root -p

Inside MySQL, run the following commands:

CREATE DATABASE ragnarok;
CREATE USER 'ragnarok_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON ragnarok.* TO 'ragnarok_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 4: Configure the Emulator

Edit the following files in the conf directory:

  • char_athena.conf: Set MySQL credentials.
  • map_athena.conf: Configure IP address and ports.
  • inter_athena.conf: Configure database settings.

Step 5: Compile the Hercules Emulator

To compile the Hercules emulator, run:

make clean
make server

This process will create the necessary binaries to run the Ragnarok Online server.

Step 6: Download and Configure the Client

1. Download the Client: Obtain a compatible client version such as kRO or a pre-configured client.

2. Patch the Client: Use tools like NEMO to patch your client for direct server connection.

3. Edit the Client Info File: Update the server IP address and port to match those in map_athena.conf.

Step 7: Start the Server

Start each server component from the Hercules root directory:

./login-server
./char-server
./map-server

Each component should open in a new terminal window or screen session. Make sure there are no error messages.

Step 8: Test the Server

Log in to your Ragnarok Online client and test the server connection. To create a default admin account, use the following MySQL command:

INSERT INTO login (account_id, userid, user_pass, sex) VALUES (2000000, 'admin', 'password', 'S');

Replace 'admin' and 'password' with your preferred login credentials.