Server Setup (Linux): Difference between revisions

no edit summary
(Initial commit)
 
No edit summary
Line 38:
Under Name, enter the name you want to give your server, this guide advises "GTNH-Server".
It should look something like this. If it does, click "buy now".
[[File:Hetzner Cloud Screenshot.png|thumb|center|Settings for the Hetzner Cloud instance]]
Click "Create and buy now".
In this screen, you will get an overview, including "Public IP". This is what you will use to connect to your server, both for SSH and for Minecraft. Save this somewhere.
Line 45:
This will connect to the (ubuntu) server you have created using the SSH protocol. For the purpose of this tutorial, this will be referred to as Connecting or SSH'ing.
Open PuTTY. Open the ssh field on the left, and click (do not open) "auth". Under `authentication parameters -> Private key file for authentitcation:`, click Browse. Here, you can select the private key file you just saved. (the .ppk file). It will enter the passphrase you set to unlock your key (if you set one).
[[File:Putty auth configuration.png||thumb|center]]
After doing this, scroll back up and click "Session" (the very top option) to go back to the initial view.
In here, under the `Host Name (or IP address)` enter `root@[ip]`, where \[ip\] is the public IP address that you have copied from the Hetzner Cloud screen.
Line 77:
=== Configuring the mods ===
This will contain the most basic configuration options, but feel free to add or edit other mods.
Basic terminology:
`ls` will list all the files in your current directory.
`cd [path]` will change directory to a certain directory, so `cd mods` will bring you into the mods folder (if you're in the GTNH-Server folder).
`cd ..` will change directory to one above your current one, so if you're in mods, `cd ..` will bring you back to GTNH-Server.
`nano [filename]` will open a text editor for the file. To find something in a file, do CTRL+W, [string you want to find], enter. to save and quit, do CTRL+O, enter, CTRL+X
`mv [file1] [file2]` will move file1 to file2, so e.g. if you wanna move a mod that you accidentally downloaded into the main GTNH-Server folder, `mv my-mod.jar mods/my-mod.jar` would fix that
`cp [file1] [file2]` will copy file2 to file2.
 
For turning off pollution, do `nano config/GregTech/GregTech.cfg`
scroll down until it says `pollution {`
the line below that, edit `B:EnablePollution=true` to `B:EnablePollution=false`
Save and quit (CTRL+O, enter, CTRL+X)
 
For changing serverutilities settings like chunk claiming etc:
`nano serverutilities/serverutilities.cfg`
under `commands {`, change all the commands you want working from `false` to `true`. if they are set to false, they won't work.
to enable backups, under `backups {` go to the line `B:enable_backups=false` and change it to `B:enable_backups=true`. you can also change the amount,backups to keep, timer, etc.
to enable anything in regards to homes, chunk loading, chunk claiming, etc. go to `ranks {` and change `B:enabled=false` to `B:enabled=true`
to enable chunk claiming, go to `world {` and edit `B:chunk_claiming=false` and `B:chunk_loading=false` to `B:chunk_claiming=true` and `B:chunk_loading=true` respectively.
 
If you want anything like homes, chunk loading, chunk claiming to work, you must now edit `nano serverutilities/server/ranks.txt`
Line 102:
 
=== Running the server ===
If you run the server on the command line that you are in now, it will turn off when you disconnect. To make the server stay up even when you aren't SSH'd into it, we will create a virtual terminal that keeps running using `screen`.
To create a new screen / connect to it, do `screen -R MC`. Press enter. This will create a screen called MC.
In this new screen, you want to run your server. Do this by doing `./startserver-java9.sh`. Wait AT THE VERY LEAST 5-10 minutes until the server has started.
Once the server has started, you can whitelist yourself (and your friends) by typing `/whitelist add [username]`
Then, you can connect to the server by connecting to the IP address in your GTNH client. This is the same IP address you used to SSH into.
To detach from the screen, do `CTRL+A, d`. To re-attach to the screen, do `screen -r MC`
To change anything about the config / settings / etc, make sure the server is off by attaching to the screen, typing `/stop`, and then when it's counting down from 12 to 1, CTRL+C before the countdown is over. Now you can make any edits, and then re-start the server by running `./serverstart-java9.sh` again
17

edits