Server Setup (Linux, Oracle Cloud): Difference between revisions
Server Setup (Linux, Oracle Cloud) (view source)
Revision as of 15:09, 25 January 2024
, 5 months agoadd bit more detail
m (revision date.) |
ReikoBest2D (talk | contribs) m (add bit more detail) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 4:
* '''Latest Revision:''' February 2023, GTNH version 2.2.3.
Oracle Cloud is an attractive option as it offers a lot of space and processing power for no monthly fee. There are limitations; see [[#Warnings|Warnings]], below. The general overview for a Linux server is
</div>
Line 14:
</div>
===
<div align="justify">
This Linux setup uses an Oracle [https://blogs.oracle.com/developers/post/how-to-set-up-and-run-a-really-powerful-free-minecraft-server-in-the-cloud blogpost] about how to set up a server on their platform.
Line 35:
</div>
=== Set
==== Create an
<div align="justify">
This step is taken from the Oracle's [https://blogs.oracle.com/developers/post/how-to-set-up-and-run-a-really-powerful-free-minecraft-server-in-the-cloud manual], so check it out if you need more info. A concise version of it is given in this guide.
Line 67:
</div>
==== Set
<div align="justify">
When your Instance Details turns green and Running, click on the Subnet link in the Primary VNIC section. Then in Security Lists click on the only one that is there, the default one, then click on Add Ingress Rules.
Line 82:
</div>
==== Tweak the
<div align="justify">
In order to connect to the instance, you need a "shell" program. If you're on Windows, this guide suggests to install [https://git-scm.com/downloads Git Bash] for that.
Line 135:
</div>
=== Set up a GTNH
<div align="justify">
1. Download the server zip from here: http://downloads.gtnewhorizons.com/ServerPacks/
Line 191:
===Install a mod for backups===
<div align="justify">
The recommended mod for backups is server utilities.
*
Below is an example of how the process can go. Check if it's the most recent version of the mods before proceeding.
Line 201 ⟶ 200:
Below are the examples of both ways. Please use the <code>scp</code> option only if the <code>wget</code> one fails:
* Using <code>wget</code> (you can get the link by right-clicking on correct jar and choosing "Copy link adress" ): <syntaxhighlight lang="shell">
cd server_directory/mods
wget
</syntaxhighlight>
* Using <code>scp</code> : <syntaxhighlight lang="shell">
scp -i path_to_private_SSH_key
</syntaxhighlight>
Line 215 ⟶ 212:
<syntaxhighlight lang="output">
scp -i ~/.ssh/ssh-key-2022-09-07.key ~/Downloads/
</syntaxhighlight>
* scp is the command that stands for "secure copy",
*-i is the flag that says to use the file to identify youself, like we did with ssh,
*~/.ssh/ssh-key-2022-09-07.key is the example of the path to the key, ~ is the shortcut for you user folder,
*~/Downloads/
*opc@144.24.170.228:~/minecraft-server/mods/
Now you can launch your server again to check if the backup works.
Line 228 ⟶ 225:
A backup should be visible in the log immediately after the server is done loading.
The default frequency of the backups is once every two hours. To make the backups more frequent, open the config file that is created after the server is launched for the first time with the backup mods. The following steps use <code>vim</code> as the default text editor to edit <code>config.json</code> , you may use other text editor such as <code>nano</code> . A more detailed description of config can be found at [[ServerUtilities]].
<syntaxhighlight lang="bash">
cd your_instance/serverutilities/
vim
</syntaxhighlight>
Line 240 ⟶ 237:
#<code>backup_timer</code> default is 2.0, If you want to make a backup every 30 minutes, change the value from 2.0 to 0.5.
#<code>backups_to_keep</code> Change to keep more backups. When the number reaches the specified maximum, the oldest backup is deleted.
# <code>
#To exit vim and save the changes, press <code>:</code> then type <code>wq</code> and press <code>ENTER</code> , wq which means Write and Quit.
#If you get an error on writing changes into the file, check the file permissions. Although if the error is about that you can't write into the file and that's your default user, that likely means that you launched the server as root before, which can lead to many complications later, so please don't launch a server as root.
Line 257 ⟶ 254:
To start a backup manually, send the following command when you're on the server: <syntaxhighlight lang="text">
/
</syntaxhighlight>
Line 265 ⟶ 262:
===Run the server===
<div align="justify">
So, you can launch the server, but when you leave the ssh connection, the server closes. That happens because
To make the server run without you being connected to the ssh, one of the solutions is to use the "screen" command.
Line 293 ⟶ 290:
There are more options that you can use with this command, such as multiple named screens. You can check [https://linuxize.com/post/how-to-use-linux-screen/ this] manual for the instructions. or run the command <code>man screen</code>.
</div>
===Improvements===
====More space====
|