Configure Linux

Lubuntu doesn't need that much once it's installed. Set up your internet connection. Update the operating system and restart a couple times so it detects your hardware and installs the appropriate drivers and updates.
​
We'll be using the terminal for most things now. It's a bit confusing or intimidating at first but once you get the hang of it it's very useful. You can open it using the keyboard shortcut Ctrl+Alt+T. Watch this tutorial to get handy with the terminal/command prompt (as its called in Windows).
​
Run these commands to fully update your system and package manager/repositories ("app stores"):
​
sudo apt update
sudo apt upgrade
​
Also you may need to install screen, to view the terminal output
​
sudo apt install screen
​
Here's some common commands you'll use.
​
sudo - Gives whatever you're doing permission to do basically anything (edit restricted files). It will ask for you password
apt - The "app store" for Ubuntu (repository, repo). Technically the package manager.
mkdir - "Make directory", creates a folder
cd - "Change directory", navigates to a folder within the terminal
cp - copies a file/folder (folders need the -r flag afterwards)
rm - removes/deletes a file/folder
mv - moves a file/folder, can be used to rename files too
chmod - changes permissions of a file/folder
chown - changes which user owns (has rights to) a file/folder
​
​
CREATING A USER
​
Quick explanation: files/folders in Linux are given permissions, meaning only certain applications/users can access it. You can choose if something is allowed to read/write/execute a file. Applications also run under their own user, to only allow access to certain files. Good for security, and in general not breaking things. We'll be setting up Minecraft to have its own user. This is that "minecraft" user I told you about earlier. You can name it anything you want, but for ease of use I just call the Minecraft user "minecraft".
​
We don’t want anything but the server client to have access to the files, so we set up a user for the server executable to run under.
​
First let’s set up a folder for our Minecraft server instances. Put your password in when asked. Open the terminal and run this command:
sudo mkdir /opt/minecraft
This will create a folder (directory) named minecraft in the folder /opt/.
​
Now create the user and give it permissions.
​
sudo useradd -m -r -d /opt/minecraft minecraft
​
Create a folder inside the Minecraft instance folder to house our first server. I'll call it paper. You can call it bedrock if that's the installation you're working on right now.
​
sudo mkdir /opt/minecraft/paper
​
Set the folder to allow only the user "minecraft" to read/write/execute inside of it. You will use this command often when you create a new server or add/edit files. If the server fails to run after changing a file/folder, THIS IS WHY! The server files must have access to all the files it needs, and this command will guarantee that.
​
sudo chown -R minecraft /opt/minecraft
​

JAVA
​
We’re going to need Java if we’re going to use a Java server (duh). Installing it on Linux isn’t as easy as it is on Windows, sadly. You have a few options as well – you can install the official Oracle Java-Runtime-Environment (JRE), or you can use OpenJDK, an optimized open-source option.
Personally, I had issues with OpenJDK (specifically with a modded Forge server), so I just use the official JRE. I encourage you to test and see which has better performance.
​
Double check which version of Java you'll need! 1.17 Minecraft now requires a much more updated version than all of the previous ones.
​
To install OpenJDK easily, open the terminal and run this command.
​
sudo apt install openjdk-8-jre
​
It'll ask if you're sure you want to install, type y and hit enter

After this step you can start configuring the server on the next page.
​
If you have issues, come back and try and different Java version. You can see which version is running by issuing this command
​
java -version
​
​

Head to Oracle’s Java website and grab the Linux x64 version.

You'll get the file in a .tar.gz archive (tarball) in your downloads folder. We need to extract this to a safe install directory. We can do that using the terminal.
​
Use file manager to navigate to the folder /opt/, or cd to it with terminal. You can open Tools and select Open Current Folder in Terminal.
​
cd /opt

We need to make a folder here, but due to file permissions that Linux has, we're not allowed. We need to use the terminal with superuser privileges.
​
Issue the following command (still cd'd to /opt/)
​
sudo mkdir java
​
This will make a directory named java in the folder /opt/. We will be extracting and moving our tarball (.tar.gz) here.
​
​

Now navigate to your downloads folder within terminal. You can do this 2 ways easily. cd to the directory, or close the terminal and open another from the file manager.
​
cd ~/Downloads
​
OR
​
cd /home/user/downloads
​
Where it says user, input the name of the user you created during install.
​
Now that you're in the downloads folder, run this command:
​
sudo tar -xvzf jre-8u241-linux-x64.tar.gz
​
​
*** You may not have update 241, change the number as needed ***
​
This will extract a folder named jre1.8.0_241 to your Downloads folder. We just need to copy it over to our install directory in /opt/
​
sudo cp -r jre1.8.0_241 /opt/java
​
This copies the Java folder into the directory. You can delete it from ~/Downloads once you're down. Verify it copied over.
​
Now we just need to tell Linux that we have another version of Java. Run this command, changing the version as needed.
​
sudo update-alternatives --install /usr/bin/java java /opt/java/jre1.8.0_241/bin/java 1
​
Updated! Verify the installation with this command:
​
java -version

BEDROCK
​
Bedrock is way easier to set up, but there's basically no customization.
​
All you need to use Bedrock is LibCurl. Install it from the terminal with this:
​
sudo apt install libcurl4-gnutls-dev
​
Approve any installations by typing "y" and hitting enter when prompted.
