Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Perfect World 1.4.1 in docker with ubuntu 22.04

Joined
Jul 17, 2007
Messages
665
Reaction score
104
Hi, i repacked my server and this time i use docker for it :)

Why docker?
- it use shared resource (unlike VirtualBox where you must give from your ram, cpu, hard drive etc)
- use less memory
- less used disk space also it is not constant because it use your os hard drive flexible way
- faster setup, since you not need to worry about install ubuntu and setup too much
- forget the ssh for file exchange, use docker volume (shared folder from host, which accessible from docker container)

Pro in the pack:
- latest ubuntu (22.04)
- latest mariaDB (instead of mysql)
- php is the latest php (8)
- java openjdk 11 (latest)

Requirement:
- Windows: install Docker Desktop
- Linux: install docker and docker

How it is works
- Pull the latest (22.04) ubuntu image
- Run the pulled image as container (with volumes)
- run my install_into_docker.sh which setup everything
- check your IP and update in the client and play
- now you can commit the docker container (check in docker documents) and later you can start the container from commited image in few second when u want use it again
* note do not forget to mount the folders for db and sql db

Very basic usage
Step1:
install the docker:

Step2:
start container from windows:

- C:\MyFolderInWindows: your shared folder from windows what you will mount into the container
- /home/pw: your above folder content will be mounted inside the ubuntu container into the this folder
- pw-u22: container name, you can give different name if you wish, it helps to reference to the running container
- the apache/php port in your windows will be 8081, you can get the container IP when you use ipconfig in windows then use the port with it, example: 172.28.192.1:8081/pwAdmin, you must use the ip for the client as well
- ubuntu:jammy: name of the latest ubuntu
- /bin/bash: container entrypoint, this means when you type exit inside the container then it will close the container as well

Code:
docker run -it --rm -v C:\MyFolderInWindows:/home/pw --name pw-u22 -p 8080:8080 -p 29000:29000 -p 8081:80 -p 3306:3306 --privileged ubuntu:jammy /bin/bash


start container from linux:
Very similar to windows, biggest difference is the linux allow you to use container on host network, this means all port will be accessable same way as your host, if your host machine is on lan and have example this ip: 192.168.1.106 then you can access the container with same ip, so you access the web and use same ip for the client too and accessable from the other lan users too

Code:
docker run -it --rm -v /home/myuser/myhostsharedfolder:/home/pw --name pw-u22 --net=host --privileged ubuntu:jammy /bin/bash

Step3:
- download the file and copy your host folder which you share with the container
- inside the container go and execute (installation should takes minutes and since also it will download the server files based on your internet speed too)
- enter into the root folder and start the server
Code:
cd /home/pw
./install_into_docker.sh
cd /root
startip.sh
* this install everything which needed (also download and setup the server too), create an admin for your server, install and setup the web as well, check the install_into_docker.sh
Step4:

- download the
- update the client ip in server list and start it

Server and script:

1702067502648 - Perfect World 1.4.1 in docker with ubuntu 22.04 - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Aug 19, 2013
Messages
11
Reaction score
1
seems like I was able to install it successfully, but in the pwAdmin webpage the Wodan server is offline. I'm trying to connect to the server using the IP address I use to access the pwAdmin, (and modified the server list).
Any idea?

seems like I was able to install it successfully, but in the pwAdmin webpage the Wodan server is offline. I'm trying to connect to the server using the IP address I use to access the pwAdmin, (and modified the server list).
Any idea?
never mind, it does works. I did modified the wrong serverlist.txt
 
Last edited:
Initiate Mage
Joined
Dec 28, 2023
Messages
2
Reaction score
1
I have a problem with the pwAdmin web page. I can create a new account and log in, but I cannot change the account data afterwards (saving gives an error) or send items with the item builder (I am using the game master account that was automatically created).
When I try to send an item, it gives "No permission!" error from sendpackets.php file.
When I try to save the user data, it gives Internal Server Error 500 error from accounts.js file (at xmlhttp.send(myJSON).

What could cause this problem? I can play the game with the client, I can create new accounts with the pwAdmin, but I cannot update other stuff on the pwAdmin page.

Should I change some IPs somewhere? I did set an IP with the startip.sh but is there something else to be done that was not mentioned here?
What does this mean: "* note do not forget to mount the folders for db and sql db". Does it need to be done manually? How and where?

Has the pwAdmin specific pw server/client version it works with? I did not upgrade or downgrade the client that I downloaded from the link in the start post.

I have a problem with the pwAdmin web page. I can create a new account and log in, but I cannot change the account data afterwards (saving gives an error) or send items with the item builder (I am using the game master account that was automatically created).
When I try to send an item, it gives "No permission!" error from sendpackets.php file.
When I try to save the user data, it gives Internal Server Error 500 error from accounts.js file (at xmlhttp.send(myJSON).

What could cause this problem? I can play the game with the client, I can create new accounts with the pwAdmin, but I cannot update other stuff on the pwAdmin page.

Should I change some IPs somewhere? I did set an IP with the startip.sh but is there something else to be done that was not mentioned here?
What does this mean: "* note do not forget to mount the folders for db and sql db". Does it need to be done manually? How and where?

Has the pwAdmin specific pw server/client version it works with? I did not upgrade or downgrade the client that I downloaded from the link in the start post.

Okay, I think I found the problem. The VerifyAdmin function in pwAdmin/basefunc.php had a bug on line 85.

PHP:
else if ($PassType == 3){
    $Salt1 = "0x".md5($username.$password);
    $Salt2 = "0x".$AdminPw;                   
    if ($Salt1==$Salt2) {
        $rValue=true;
    }               
}

The $Salt2 should not have "0x" string added to it because the $AdminPw already has it. So, I removed it (the changed line is now $Salt2 = $AdminPw; ).

Now the pwAdmin page works properly, I can send items and manage users etc.
 
Last edited:
Joined
Jul 17, 2007
Messages
665
Reaction score
104
I have a problem with the pwAdmin web page. I can create a new account and log in, but I cannot change the account data afterwards (saving gives an error) or send items with the item builder (I am using the game master account that was automatically created).
When I try to send an item, it gives "No permission!" error from sendpackets.php file.
When I try to save the user data, it gives Internal Server Error 500 error from accounts.js file (at xmlhttp.send(myJSON).

What could cause this problem? I can play the game with the client, I can create new accounts with the pwAdmin, but I cannot update other stuff on the pwAdmin page.

Should I change some IPs somewhere? I did set an IP with the startip.sh but is there something else to be done that was not mentioned here?
What does this mean: "* note do not forget to mount the folders for db and sql db". Does it need to be done manually? How and where?

Has the pwAdmin specific pw server/client version it works with? I did not upgrade or downgrade the client that I downloaded from the link in the start post.



Okay, I think I found the problem. The VerifyAdmin function in pwAdmin/basefunc.php had a bug on line 85.

PHP:
else if ($PassType == 3){
    $Salt1 = "0x".md5($username.$password);
    $Salt2 = "0x".$AdminPw;                  
    if ($Salt1==$Salt2) {
        $rValue=true;
    }              
}

The $Salt2 should not have "0x" string added to it because the $AdminPw already has it. So, I removed it (the changed line is now $Salt2 = $AdminPw; ).

Now the pwAdmin page works properly, I can send items and manage users etc.
sorry i did some tests there with the other encryption to and i messed a bit, maybe can u create a pull quest on github and i accept it :)
 
Newbie Spellweaver
Joined
Jan 11, 2024
Messages
19
Reaction score
1
I get this error:

HTTP request sent, awaiting response... 404 Not Found
2024-01-20 21:30:39 ERROR 404: Not Found.

Extracting archive: PWServer141.7z
ERROR: PWServer141.7z

Can not open the file as archive

The PWServer141.7z file It is no longer available...
 
Joined
Jul 17, 2007
Messages
665
Reaction score
104
I get this error:

HTTP request sent, awaiting response... 404 Not Found
2024-01-20 21:30:39 ERROR 404: Not Found.

Extracting archive: PWServer141.7z
ERROR: PWServer141.7z

Can not open the file as archive

The PWServer141.7z file It is no longer available..

you need to download the most recent installation script, because when i fix something then i must repack it and upload again and newly uploaded file have different url, then i always update the install script too

here is the script + server files


and this is the last url for the server files url
 
Newbie Spellweaver
Joined
Jun 10, 2022
Messages
74
Reaction score
7
After a lot of suffering I managed to do it, but I don't know how to set an account as a GM, any tips?
 
Newbie Spellweaver
Joined
Jun 10, 2022
Messages
74
Reaction score
7
Last edited:
Joined
Jul 17, 2007
Messages
665
Reaction score
104
Newbie Spellweaver
Joined
Jun 10, 2022
Messages
74
Reaction score
7
open config.php and remove the 0x from the salt :)
I restarted the PC and lost everything. I did it again from 0 and managed to solve the problem, now I'm facing problems with gshop. thank you for your content shadow šŸ’š
 
Back
Top