D2GS guide - how to prepare GS

Threads that no longer serve a purpose. Read-only.
User avatar
aahz
Team Member
495 | 287
Great Popularity Badge
Has a thread with over 50.000 views
Great Love Badge
Earned over 100 cookies
Common Supporter Badge
Donated 1 time
Common Patron Badge
Patreon Contributor
Legendary Contribution Badge
Median XL Team Member
just some points, some work is actually needed to put everything together and make a guide from it...

Code: Select all

You need PC (fast enough, at least >=2 cores, >=2GHz, >=1GB RAM, with admin rights to set it up) that's ideally on 24/7, stable internet connection (upload at least 1-2 mbps, ~50kbps/player) with public static IP (access/possibility to set up port forwarding if you have router)
then you can follow http://pvpgn.wikia.com/wiki/D2GS_Server
- use version 1.13c
- to test,you can run d2gs.exe directly, but to use on server, you have to install service (run 'd2gssvc.exe -i' probably as an admin. or use install.bat, but that also loads d2gs.reg to registry!) and then use services to start/stop d2gs
- don't put it in program files folder if you have windows 7 or newer
- change some paths in .reg file if you have 64bit OS (google d2gs 64bit)
- in firewall/router it's enough to open ports 4000 and 8888
you can test it on my test realm - use D2CSIP,D2DBSIP = 79.127.207.67 and send me your IP (public, like http://www.whatismyip.com shows)
- it won't work until I put your IP in realm config, but you can test opened ports using some web tool (google it)
- also if you don't have realm patch, you have to use cLOD patch or single player patch from older version (6d or maybe later...but v7 single doesn't work on realm)

....

that's looks good - it should be in the processes...
now (when d2gs process is running) you should be able to use admin console - run telnet localhost 8888 (login/pass = admin/abcd123), there you can try status to see gs status - post it here pls

you have to set up port forward in your router for TCP port 4000 and 8888 - if you send me your router model I can tell you more, or maybe you'll figure it up
first your PC needs to have static local (probably 192.168...) IP - router assigns IPs dynamicaly using DHCP and you have to make lease for your IP static - it will pair that MAC address of your PC will get always the same IP (probably somwhere under LAN or DHCP)
then you set up port forwarding (probably under NAT or private server, maybe check http://portforward.com/ ) - two rules, first for port 4000, that everything that goes to TCP port 4000 is forwarded to local IP of your PC (previous step), next rule for port 8888
I can do it for you using teamviewer if you want...

...

OK, looks good
now download realm patch (patch_d2.mpq) from ...
tsw fix (D2MXLU_v10.zip) and vcredist (vcredist_2012.exe,probably also vcredist_x86.exe) from : http://mxl.vn.cz/tsw/d2gs/
instal both vcredist

1) stop d2gs
- safe way is shutdown command in admin console - when there are active players it's best to let them know some time before using admin console command:
CODE:
msg SYS #all "this game server will temporary shutdown in 5 minutes"


2) copy realm patch and unpack tsw fixes to d2gs directory

3) start d2gs
did you install service and use services to start it?

then you should test it in game - connect to 79.127.207.67 (use gateway editor or edit config if you use d2se or edit registry) and try creating game and playing for a while

...

change your D2CS and D2DBS IP in registry to: 37.221.195.51 and restart D2GS (try restarting using console command restart)
change console password (passwdcommand) to something else and send me new password
change GS number in MOTD to #5 - better to used unused number then adding another
tell me when it's ready, then I'll restart realm to add it
https://tsw.vn.cz - TSW realm stats (& Quests, NotArmory, HC chars)
User avatar
aahz
Team Member
495 | 287
Great Popularity Badge
Has a thread with over 50.000 views
Great Love Badge
Earned over 100 cookies
Common Supporter Badge
Donated 1 time
Common Patron Badge
Patreon Contributor
Legendary Contribution Badge
Median XL Team Member
I put all needed files here: http://mxl.vn.cz/tsw/d2gs/

http://mxl.vn.cz/tsw/d2gs/d2gs_complete.zip contains all files (DLLs, MPQs and D2GS files) needed to run GS (only realm patch is missing)
https://tsw.vn.cz - TSW realm stats (& Quests, NotArmory, HC chars)
User avatar
GregMXL
Team Member
10590 | 180
Legendary Posting Badge
Posted over 10.000 messages
Legendary Popularity Badge
Has a thread with over 250.000 views
Great Love Badge
Earned over 100 cookies
Great Supporter Badge
Donated 5 times
Legendary Contribution Badge
Median XL Team Member
Great Special Badge
Legend.
Aahz you are amazing! :mweed:
I don't mean to dwell...but I can't help myself.
CidHighwind
Prowler
16 | 4
Great Supporter Badge
Donated 5 times
Aahz, you forgot to change the passwords back to default when your zipped that "complete" package.
please copy/paste
"AdminPassword"="9e75a42100e1b9e0b5d3873045084fae699adcb0"
to reset it to default!

if you want i can compile your info, and the links into a more user friendly guide.
User avatar
aahz
Team Member
495 | 287
Great Popularity Badge
Has a thread with over 50.000 views
Great Love Badge
Earned over 100 cookies
Common Supporter Badge
Donated 1 time
Common Patron Badge
Patreon Contributor
Legendary Contribution Badge
Median XL Team Member
@CidHighwind : thanks! I changed it
That would be great :) go for it !
https://tsw.vn.cz - TSW realm stats (& Quests, NotArmory, HC chars)
CidHighwind
Prowler
16 | 4
Great Supporter Badge
Donated 5 times
So your Looking to host a MXL Game server.
Here's some basic information your going to need to know :)

Your going to need 24/7 up-time (idealy)
Your going to need a Stable internet connection (don't use BitTorrent or limit it's bandwidth use)
Your going to need your Internet connection to have at least 1-2 Mbps Upload (you can check this at speedtest.net)
Your going to need Dual core PC. 2GHz or better preferably (single thread performance matters)
Your going to need at least 1GB RAM (D2GS uses about 120MB)
And your going to need Admin Access, if you have a router, you'll also need to have access to port forwarding.


Now that we have the basic's, you're going to need the hosting software.

You can download the complete package here:* http://mxl.vn.cz/tsw/d2gs/d2gs_complete.zip

Or you can download the files separately here:* http://mxl.vn.cz/tsw/d2gs/

*Files do not include realm patch.

Now once you have that downloaded. we're going to have to set your port forwarding.

http://portforward.com/ has guides for most router versions to setup port forwarding. if you need help this is a good place to start!

You're going to need to forward ports 4000 and 8888
Once this is done, you'll want to go to a site such as https://www.whatismyip.com/
click on "what is my public address" (this is the IP address the realm server use's to connect people to your game)
You'll need to sent that public IP address to aahz so he can add your GS to the server list.


Now you're going to need to install the GS on your PC, so you can actually use it!
First!
If using windows higher then Windows 7 (or have problems even on Win7) make sure to do the following.

D2GS.exe must be run in compatibility mode for windows XP SP2 for all users :
Image

If using 64 bit systems, use the d2gs_x64.reg, if 32 bit then use d2gs.reg
Run the appropriate registry entry for your system.

Now you can either choose to run the install.bat or run the D2GSSVC with -i

You'll want to start your GS by using Services (Diablo II Close Game Server):
Image

Now that you've done that, your GS should be active!
If your added to the test realm you can now test your GS. and setup a new password for the control terminal
You can also check your log files to make sure your not getting any errors.

Now to change your password for the terminal you'll need to open a command window.

From here you'll want to type the following.

telnet localhost 8888

from here it will connect to your GS and ask you for a password. this is the default. abcd123
You wont be able to see any text typed. so just hit enter.

Now it should log you into your GS terminal! from here you can set the MOTD, and you'll also be able to change the password.
start by changing the password to whatever it is you want, but keep in mind aahz will also need this password when your added to the realm!.

Will edit further later, make the links clickable and such, feel free to add anything i might have missed/miss-worded.
User avatar
GregMXL
Team Member
10590 | 180
Legendary Posting Badge
Posted over 10.000 messages
Legendary Popularity Badge
Has a thread with over 250.000 views
Great Love Badge
Earned over 100 cookies
Great Supporter Badge
Donated 5 times
Legendary Contribution Badge
Median XL Team Member
Great Special Badge
Legend.
Nice job.
I don't mean to dwell...but I can't help myself.
User avatar
aahz
Team Member
495 | 287
Great Popularity Badge
Has a thread with over 50.000 views
Great Love Badge
Earned over 100 cookies
Common Supporter Badge
Donated 1 time
Common Patron Badge
Patreon Contributor
Legendary Contribution Badge
Median XL Team Member
@Cid: thanks

more info about shutting down (restarting) GS:
Question, when I have to restart my computer, what do I do? I was planning on restarting it once a week or every other week on Monday afternoon. What do I type in the cmd? Just Shutdown 900 for fifteen minutes, or should I send a msg or what?

It's best if you first send message, because I think (not 100% sure) once you initiate shutdown players cannot join so to give them enough time to mull items before...
best would be something like this:

Code: Select all

msg SYS #all "this game server (GS8) will initiate shutdown in 10 minutes"
(wait 5 min)
msg SYS #all "this game server (GS8) will initiate shutdown in 5 minutes"
(wait 5 min)
shutdown 300


compatibility of D2GS.exe should be set to WinXP SP2 and you should click on Change settings for all users because when it's running via services it runs under SYSTEM user and not under user account.
https://tsw.vn.cz - TSW realm stats (& Quests, NotArmory, HC chars)
v1nc3nt
Cultist
23 | 7
Common Supporter Badge
Donated 1 time

Some information regarding MultiCpuMask


I couldn't find any information concerning this setting on the forum and changing it helped a lot with the occasional lag.

Use the following setting depending on your sever:

Number of core                      Command to excecute
     1 Core                                    setcpumask 1
     2 Cores                                   setcpumask 3
     4 Cores                                    setcpumask 15
     8 Cores                                    setcpumask 255
    16 Cores                                   setcpumask 65535

You can find extra information on this website http://linux.die.net/man/1/taskset ( Thanks to Aahz )
If you do not understand this or want extra information you can PM me

Concerning Windows Server 2012


On Windows Server 2012, the service seem the be unable to start properly unless I'm changing the compatibility settings on D2loader to Windows XP SP2 on all users aswell.
User avatar
Taem
Necrobot
2475 | 151
Common Posting Badge
Posted over 1.000 messages
Legendary Popularity Badge
Has a thread with over 250.000 views
Great Love Badge
Earned over 100 cookies
Great Supporter Badge
Donated 5 times
So this is only for Linux-based systems? When setting up my server, I saw there were instructions for setting up multi core if you are the one running the realm, but not necessarily for individual servers. I believe my server is quad core, and wonder if I could take advantage of this with the server.

Regarding Windows, I've noticed it always pays to install out of Program Files, set entire folder to compatibility mode for Windows XP, and give full admin rights to all .exe files and you should have no issues.