How To Host A Minecraft Game On A Linux Virtual Machine


It is a wasteful use of resources to dedicate an entire Linux server or computer to running Minecraft. 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 for virtualizing modern computers. Oracle VM VirtualBox, which is cross-platform and easy to use, is the best. We will be explaining how Oracle VirtualBox can be used to host a Minecraft server on a Linux virtual computer.



Install VirtualBox



In this section of the tutorial, we''ll be going over 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.



VirtualBox is easy to install on a Windows or Mac computer. Neither operating system requires that the user interact directly 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 on Ubuntu is in "Multiverse" repository. You must enable it with:



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



Finally, run the apt command to install Virtualbox under Ubuntu.



Debian



VirtualBox on Debian is now available in the Contributor repositories. However, this repo isn''t available by default, so you must enable it first. Here''s how it works.



Step 1: Open your source file in Nano.



Step 2: Find all of the lines that start with "deb." Add "contrib." to each line. You may also want to add the "non-free" line too if you require proprietary libraries and programs.



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



Now that "Contrib", is running on your Debian computer, you can easily install VirtualBox using the Apt-get command.



Arch Linux



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



Step 1 - Open Pacman.conf on Nano and scroll through it until you find the "Community” section.



Step 2: Take out the # symbol in front of "Community", and the lines below.



Step 3: Save Nano using Ctrl+ O. Then, exit with Ctrl + X and return to the 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 software repositories can be downloaded open-source, and the developers intend to keep it that manner. VirtualBox won''t be found on Fedora. However, you can get it working if RPM Fusion is enabled.



To enable RPM Fusion, run these two DNF commands.



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



Now that RPM Fusion is up, install Virtualbox for Fedora



OpenSUSE



VirtualBox can be installed by SUSE users. Simply open a terminal, and then 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.



Ubuntu Server in VirtualBox



After VirtualBox has been installed, it is time to set-up Ubuntu server. The fastest way to install and set up Ubuntu server in VirtualBox is to grab a pre-setup appliance.



Mac/PC download instructions



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



Ubuntu Server 18.10 is recommended. Please use 18.04.1 instead. VirtualBox doesn''t support 18.10 networking.



Notable: You will need 7z or a decompression program that can handle the 7z format.



Instructions for downloading Linux



Use the following command to download the Ubutnu Server Image



Install the P7zip tool to enable your Linux system to extract 7zip files. MEMES RAIN Next, extract the archive by right-clicking 181064.7z and choosing "extract."



When you''ve extracted the files, open up VirtualBox, click "New," type "Ubuntu Server" as the name and set the ram to 2048 MB.



After setting the RAM, navigate to the "Hard drive" page and click "Use an existing Virtual Hard Disk File." Browse for Ubuntu 18.04.1 server (64bit).vdi from there and click "open to assign it your VM."



Click "create" to complete the VM creation process.



Modifying network settings



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



Once in the settings section, click on "Network". Then, under "Adapter 1," change it to "Bridged Adapter."



Install the Minecraft Server



The VM is working. Now it is time get the server up and running. Open the Ubuntu Server VM (right click and select "Start"), and follow the steps below.



Step 1: Login to the VM with 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.