Server Setup (Windows, Local Host): Difference between revisions
Beginning split of Server Setup, please stand by. |
m Moving the "Server Files" section to Server Setup, as it's universal. |
||
Line 9: | Line 9: | ||
* [[Server_Setup#Whitelisting_Players|Whitelisting Players]] |
* [[Server_Setup#Whitelisting_Players|Whitelisting Players]] |
||
* [[Server_Setup#Server_Backups|Installing a Backup Option]] |
* [[Server_Setup#Server_Backups|Installing a Backup Option]] |
||
</div> |
|||
=== Downloading Files === |
|||
<div align="justify"> |
|||
⚫ | |||
#Download the server pack from here: http://downloads.gtnewhorizons.com/ServerPacks/ |
|||
#Download Prism from here: https://prismlauncher.org/download/ |
|||
#Download the client pack from here: http://downloads.gtnewhorizons.com/Multi_mc_downloads/ |
|||
There are two versions of the pack, both for server and client. ''Unless you have a reason not to, you should use the Java 17+ version'' as it has better garbage collection. The only major reason not to use J17+ for a server is for Thermos compatibility - and if you know what Thermos is, you know how to setup your own server likely. |
|||
You can find and install the latest version of Java here: https://adoptium.net/ - any Java build of 17 or later should work, and you may already have one installed. |
|||
''Note: Please reference this guide on how to setup and install our pack in Prism (this guide will only cover the server portion.): [[Installing and Migrating]]'' |
|||
</div> |
</div> |
||
Line 29: | Line 15: | ||
<div align="justify"> |
<div align="justify"> |
||
[[File:Extract Server Files.png|alt=Extract Server Files Image|none|thumb|Right click on the server files ZIP archive and choose "Extract All..."]] |
[[File:Extract Server Files.png|alt=Extract Server Files Image|none|thumb|Right click on the server files ZIP archive and choose "Extract All..."]] |
||
[[File:Extraction Destination.png|alt=Extraction Destination Image|none|thumb| |
[[File:Extraction Destination.png|alt=Extraction Destination Image|none|thumb| |
||
⚫ | For the purpose of this guide we will be utilizing our [[Server_Setup#Server_Files|hosted repositories]] as well as the [[https://prismlauncher.org/|Prism launcher]]. The download links on [[Server Setup]] are compatible with each other. If you follow this guide and fail to connect, your launcher may have downloaded the latest client pack instead of a server pack. See [[Installing and Migrating]] if unsure how to install Prism Launcher.'' |
||
Choose a name for the server folder and hit extract. Whether or not you uncheck the "Show extracted files when complete" checkbox is up to you.''Note: It is highly recommended to save the server files somewhere that is NOT on OneDrive (so, not the desktop but something like C:\GTNH or similar).'']] |
|||
</div> |
</div> |
||
Revision as of 06:46, 13 December 2023
This guide focuses on setting up a local server on the same machine as the client running Windows OS. Return to Server Setup for other operating systems and configurations. Prism is used as the server software, running Java 17+.
Latest Revision: December 2023 version 2.4.0
Server Setup
Extract Server Files
![Extract Server Files Image](http://static.miraheze.org/gtnhwiki/thumb/f/fc/Extract_Server_Files.png/300px-Extract_Server_Files.png)
![Extraction Destination Image](http://static.miraheze.org/gtnhwiki/thumb/b/b3/Extraction_Destination.png/300px-Extraction_Destination.png)
Agree to EULA
![File Content](http://static.miraheze.org/gtnhwiki/thumb/d/de/EULA.txt_File_Content.png/300px-EULA.txt_File_Content.png)
By setting the text of the EULA.txt file to true you are agreeing to the following EULA.
You can edit the startserver-java9.bat
file if you want to change the memory usage from the default 6G (six gigabytes) - change both cases of "6G" to whatever memory amount you want. GT:NH will not run with less than 4G, and 6G should be a fine default until later.
Run the Server
startserver-java9.bat
![Firewall Prompt](http://static.miraheze.org/gtnhwiki/thumb/d/d9/Firewall_Warning.png/300px-Firewall_Warning.png)
Note: It may take quite some time for the server to startup.
If at this point you get an error like "Error: Could not find or load main class @java9args.txt
" and it immediately exits, your default Java version is probably Java 8. You can either change the default system Java, or edit startserver9.bat
and replace java
with the full path to the correct Java in quotes, something like "C:\Program Files\Java\jdk-17.0.6\bin\java.exe"
- if you can't find it, Prism or MultiMC may be able to find the list of installed Javas (edit a client instance, select Settings, click Auto-Detect).
![Console Window Image](http://static.miraheze.org/gtnhwiki/thumb/5/5c/Terminal_Window.png/300px-Terminal_Window.png)
stop
Danger!
stop
. Doing so can corrupt your world making it unplayable.
Next Steps
The server should now be functional, but there's still some things to set up. These next steps are universal regardless of platform or launcher, so head back to Server Setup. It's vital to choose and install a backup mod, because unlike SP the server pack does not ship with one included.