How To Host A Minecraft Game On A Linux Virtual Machine

How To Host A Minecraft Game On A Linux Virtual Machine


It is a waste to dedicate a whole Linux server or PC to running a Minecraft game. If you're looking to get a quick Minecraft server running, it's much better to host it from a Virtual machine.

There are many choices for easy virtualization for modern computers. Oracle VM VirtualBox has the best features. It's cross-platform, easy-to-use, and it's free. We will be explaining how Oracle VirtualBox can be used to host a Minecraft server on a Linux virtual computer.

Install VirtualBox

This section will show you how to install Oracle VirtualBox. Scroll down and follow the instructions to get the app working on Linux.

Mac/Windows

Interested in hosting your virtual Linux-powered Minecraft server on a Mac or Windows PC? VirtualBox is required in order to host your virtual Linux-powered Minecraft server on a Mac or Windows PC.

Wolf script

VirtualBox can be installed on either a Mac or Windows computer. Both operating systems do not require that the user interact with a terminal. Instead, head over to the official Vbox website, find the download option for your Mac or Windows PC and download the installer file.

Once the VirtualBox installer is done downloading, go through the process of installing the program to your computer and move on to the next step of the tutorial!

VirtualBox for Ubuntu is available in the "Multiverse” repository. You must enable it with:

Once the repo is installed on Ubuntu, run the Ubuntu Update command.

Finally, install Virtualbox on Ubuntu with the apt command.

Debian

VirtualBox on Debian is now available in the Contributor repositories. This repo is not available by default. You will need to enable it first. Here's how you do it.

Step 1: Open the source file in Nano.

Step 2: Find all of the lines that start with "deb." Add "contrib" at the end of each line. If you need proprietary libraries or programs, you may also want to add "non-free".

Step 3: Run update to add the new "contrib", and "nonfree" lines.

Now that "Contrib" is up and running on your Debian PC, you'll be able to install the VirtualBox app with the following Apt-get command easily.

Arch Linux

Virtualbox can be installed and used on Arch Linux if "Community" is enabled in your Pacman configuration. Not sure how to enable it. Follow the steps below.

Step 1: Open Pacman.conf in Nano. Scroll through the page to find the "Community” section.

Step 2: Move the # symbol between "Community" (and the lines below)

Step 3: Save Nano with Ctrl + O. Then, exit with Ctrl + X and return to the terminal. Once you have returned to the terminal resync Pacman.

Step 4: Once "Community" is up and running, VirtualBox can be installed on Arch with:

Fedora

Fedora's software repositories can be downloaded open-source, and the developers intend to keep it that manner. VirtualBox is not available on Fedora. You can however get it to work if you enable RPM Fusion software.

These DNF commands can be used to enable RPM fusion.

Note: replace the X with the release number of Fedora you are currently using.

After RPM Fusion is installed, you can now install Virtualbox in Fedora

OpenSUSE

VirtualBox is very simple to install for SUSE users. Simply open a terminal, and then run the following Zypper command.

Generic Linux

VirtualBox has a standalone, downloadable binary for Linux systems that do not have VirtualBox in their software sources. To download it, visit the download page. Once you have downloaded the latest version, run it to begin the installation.

VirtualBox Ubuntu Server

After VirtualBox has finished installing, it is time for you to set up Ubuntu server. Pre-setup appliances are the fastest way to install and configure Ubuntu server in VirtualBox.

Instructions to download for Mac/PC

Head over to the official download page, click on the "VirtualBox" tab. Locate "Download" on the page to download Ubuntu Server 18.04.1LTS.

Ubuntu Server 18.10 must be used instead of 18.04.1. The networking on 18.10 doesn't work very well in the latest OSimages release for VirtualBox.

You will need 7z (or another decompression tool that can deal with the 7z archive format).

Instructions for downloading Linux

You can download the Ubutnu server images by running the following command:

To enable 7zip files to be extracted by your Linux system, install the P7zip utility. Then, extract it with your file manager by right-clicking at 181064.7z then selecting "extract."

After extracting the files, open VirtualBox, click "New", type Ubuntu Server as the name, then set the RAM to 2048MB.

After setting the RAM, go to the "Hard disk" page and select "Use an existing virtual hard disk file." From there, browse for "Ubuntu 18.04.1 Server (64bit).vdi" and click "open" to assign it to your VM.

Click "create to finish the VM creation."

Tweaking the network settings

Right-click on the Ubuntu Server VM within VirtualBox. Next, click on "Settings", to open the machine's settings area.

Once in the settings area, click on "Network." Next, change the "Adapter" field to "Bridged Adapter."

Install the Minecraft Server

The VM is working. Now it is time for the server to go live. Launch the Ubuntu Server VM (right-click and select "Start") and follow the step-by-step instructions below.

Step 1 - Log in to the VM and enter the user details.

username: osboxes

password: osboxes.org

Step 2: Install the Java runtime environment on your Ubuntu server.

Step 3: Download Minecraft Server Java Edition (Java Edition) using Wget.

Step 4: Run your Minecraft server with:

Easy Minecraft Server startup

To start up your Minecraft server more easily, set up a script in the VM terminal with the commands below.

Next, you can run the server at anytime with:

To connect to your Minecraft server VM, you'll need to know the IP address of the machine. To find out the IP address of your Minecraft server VM, please refer to this tutorial.

Once you have the IPv4 IP address, turn off Minecraft and ensure that your PC is connected with the same network as the VM. Then, click "Add server" in Multiplayer.

Report Page