How To Host A Minecraft Game On A Linux Virtual Machine

From Marvel vs DC
Jump to: navigation, search

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 options available for easy virtualization of 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 these instructions to install the app on your Linux PC.



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.



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, go to the official Vbox website and find the download option for Windows or Mac. Then, download the installer file.



Once VirtualBox is downloaded, follow the instructions to install the program to your computer.



VirtualBox for Ubuntu is available in the "Multiverse” repository. To install it, you will need to enable it with the following:



Once the repo is added to your Ubuntu system, run the update command on Ubuntu.



Finally, use the apt command to install Virtualbox on Ubuntu



Debian



VirtualBox for Debian is available in our Contributor repository. However, this repo isn't available by default, so you must enable it first. Here's how.



Step 1: Open up your sources file in Nano.



Step 2: Find all of the lines that start with "deb." Add "contrib." at the end each line. If you have proprietary libraries or programs, it is possible to add the "nonfree" line.



Step 3: Run "update" to finish adding the "contrib" or "non-free lines.



Now that "Contrib", on your Debian Linux PC, is running, you will be able to easily install VirtualBox by using the following Apt–get command.



Arch Linux



On Arch Linux, you'll be able to install and use Virtualbox if you have "Community" enabled in your Pacman configuration file. Not sure how to enable it. Follow these steps.



Step 1: Open Pacman.conf using Nano and scroll down to the "Community Section".



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



Step 3 - Save Nano with CTRL + O. Next, exit using Ctrl+X and return to terminal. Once you're back at the terminal exit with Ctrl + X and return to the terminal, resync Pacman.



Step 4: With "Community" up and running, you can install VirtualBox on Arch with:



Fedora



Fedora's open-source software repositories are open-source and the developers strive to keep it that way. VirtualBox will not be available. If you enable RPM Fusion, however, it will work.



These two DNF commands are required to enable RPMfusion.



Note: Replace the X by the Fedora release number you are currently using.



Once RPM Fusion is up and running, you can install Virtualbox on Fedora



OpenSUSE



VirtualBox is easy to install if you are a SUSE user. Simply open up a terminal and run the following Zypper command.



Generic Linux



VirtualBox provides a standalone binary that can be downloaded for Linux systems which do not have VirtualBox as part of their software sources. To install it, you can go to the download site and grab the latest release. Then, run it to initiate the installation process.



VirtualBox Ubuntu Server



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



Mac/PC download instructions



Navigate to the official download page. Click on "VirtualBox" tab. Locate "Download" on the page to download Ubuntu Server 18.04.1LTS.



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



Note: you will need 7z (or a decompression tool that can handle the 7z archive format).



Linux download instructions



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



Install the P7zip tool to enable your Linux system to extract 7zip files. Here we go again Then, extract it with your file manager by right-clicking at 181064.7z then selecting "extract."



Once you've extracted all files, open VirtualBox by clicking "New", then type Ubuntu Server in the name field, and set the ram to 2204 MB.



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



Click "create" to complete the VM creation process.



Modifying the network settings



Right-click the Ubuntu Server VM in VirtualBox. To open the machine's settings, click "Settings".



Once you have reached the settings area click on "Network". Then, under "Adapter 1," change it to "Bridged Adapter."



Install the Minecraft Server



The VM has started to work. Now it is time get the server up and running. Follow the step-by-step instructions below to launch the Ubuntu Server VM.



Step 1: Log in to the VM using the details below.



username: osboxes



password: osboxes.org



Step 2: Install Java on 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.



Then, run the server at any time 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 your IPv4 IP address, switch on Minecraft. Next, make sure your PC and VM are connected to the same network. Finally, click "Add Server" in the Multiplayer menu.