Skip to content

Commit 9fda00f

Browse files
committed
Create initial version of "Minecraft Server on OCI" learning path
1 parent 93e655b commit 9fda00f

9 files changed

Lines changed: 180 additions & 42 deletions

File tree

content/learning-paths/servers-and-cloud-computing/minecraft-on-oci-always-free/how-to-1.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

content/learning-paths/servers-and-cloud-computing/minecraft-on-oci-always-free/how-to-2.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

content/learning-paths/servers-and-cloud-computing/minecraft-on-oci-always-free/OCI_change_shape.png renamed to content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/OCI_change_shape.png

File renamed without changes.

content/learning-paths/servers-and-cloud-computing/minecraft-on-oci-always-free/OCI_compute_dashboard.png renamed to content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/OCI_compute_dashboard.png

File renamed without changes.

content/learning-paths/servers-and-cloud-computing/minecraft-on-oci-always-free/_index.md renamed to content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/_index.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
title: Running a Minecraft server on OCI Always Free
2+
title: Running a Minecraft server on OCI A1 Arm64 instances
33

44
minutes_to_complete: 10
55

66
who_is_this_for: Learners who are new to OCI and want a guided path from “provisioning an instance” to “running a persistent Minecraft server”.
77

88
learning_objectives:
9-
- Provision an OCI Always Free Arm64 virtual machine instance suitable for running a Minecraft server
9+
- Provision an OCI A1 Arm64 virtual machine instance suitable for running a Minecraft server
1010
- Deploy and configure Minecraft server software
1111
- Expose the Minecraft service from OCI by editing the network policy for the instance
1212
- Connect to the running Minecraft server from the Minecraft client application
1313

1414
prerequisites:
15-
- Register an [OCI Always Free](https://www.oracle.com/cloud/free/) account
15+
- Complete the [Get started with Oracle Cloud Infrastructure](../csp/oci/) learning path
1616
- Install software that allows you to connect to a running instance over SSH
1717

1818
author: Craig Hardy <chardy@amperecomputing.com>
@@ -29,7 +29,6 @@ operatingsystems:
2929
- Linux
3030

3131

32-
3332
further_reading:
3433
- resource:
3534
title: How To Setup And Run A Free Minecraft Server In The Cloud

content/learning-paths/servers-and-cloud-computing/minecraft-on-oci-always-free/_next-steps.md renamed to content/learning-paths/servers-and-cloud-computing/minecraft-on-oci/_next-steps.md

File renamed without changes.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: Connecting the Minecraft client to the server
3+
weight: 4
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
## Connecting the Minecraft client to the server
10+
11+
### Opening the port for the Minecraft server
12+
13+
Before we connect to the Minecraft server, we will change the network policy to allow clients to
14+
connect to the Minecraft server over TCP port number 25565. To do this, we need to modify the
15+
networking settings for our instance in the OCI dashboard.
16+
17+
1. On the OCI Instances page, choose your Mnecraft server instance.
18+
2. In the Networking tab, click on the subnet attached to the instance.
19+
3. On the Security tab of the subnet page, choose the security list which is active for the instance
20+
(by default, this is called "Default Security List for vcn-xxxxxxxx")
21+
4. Under "Security rules", add a new Ingress rule (this means the rule applies to incoming traffic
22+
from outside the instance). Set "Source CIDR" to "0.0.0.0/0" (this means all IP addresses can
23+
connect), and set the "Destination Port Range" field to 25565.
24+
25+
You will also need to update your local firewall to allow connections to port 25565 on your instance.
26+
Reconnect to your instance with SSH, and run the following commands on Oracle Linux:
27+
```
28+
sudo firewall-cmd --permanent --add-port=25565/tcp
29+
sudo firewall-cmd --reload
30+
```
31+
or the following commands on Ubuntu:
32+
```
33+
sudo ufw allow 25565/tcp
34+
sudo ufw reload
35+
```
36+
37+
You should now be able to run your Minecraft server, log in as usual, and connect to your brand new server!
38+
39+
### Connecting to the server from the Minecraft client
40+
41+
1. Start your Minecraft client and log in as usual.
42+
2. Choose "Multiplayer" mode - read and click through the warning that third party servers are not operated
43+
by Mojang.
44+
3. To add your server to the menu of available servers, choose "Add server", name your server
45+
something meaningful ("My OCI server" for example) and put the IP address of your instance into the
46+
"Server Address" field.
47+
48+
You can now join the server and start building! You can also share the address with your friends to start
49+
building a shared world. Have fun!
50+
51+
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
title: Installing the Minecraft server
3+
weight: 3
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
## Installing the Minecraft server
10+
11+
### Installing the Java Runtime Environment
12+
13+
Before we install the Minecraft server, we need to make sure that there are some prerequisites installed.
14+
For the Minecraft 26 server or earlier, we will need Java 25. We can install this on Oracle Linux with:
15+
```
16+
sudo dnf install java-25-openjdk
17+
```
18+
and on Ubuntu or similar distributions, with
19+
```
20+
sudo apt install openjdk-25-jre
21+
```
22+
Since the Minecraft server starts on the command line, you may also want to install the `screen` or
23+
`tmux` utilities which allows commands to keep running after you disconnect from the server.
24+
25+
### Downloading and installing the Minecraft server
26+
27+
You can find the link for the latest version of the Minecraft server
28+
[on the Minecraft website](https://www.minecraft.net/en-us/download/server). Copy the link to
29+
`server.jar` from this page, and run the following command on your OCI instance to download it:
30+
```
31+
wget <paste URL to server.jar here>
32+
```
33+
34+
This will download server.jar from the Mojang website, and we will have a server.jar file on our OCI
35+
instance. To make it easier to keep track of different server versions, rename the server.jar file
36+
with a more meaningful name: `mv server.jar minecraft_server.26.2.jar`
37+
38+
To start the Minecraft server, run the command:
39+
```
40+
java -Xmx8G -Xms8G -jar minecraft_server.26.2.jar nogui
41+
```
42+
43+
This runs the server withough a graphical user interface, and allocates 8GB of memory to it. If you
44+
allocated less than this amount of memory to your instance, set this number to 3/4 of the memory that
45+
you allocated to the instance - the other operating system services need some memory too.
46+
47+
The first time you do this, the start-up will fail expectedly - a file called `eula.txt` is created
48+
in the local folder, and before you start the server, you first need to accept its terms of use. Open
49+
this file and follow the instructions to accept the terms and conditions. Running the server again
50+
after doing this will succeed, and you should see the following messages on the terminal, showing
51+
that the process has completed successfully (timestamps will be different at the start of the lines):
52+
53+
```
54+
[00:40:50] [Server thread/INFO]: Starting minecraft server version 26.2
55+
[00:40:50] [Server thread/INFO]: Loading properties
56+
[00:40:50] [Server thread/INFO]: Default game type: SURVIVAL
57+
[00:40:50] [Server thread/INFO]: Generating keypair
58+
[00:40:51] [Server thread/INFO]: Starting Minecraft server on *:25565
59+
[00:40:51] [Server thread/INFO]: Preparing level "world"
60+
[00:40:51] [Server thread/INFO]: Selecting global world spawn...
61+
[00:41:04] [Server thread/INFO]: Loading 0 persistent chunks...
62+
[00:41:04] [Server thread/INFO]: Preparing spawn area: 100%
63+
[00:41:04] [Server thread/INFO]: Time elapsed: 13099 ms
64+
[00:41:04] [Server thread/INFO]: Done (13.448s)! For help, type "help"
65+
[00:41:04] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld
66+
[00:41:04] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether
67+
[00:41:04] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end
68+
[00:41:04] [Server thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
69+
[00:41:04] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
70+
[00:41:04] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
71+
[00:41:04] [Server thread/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved
72+
```
73+
74+
Your Minecraft server is now running - you can connect to it with the Minecraft client.
75+
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: Starting an OCI A1 or A4 instance on OCI
3+
weight: 2
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
## Starting an OCI A4 or A1 instance
10+
11+
Once you have [created an OCI account](../csp/oci) and verified that you can start an
12+
instance, we will create an AmpereOne powered A4 instance and connect to it with SSH to
13+
install the Minecraft Java server.
14+
15+
1. Log on to [Oracle Cloud](https://cloud.oracle.com)
16+
2. On the OCI dashboard, navigate to Compute -> Instances to start a new instance
17+
3. "Create instance", then:
18+
* Choose one of the availability domains offered to you with A4 instances available
19+
* Select "Change shape", and set the instance type to Ampere VM.Standard.A4.Flex - if the
20+
A4.Flex instance type is not available in your preferred
21+
AD, try another, or choose VM.Standard.A1.Flex
22+
* Beside the instance type, click the small black arrow to open options. Allocate 2 OCPUs
23+
and 12 GB of memory to your instance
24+
* Choose "Oracle Linux 9" or one of the other available images of your choice under "Change
25+
image", then click Next
26+
4. Use the default security options, click "Next" to get to networking options
27+
5. Configure networking as follows:
28+
* When prompted, create a new Virtual Cloud Network (VCN) and public subnet if you do not
29+
have one already, or choose an existing VCN configuration
30+
* Select "Automatically assign public IPv4 address" to to allow you to access the instance
31+
remotely from your Minecraft server
32+
* Create an SSH key pair if you do not have one (and download both private and public keys),
33+
or upload the public key for an existing key pair so that you can connect to your instance
34+
over SSH once it is created
35+
5. Use default Storage options
36+
6. After verifying that the instance is correctly configured, choose "Create" to provision a new instance
37+
38+
It can take up to 2 minutes for your instance to be created. Once created, we can ensure that there is a
39+
public IP address to connect to by going to the "Networking" tab for the instance, clicking on the VNIC
40+
name - instance-yyyymmdd-HHmm by default - then IP administration, and editing the IP address associated
41+
with the instance and activating "Ephemeral public IP".
42+
43+
You should now be able to SSH into your instance with the command
44+
```
45+
ssh -i <path to private key> opc@<public IP address>
46+
```
47+
48+
Congratulations - you are connected to your OCI instance. Next we will install some prerequisites and
49+
download and start the Minecraft server.
50+
51+

0 commit comments

Comments
 (0)