I25 Server Setup: Difference between revisions
From OuroDev
Plutocracy (talk | contribs) |
|||
(15 intermediate revisions by 2 users not shown) | |||
Line 5: | Line 5: | ||
* [[i25 account_server.cfg]] | * [[i25 account_server.cfg]] | ||
* [[i25 chat_server.cfg]] | * [[i25 chat_server.cfg]] | ||
* [[i25 turnstile_server.cfg]] | * [[i25 turnstile_server.cfg]] | ||
* [[i25 loadBalanceDefault.cfg]] | * [[i25 loadBalanceDefault.cfg]] | ||
* [[i25 loadBalanceShardSpecific.cfg]] | * [[i25 loadBalanceShardSpecific.cfg]] | ||
* [[i25 mission_server.cfg]] | |||
=== Setup Local Server === | === Setup Local Server === | ||
Line 25: | Line 25: | ||
: 6. Extract the dbschema.rar found in C:\CoH\dbschema.rar. | : 6. Extract the dbschema.rar found in C:\CoH\dbschema.rar. | ||
: 7. Open up SQL Server Management Studio (SSMS which you installed in the first step). Hit Connect on the screen that pops up to and connect with windows authentication. | : 7. Open up SQL Server Management Studio (SSMS which you installed in the first step). Hit Connect on the screen that pops up to and connect with windows authentication. | ||
:: [[File:SQL Connect.png|thumb| | :: [[File:SQL Connect.png|thumb|none]] | ||
: 8. We need to enable the sa login so that server can login to the database. | : 8. We need to enable the sa login so that server can login to the database. | ||
::; If you look to the left panel you will see the object explorer and your connection. Right click it and select properties. | ::; If you look to the left panel you will see the object explorer and your connection. Right click it and select properties. | ||
:::: [[File:SQL Properties.png|thumb| | :::: [[File:SQL Properties.png|thumb|none]] | ||
::: When this window comes up hit Security to the left and enable "sql server and windows authentication". Then click ok. | ::: When this window comes up hit Security to the left and enable "sql server and windows authentication". Then click ok. | ||
:::: [[File:SQL Security.png|thumb| | :::: [[File:SQL Security.png|thumb|none]] | ||
::: In the same panel you used before navigate to Security -> Logins then right click and enter properties the sa user. | ::: In the same panel you used before navigate to Security -> Logins then right click and enter properties the sa user. | ||
:::: [[File:SA Properties.png|thumb| | :::: [[File:SA Properties.png|thumb|none]] | ||
::: In this window set the password to the same password you set back at step 4 | ::: In this window set the password to the same password you set back at step 4 | ||
:::: [[File:Login Props.png|thumb| | :::: [[File:Login Props.png|thumb|none]] | ||
::: Choose Status from the left panel in this same window and set login to enabled and hit ok. | ::: Choose Status from the left panel in this same window and set login to enabled and hit ok. | ||
:::: [[File:Login Status.png|thumb| | :::: [[File:Login Status.png|thumb|none]] | ||
::: Right click the connection in the object explorer again and click Restart. | ::: Right click the connection in the object explorer again and click Restart. | ||
:::: [[File:SQL Restart.png|thumb| | :::: [[File:SQL Restart.png|thumb|none]] | ||
: 9. Click File, Select Open, navigate back to C:\CoH, open the dbschema folder, and select cohauc.sql in SQL Server Management Studio. | : 9. Click File, Select Open, navigate back to C:\CoH, open the dbschema folder, and select cohauc.sql in SQL Server Management Studio. | ||
:: [[File:SSMS File Open.png|thumb| | :: [[File:SSMS File Open.png|thumb|none]] | ||
:: [[File:SSMS Open DBSchema.png|thumb| | :: [[File:SSMS Open DBSchema.png|thumb|none]] | ||
: You will see these 2 lines at the top of the file opened | : You will see these 2 lines at the top of the file opened | ||
:: [[File:SSMS DBSchema SQL SRV STR.png|thumb| | :: [[File:SSMS DBSchema SQL SRV STR.png|thumb|none]] | ||
:* <syntaxhighlight lang="SQL" line='line'> ( NAME = N'cohauc', FILENAME = N'C:\mssql\MSSQL11.SCORE\MSSQL\DATA\cohauc.mdf' , SIZE = 157440KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ) </syntaxhighlight> | :* <syntaxhighlight lang="SQL" line='line'> ( NAME = N'cohauc', FILENAME = N'C:\mssql\MSSQL11.SCORE\MSSQL\DATA\cohauc.mdf' , SIZE = 157440KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ) </syntaxhighlight> | ||
:* <syntaxhighlight lang="SQL" line='line'> ( NAME = N'cohauc_log', FILENAME = N'C:\mssql\MSSQL11.SCORE\MSSQL\DATA\cohauc_log.ldf' , SIZE = 353216KB , MAXSIZE = 2048GB , FILEGROWTH = 10%) </syntaxhighlight> | :* <syntaxhighlight lang="SQL" line='line'> ( NAME = N'cohauc_log', FILENAME = N'C:\mssql\MSSQL11.SCORE\MSSQL\DATA\cohauc_log.ldf' , SIZE = 353216KB , MAXSIZE = 2048GB , FILEGROWTH = 10%) </syntaxhighlight> | ||
: 10. What you want to do is set the first part of these directory listings to where your SQL Server is located for example, I set my to D:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL because that is where my SQL Server is. So my would become: | : 10. What you want to do is set the first part of these directory listings to where your SQL Server is located for example, I set my to D:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL because that is where my SQL Server is. So my would become: | ||
:: [[File:SSMS DBSchema SQL SRV STR CORRECT.png|thumb| | :: [[File:SSMS DBSchema SQL SRV STR CORRECT.png|thumb|none]] | ||
:* <syntaxhighlight lang="SQL" line='line'> ( NAME = N'cohauc', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\DATA\cohauc.mdf' , SIZE = 157440KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ) </syntaxhighlight> | :* <syntaxhighlight lang="SQL" line='line'> ( NAME = N'cohauc', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\DATA\cohauc.mdf' , SIZE = 157440KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ) </syntaxhighlight> | ||
:* <syntaxhighlight lang="SQL" line='line'> ( NAME = N'cohauc_log', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\DATA\cohauc_log.ldf' , SIZE = 353216KB , MAXSIZE = 2048GB , FILEGROWTH = 10%) </syntaxhighlight> | :* <syntaxhighlight lang="SQL" line='line'> ( NAME = N'cohauc_log', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\DATA\cohauc_log.ldf' , SIZE = 353216KB , MAXSIZE = 2048GB , FILEGROWTH = 10%) </syntaxhighlight> | ||
: 11. Once done click the Execute button. And do this again for both the cohauth and cohchat. | : 11. Once done click the Execute button. And do this again for both the cohauth and cohchat. | ||
:: [[File:SSMS Execute.png|thumb| | :: [[File:SSMS Execute.png|thumb|none]] | ||
: 12. Open up ODBC Data Sources (32-bit). | : 12. Open up ODBC Data Sources (32-bit). | ||
:* Type 'ODBC' in Windows search, or run directly from C:\Windows\SysWOW64\odbcad32.exe | :* Type 'ODBC' in Windows search, or run directly from C:\Windows\SysWOW64\odbcad32.exe | ||
::* Do NOT use 64-bit! | ::* Do NOT use 64-bit! | ||
:* Click File DSN then click add to the right. | :* Click File DSN then click add to the right. | ||
:*: [[File:ODBC File DSN.png|thumb| | :*: [[File:ODBC File DSN.png|thumb|none]] | ||
:* Choose ODBC Driver 17 for SQL Server. Click Next. | :* Choose ODBC Driver 17 for SQL Server. Click Next. | ||
:*: [[File:ODBC Add Auth 1.png|thumb| | :*: [[File:ODBC Add Auth 1.png|thumb|none]] | ||
:* Enter AuthDB into the box and hit next then finish. | :* Enter AuthDB into the box and hit next then finish. | ||
:*: [[File:ODBC Add Auth 2.png|thumb| | :*: [[File:ODBC Add Auth 2.png|thumb|none]] | ||
:* It will then say something like ‘Which SQL Server would you like to connect to?’ | :* It will then say something like ‘Which SQL Server would you like to connect to?’ | ||
:** Type localhost\SQLEXPRESS and hit next. | :** Type localhost\SQLEXPRESS and hit next. | ||
:**: [[File:ODBC Add Auth 3.png|thumb| | :**: [[File:ODBC Add Auth 3.png|thumb|none]] | ||
:* Choose with SQL Auth enter sa into username and the password you use previously. | :* Choose with SQL Auth enter sa into username and the password you use previously. | ||
:*: [[File:ODBC Add Auth 4.png|thumb| | :*: [[File:ODBC Add Auth 4.png|thumb|none]] | ||
:* Tick choose change default database to and select cohauth and hit next. | :* Tick choose change default database to and select cohauth and hit next. | ||
:*: [[File:ODBC Add Auth 5.png|thumb| | :*: [[File:ODBC Add Auth 5.png|thumb|none]] | ||
:*: [[File:ODBC Add Auth 6.png|thumb| | :*: [[File:ODBC Add Auth 6.png|thumb|none]] | ||
:* After this hit finish then ‘Test Data source’ this will test the auth database connection to your main database if it successful congrats :D | :* After this hit finish then ‘Test Data source’ this will test the auth database connection to your main database if it successful congrats :D | ||
:*: [[File:ODBC Add Auth 7.png|thumb| | :*: [[File:ODBC Add Auth 7.png|thumb|none]] | ||
:*: [[File:ODBC Add Auth 8.png|thumb| | :*: [[File:ODBC Add Auth 8.png|thumb|none]] | ||
: 13. Once you have done that you can now start up your server. Navigate back to C:\CoH and create a bat file to start your server. | : 13. Once you have done that you can now start up your server. Navigate back to C:\CoH and create a bat file to start your server. | ||
Line 82: | Line 82: | ||
echo Starting DB Server | echo Starting DB Server | ||
START C:\coh\bin\dbserver.exe -zonelaunchers 1 | START C:\coh\bin\dbserver.exe -zonelaunchers 1 | ||
TIMEOUT 2 | TIMEOUT 2 | ||
echo Starting Launcher Server | echo Starting Launcher Server | ||
START C:\coh\bin\launcher64.exe -noversioncheck | START C:\coh\bin\launcher64.exe -noversioncheck | ||
TIMEOUT 2 | TIMEOUT 2 | ||
echo Everything should be launched! Go enjoy COH. | echo Everything should be launched! Go enjoy COH. | ||
TIMEOUT 10 | TIMEOUT 10 | ||
Line 127: | Line 116: | ||
== Patched AuthServer == | == Patched AuthServer == | ||
; This is a an optional step and shouldn't be required to get online play going. It can be skipped and returned to if actually needed. In 98% of cases it will not be needed. | |||
: [magnet:?xt=urn:btih:c5d7542b4a3cc0ec8f8d7dab028e67608f8a36f3&dn=patched-authserver.7z Patched AuthServer] | : [magnet:?xt=urn:btih:c5d7542b4a3cc0ec8f8d7dab028e67608f8a36f3&dn=patched-authserver.7z Patched AuthServer] | ||
: For use alongside the patched dbserver, reads first RouteIp in servers.cfg as externalIP and second RouteIp in servers.cfg as internal IP, rather than from cohauth | : For use alongside the patched dbserver, reads first RouteIp in servers.cfg as externalIP and second RouteIp in servers.cfg as internal IP, rather than from cohauth | ||
Line 147: | Line 137: | ||
== Setup TurnstileServer == | == Setup TurnstileServer == | ||
: Making the changes below will put your server into "production" mode. This will require things like mission_server.cfg to be created. | : Making the changes below will put your server into "production" mode. This will require things like mission_server.cfg to be created. | ||
:*This can be avoided by deleting '''texts.pigg''' from the server's piggs\ directory | |||
: First make sure your turnstile_server.cfg is correct. Below you'll find an example. | : First make sure your turnstile_server.cfg is correct. Below you'll find an example. | ||
;: Example turnstile_server.cfg | ;: Example turnstile_server.cfg | ||
Line 152: | Line 143: | ||
::: <syntaxhighlight lang="text"> DbServer 127.0.0.1 127.0.0.1 7000 Paragon 1 1</syntaxhighlight> | ::: <syntaxhighlight lang="text"> DbServer 127.0.0.1 127.0.0.1 7000 Paragon 1 1</syntaxhighlight> | ||
;: Example mission_server.cfg | ;: Example mission_server.cfg | ||
::: <syntaxhighlight lang="text"> Shard NAME WAN | ::: <syntaxhighlight lang="text"> Shard NAME WAN REGION</syntaxhighlight> | ||
::: <syntaxhighlight lang="text"> Shard Paragon 127.0.0.1 1 </syntaxhighlight> | ::: <syntaxhighlight lang="text"> Shard Paragon 127.0.0.1 1 </syntaxhighlight> | ||
: Next copy the "piggs" folder from your client to the server directory(C:\CoH\piggs) | : Next copy the "piggs" folder from your client to the server directory(C:\CoH\piggs) | ||
: At this point you should be able to run turnstileserver.exe. | : At this point you should be able to run turnstileserver.exe. | ||
; As I mentioned earlier in the guide you'll likely run into new issues with these changes. Like needing mission_server.cfg, -noreserved on chatserver, and a few other minor edits. | ; As I mentioned earlier in the guide you'll likely run into new issues with these changes. Like needing mission_server.cfg, -noreserved on chatserver, and a few other minor edits. | ||
: Putting the server into production mode will also change the version to 2400.201208211101.1. Your clients will need to update their connect parameter. | |||
:: -patchdir score -patchversion 2400.201208211101.1 -auth VMIPGOESHERE -console | |||
== Setup QueueServer == | |||
:; Queueserver may cause client disconnects and crashes on server selection, these issues are being looked into. | |||
: Add the following line as a new Server in [[I25 loadBalanceShardSpecific.cfg]], where {{ms|LANIP}} is the local network IP of the dbserver | |||
:: <syntaxhighlight lang="text">Command "queueserver.exe -db LANIP"</syntaxhighlight> | |||
: Additionally, add or change the following lines in [[I25 Servers.cfg]], where {{ms|MaxPlayers}} is the number of logged in accounts you want to allow | |||
:: {| | |||
<syntaxhighlight lang="text">UseQueueServer 1 | |||
MaxPlayers 100</syntaxhighlight> | |||
|} | |||
: Finally, {{ms|WaitingUserLimit}} in etc\config.txt controls the maximum number of players to allow into the queue | |||
:: <syntaxhighlight lang="text">WaitingUserLimit = 100</syntaxhighlight> |
Latest revision as of 18:26, 10 May 2019
Server Setup From Scratch
i25 Configuration Files
- i25 Servers.cfg
- i25 auction_server.cfg
- i25 account_server.cfg
- i25 chat_server.cfg
- i25 turnstile_server.cfg
- i25 loadBalanceDefault.cfg
- i25 loadBalanceShardSpecific.cfg
- i25 mission_server.cfg
Setup Local Server
- 1. Install SQL Server 2017 Express Edition
- 2. Choose Basic when installing and when given the option choose to install SSMS(SQL Server Manager Suite).
- 3. Move your i25 Binaries to C:\CoH
- 4. Navigate to C:\CoH\data\server\db
- 5. Open up auction_server.cfg(I25_auction_server.cfg), account_server.cfg(I25_account_server.cfg), chat_server.cfg(I25_chat_server.cfg), and servers.cfg(I25_Server.cfg).
- You can change the password to whatever you would like. For this example I will be just using "YOURL33TPASS!".
- You will see something like this.
SqlLogin "DRIVER={SQL Server Native Client 11.0};Server=NS319069\SCORE;Uid=sa;Pwd=FinallyFree!;"
- Change this to
SqlLogin "DRIVER={SQL Server Native Client 11.0};Server=localhost\SQLEXPRESS;Uid=sa;Pwd=YOURL33TPASS!;"
- While you have servers.cfg and auction_server.cfg open. Change all the ips to 127.0.0.1.
- You can change the password to whatever you would like. For this example I will be just using "YOURL33TPASS!".
- 6. Extract the dbschema.rar found in C:\CoH\dbschema.rar.
- 7. Open up SQL Server Management Studio (SSMS which you installed in the first step). Hit Connect on the screen that pops up to and connect with windows authentication.
- 8. We need to enable the sa login so that server can login to the database.
- If you look to the left panel you will see the object explorer and your connection. Right click it and select properties.
-
- When this window comes up hit Security to the left and enable "sql server and windows authentication". Then click ok.
- In the same panel you used before navigate to Security -> Logins then right click and enter properties the sa user.
- In this window set the password to the same password you set back at step 4
- Choose Status from the left panel in this same window and set login to enabled and hit ok.
- Right click the connection in the object explorer again and click Restart.
- 9. Click File, Select Open, navigate back to C:\CoH, open the dbschema folder, and select cohauc.sql in SQL Server Management Studio.
- You will see these 2 lines at the top of the file opened
( NAME = N'cohauc', FILENAME = N'C:\mssql\MSSQL11.SCORE\MSSQL\DATA\cohauc.mdf' , SIZE = 157440KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
( NAME = N'cohauc_log', FILENAME = N'C:\mssql\MSSQL11.SCORE\MSSQL\DATA\cohauc_log.ldf' , SIZE = 353216KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
- 10. What you want to do is set the first part of these directory listings to where your SQL Server is located for example, I set my to D:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL because that is where my SQL Server is. So my would become:
( NAME = N'cohauc', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\DATA\cohauc.mdf' , SIZE = 157440KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
( NAME = N'cohauc_log', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\DATA\cohauc_log.ldf' , SIZE = 353216KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
- 11. Once done click the Execute button. And do this again for both the cohauth and cohchat.
- 12. Open up ODBC Data Sources (32-bit).
- Type 'ODBC' in Windows search, or run directly from C:\Windows\SysWOW64\odbcad32.exe
- Do NOT use 64-bit!
- Click File DSN then click add to the right.
- Choose ODBC Driver 17 for SQL Server. Click Next.
- Enter AuthDB into the box and hit next then finish.
- It will then say something like ‘Which SQL Server would you like to connect to?’
- Type localhost\SQLEXPRESS and hit next.
- Type localhost\SQLEXPRESS and hit next.
- Choose with SQL Auth enter sa into username and the password you use previously.
- Tick choose change default database to and select cohauth and hit next.
- After this hit finish then ‘Test Data source’ this will test the auth database connection to your main database if it successful congrats :D
- 13. Once you have done that you can now start up your server. Navigate back to C:\CoH and create a bat file to start your server.
@echo off echo Starting Auth Server START C:\coh\bin\authserver.exe TIMEOUT 2 echo Starting DB Server START C:\coh\bin\dbserver.exe -zonelaunchers 1 TIMEOUT 2 echo Starting Launcher Server START C:\coh\bin\launcher64.exe -noversioncheck TIMEOUT 2 echo Everything should be launched! Go enjoy COH. TIMEOUT 10
- 14. Go to your City of Heroes folder and make a shortcut of score.exe.
- Add the string below to the shortcut if playing locally on the hosting machine.
score.exe -patchdir score -patchversion 2019.04.19 -auth 127.0.0.1 -noversioncheck -console
- Add the string below to the shortcut if playing over the network. Note you'll need the hosting machines IP for this. (CMD -> IPConfig)
score.exe -patchdir score -patchversion 2019.04.19 -auth <HOSTIPADDRESS> -noversioncheck -console
- Add the string below to the shortcut if playing locally on the hosting machine.
- 15. Login and Enjoy!
Port Forwards
- TCP Ports
- Port 11228
- UDP Ports
- Ports 18717 through 18917
Setup Internet Facing Server
- Patching the DBServer allows it to return the correct IP address for MapServers to the client.
- dbserver.exe needs to be patched to read its external IP from a config file, a patched version can be downloaded from here or from the following magnet link
dbserver.exe [MD5] c66842d15bc94f6b6b2a282331c01e3f | dbserver.exe [SHA1] 9ba7c9774de2f75cd72efb604c44c3a86cbd24eb
- From SQL Sever Manager Studio(SSMS) run the query below.
INSERT INTO cohauth.dbo.server (id, name, ip, inner_ip, ageLimit, pk_flag, server_group_id) VALUES (1, 'ShardName', 'Public IP', '127.0.0.1', 0, 0, 1);
- Replace the existing dbserver.exe with the patched one and add the RouteIp line to servers.cfg with your server's public IP.
RouteIp YOURPUBLICIPADDRESS
Patched AuthServer
- This is a an optional step and shouldn't be required to get online play going. It can be skipped and returned to if actually needed. In 98% of cases it will not be needed.
- Patched AuthServer
- For use alongside the patched dbserver, reads first RouteIp in servers.cfg as externalIP and second RouteIp in servers.cfg as internal IP, rather than from cohauth
- Patched authserver
MD5: kuF0O1e/K3iT6tcXKA0xmQ== | SHA1: +7IdIglCD1EEM9xNcZUyYRuZ9Ec= | SHA256: 7A370DAB25CBEA30A0BCA3333F6BBD971315604E98218B71BEDCC2F415918285
- Example configuration:
// First RouteIP is External (WAN) IP RouteIp 123.123.123.123 // Second RouteIP is Internal (LAN) IP RouteIp 192.168.0.0 // Uncomment the following line to use IPs from cohauth //AuthDBIP 1
Setup TurnstileServer
- Making the changes below will put your server into "production" mode. This will require things like mission_server.cfg to be created.
- This can be avoided by deleting texts.pigg from the server's piggs\ directory
- First make sure your turnstile_server.cfg is correct. Below you'll find an example.
- Example turnstile_server.cfg
-
DbServer LAN WAN 7000 ShardName ShardID ShardAuthID
DbServer 127.0.0.1 127.0.0.1 7000 Paragon 1 1
- Example mission_server.cfg
-
Shard NAME WAN REGION
Shard Paragon 127.0.0.1 1
- -patchdir score -patchversion 2400.201208211101.1 -auth VMIPGOESHERE -console
Setup QueueServer
- Queueserver may cause client disconnects and crashes on server selection, these issues are being looked into.
- Add the following line as a new Server in I25 loadBalanceShardSpecific.cfg, where
LANIP
is the local network IP of the dbserverCommand "queueserver.exe -db LANIP"
- Additionally, add or change the following lines in I25 Servers.cfg, where
MaxPlayers
is the number of logged in accounts you want to allow
UseQueueServer 1 MaxPlayers 100
- Finally,
WaitingUserLimit
in etc\config.txt controls the maximum number of players to allow into the queueWaitingUserLimit = 100