Introduction
Today, we’re diving into the exciting world of setting up your private server for Westward Journey Online II (大话西游). This guide, meticulously prepared based on community demand, provides a comprehensive walkthrough for both Android and Apple platforms. This non-pay-to-win server version includes popular features like the Ladder, Star Arrays, and the Eight Trigrams gameplay. Best of all, it comes with a built-in GM (Game Master) backend, giving you ultimate control. Let’s embark on this journey to relive the classic 西游 adventure!
This tutorial will guide you through the process of setting up your own Westward Journey Online II server, allowing you to experience the game in a unique and customizable way. For those seeking the game link and source code, follow my official WeChat account echeverra and message “大话西游“. For the GM backend, send “大话西游GM” for free access. The server is under continuous maintenance, ensuring a stable and enjoyable experience.
If you’re interested in exploring more GM games, check out my collection: GM Games Compilation.
Here are some in-game screenshots to give you a sneak peek:
Server Setup Guide
1. Prerequisites
To set up your Westward Journey Online II server, you’ll need the following:
- Linux Server: A Linux server is essential. CentOS 7.6 is recommended for its stability. Consider using cloud providers like Tencent Cloud Lightweight Application Server for cost-effectiveness.
- Game Source Code: Obtain the game source code by following my WeChat account echeverra and sending “大话西游“.
The server requires approximately 1.6GB of RAM. Client updates and bandwidth usage are minimal, making the server requirements relatively low.
Personal Note: I’m finally putting my old 1-core, 2GB RAM, 1Mbps bandwidth Alibaba Cloud server to good use! Bought it back in 2021 and renewed it until 2027, but the bandwidth was too limiting until now. Rest assured, I’ll be upgrading the bandwidth to ensure a smoother gaming experience for everyone.
2. Installing Baota Panel and Environment
Baota Panel (also known as BT Panel) is a user-friendly server management software. Install it using the following command:
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
After installation, log in to Baota Panel using the provided credentials. Within the Baota Panel app store, install these software components:
- Web Server: Nginx 1.18
- Database: MySQL 5.7
- Programming Language: PHP 7.3
- Database: Redis 7.2
- Database Management Tool: phpMyAdmin 4.9
3. Opening Ports
For simplicity, we will open all ports (1-65535). If you’re using cloud services like Alibaba Cloud or Tencent Cloud, configure these rules in their respective security group or firewall settings.
Alibaba Cloud Security Group Configuration:
Tencent Cloud Firewall Configuration:
Finally, open all ports within Baota Panel’s security settings.
Baota Panel Port Configuration Screenshot
4. Disabling Firewall
Use Baota Panel’s terminal to execute the following commands to disable the firewall:
systemctl stop firewalld.service
systemctl disable firewalld.service
5. Uploading Source Code
Once you have the source code (dhxy.zip
), upload it to the root directory of your server using Baota Panel. If direct root directory uploads are restricted, upload to any directory and then move it to the root.
After uploading, move and extract the zip file to the root directory:
cd /
unzip dhxy.zip
Grant necessary permissions using:
chmod -R 777 /home
chmod -R 777 /www/wwwroot
6. Environment Configuration
Execute these commands to configure the environment:
cd /opt
tar zxvf environment.tar.gz
ln -s /opt/environment/pm2/bin/pm2 /usr/local/bin/pm2
Open the /etc/profile
file and add the following line at the end:
export PATH=$PATH:/opt/environment/node/bin
Install pm2:
npm install pm2
Install Java:
yum install java-1.8.0-openjdk.x86_64
Open /etc/profile
again and append these lines at the end:
#set java environment
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-2.el8_5.x86_64
PATH=$PATH:$JAVA_HOME/bin
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME CLASSPATH PATH
The final /etc/profile
file should look similar to this:
Apply the changes by running:
source /etc/profile
7. Modifying Source Code IP
The source code contains a default IP address (39.105.134.68) which needs to be replaced with your server’s IP address. Modify the following files:
\assets\res\import\0d\0d30c115-6a25-49e7-be89-2b19b49d4551.json
\assets\res\raw-assets\46\46b3519d-4628-485e-a43c-831795575083.manifest
\assets\res\raw-assets\fc\fcbfede2-3ed1-499d-8d37-8466cbfddaaa.manifest
\home\xy-server\conf\GameConf.ts
\www\wwwroot\dhxy\project.manifest
\www\wwwroot\dhxy\version.manifest
Use Baota Panel’s file editor to locate these files and use Ctrl+F
to batch replace the IP address.
8. Importing Database
First, modify the Redis password. In Baota Panel, navigate to the app store, find Redis in the “Installed” section, and set requirepass
to 123456
in the performance settings.
Save, reload configuration, and restart Redis.
Next, handle MySQL. In Baota Panel’s database section, change the root
password to 123456
.
In the Baota Panel app store, find MySQL in the “Installed” section, and in the configuration file, add the following line around line 26:
lower_case_table_names=1
Save, reload configuration, and restart MySQL.
Import the database using the command:
cd /home
./sk
Successful database synchronization will show the creation of two databases.
Database Security Note: While I often change database passwords for security, setting the database hostname to localhost
effectively prevents external connections, even if the password is known. So, not changing the default password can also be secure in this context.
9. Creating Website
Create a new website in Baota Panel with the domain IP:8088
and the root directory /www/wwwroot/dhxy
. Choose PHP version 7.3.
No additional configurations like pseudo-static settings or cross-site prevention are needed for this setup.
10. Starting the Game Server
With all the above steps completed, it’s time to start the game server! Use these commands:
cd /home/xy-server/
pm2 start dbserv.ts --time --interpreter /opt/environment/node/bin/ts-node
pm2 start gate.ts --time --interpreter /opt/environment/node/bin/ts-node
pm2 start game.ts --time --interpreter /opt/environment/node/bin/ts-node
These commands use pm2
for process management, which we’ll configure for auto-start later.
Check the service ports using:
netstat -lntp
Server Port Check Screenshot
11. Client Modification
11.1 Android Client
For the Android client, you need to modify three files. These files, along with pre-modified versions, are located in the 安卓修改
directory within the source code package:
\assets\res\import\0d\0d30c115-6a25-49e7-be89-2b19b49d4551.json
\assets\res\raw-assets\46\46b3519d-4628-485e-a43c-831795575083.manifest
\assets\res\raw-assets\fc\fcbfede2-3ed1-499d-8d37-8466cbfddaaa.manifest
Open these files with Notepad++ or a similar editor and replace the default IP (39.105.134.68) with your server IP. Open 大话西游.apk
using a compression tool like HaoZip, and drag the modified files back into their respective directories within the APK to replace them.
Sign the modified APK using ApkTool.
The game registration invitation code is 88888
. We’ll cover modifying this later. If you encounter installation issues after signing, try signing with MT Manager emulator.
11.2 iOS Client
Similarly, for the iOS client, modify these three files located in the 苹果修改
directory:
\Payload\wxxy-mobile.app\res\import\0d\0d30c115-6a25-49e7-be89-2b19b49d4551.json
\Payload\wxxy-mobile.app\res\raw-assets\46\46b3519d-4628-485e-a43c-831795575083.manifest
\Payload\wxxy-mobile.app\res\raw-assets\fc\fcbfede2-3ed1-499d-8d37-8466cbfddaaa.manifest
Open them with Notepad++ and replace the IP (39.105.134.68) with your server IP. Open 大话西游.ipa
with a compression tool like HaoZip and replace the files within the IPA.
After modification, use iMazing or similar tools to sign the IPA. Once signed, you can install it on your iOS device. Remember to trust the developer profile in Settings > General > Device Management to launch the app.
The game registration invitation code is again 88888
. Enter the game and enjoy!
12. Game Backend
There are two game backend interfaces:
The first is the built-in GM authorization backend: http://IP:8088/gm1
. Enter a character name and permission level (0-99, 999 for highest) to grant GM privileges. Permission levels are defined in homexy-servergamenetworkAgent.ts
.
The in-game GM tool is accessible by clicking the phoenix icon in the top-left corner.
The second backend is for setting recharge limits: http://IP:8088/gm2
. After granting GM access, set the recharge limit here. This limit dictates the maximum recharge amount you can set via the in-game GM tool.
Neither backend requires a GM code by default. You can develop a GM code feature for added security if needed.
13. Shutting Down the Server
To stop the game server, simply use the command:
pm2 stop all
Post-Setup Configurations
Disclaimer
All game resources provided are for educational and research purposes only. If there is any copyright infringement, please contact me, and I will remove the content immediately.
Running private servers for commercial gain is prohibited. This setup is intended for technical study. Please delete the server files within 24 hours of downloading or purchase a legitimate copy of the game.
As per the “Regulations on the Protection of Computer Software” effective January 1, 2002, using software by means of installation, display, transmission, or storage for the purpose of learning and researching the design ideas and principles contained in the software may be done without the permission of the software copyright holder and without payment of remuneration. We hope everyone uses this information responsibly for software research.
Modifying Registration Invitation Code
To change the registration invitation code, modify the code
field in the qy_agent
table within the xy_ga
database. The code cannot exceed 5 characters. Server restart is required for changes to take effect.
Game Announcement
Game announcements are managed through the text
field in the dhxy_comment
table in the xy_ga
database. Direct modification in phpMyAdmin might not work. Edit the /home/sql/xy_ga.sql
file and re-import the database for changes to apply.
Auto-Start on Boot
To configure the server to start automatically on boot, run:
pm2 startup
Then, save the current process list to ensure they auto-start on reboot:
pm2 save
Test the auto-start by rebooting your server and then checking the process list:
pm2 list
If all game processes are listed as running, auto-start is successfully configured.
About Westward Journey Online II
I’ve been searching for a stable Westward Journey Online II server version for a while. Recent versions like “缥缈西游” had crashing issues on iOS, and “天空西游” even deemed my iPhone 13 as too outdated!
Thanks to 雪糕 for recommending this version, which seems stable and has low server requirements – perfect for my old server.
Frankly, like Fantasy Westward Journey, I haven’t personally played Westward Journey Online II extensively. However, many friends are eager to play it. I understand the nostalgia and the value of these memories, similar to my own fondness for Arad. So, I had to create this guide.
Finally, thank you for your continued support and understanding regarding my infrequent updates. Wishing you a great gaming experience and all the best!
This concludes the Westward Journey Online II server setup guide. I hope it’s helpful. For any questions, reach out through my blog https://echeverra.cn or WeChat account echeverra.
Did you “get it”? 😉
(End)
Original article published on my blog: https://echeverra.cn/dhxy. Original content, please cite the source for reprints.
Follow my WeChat official account echeverra to learn and grow together! Resources and benefits are shared occasionally!