Posted on

How to Install Ubuntu Arm Server on the Raspberry Pi Compute Module 3

A few weeks ago, the Ubuntu team released a pre-built 64-bit Ubuntu Arm Server Raspberry Pi image that can be downloaded and flashed to an SD Card, that is compatible with both the Raspberry Pi 3B and Raspberry Pi 3B+ single board computers. As we documented in our original article detailing the new Ubuntu build, in the past you needed to build a kernel, create a root filesystem, and then install the necessary firmware and drivers. But now with this new ready-made image, there is no longer a need for any of those difficult and time consuming tasks. While the image was intended to be run on standard Raspberry Pi 3B and 3B+ hardware, with some small modifications it can be installed and run on the Raspberry Pi Compute Module 3 as well.

First and foremost, you will need to start with the new 64-bit Raspberry Pi 3 Ubuntu Arm Server image, which can be downloaded here: http://cdimage.ubuntu.com/releases/18.04/beta/

Once downloaded, you will need to unzip / extract the image file from the compressed archive file.

Next, using a Raspberry Pi Compute Module IO Board or Waveshare Compute Module IO Board Plus, you will need to flash the image file to the Compute Module 3’s onboard eMMC. Instructions for that process can be found here: https://www.raspberrypi.org/documentation/hardware/computemodule/cm-emmc-flashing.md

After the flash process is complete, there should be 2 partitions on the eMMC, ‘boot’ and ‘system’. Mount the ‘boot’ partition of the eMMC so that you can view and edit the files on it.

The first change to be made is to the ‘config.txt’ file. Open it up and change the kernel line, add an initramfs, add an arm_control line, and comment out the device tree address as such:

kernel=vmlinuz
initramfs initrd.img followkernel
arm_control=0x200
#device_tree_address=0x02000000

Save and exit.

While the partition is still mounted, you need to add an additional file to the top level directory of the partition as well. In this ‘boot’ partition, you will notice there are .dtb files for the Raspberry Pi 3B. But since we are adapting this Ubuntu image for the Compute Module 3, we need to add the CM3’s .dtb file here as well. A copy of the Compute Module 3’s .dtb can be extracted from a stock Raspbian image, but for convenience a copy can be downloaded from the Raspberry Pi GitHub here: https://github.com/raspberrypi/firmware/blob/master/boot/bcm2710-rpi-cm3.dtb

Simply download it, then copy it to the mounted ‘boot’ partition.

At this point, all necessary changes are complete, and it’s time to boot up and check our work! Unmount the ‘boot’ partition, power down the Compute Module, and then change the IO Board to standard boot mode via it’s jumper setting. Reapply power, and the boot process should begin! The first boot takes a few minutes, as cloud-init runs a series of one-time setup processes to resize the rootFS, setup networking, generate SSH keys, create a container environment, and other tasks. But, after a few minutes you should be able to login to your new 64-bit Ubuntu Arm Server for Raspberry Pi Compute Module with a default username and password of ‘ubuntu’ via SSH or a console!

Posted on

64-bit Ubuntu Raspberry Pi 3 Arm Server Image Now Available

This morning there is some great news for fans of the popular Raspberry Pi 3 single board computer, looking to run 64-bit Ubuntu Arm Server on their board!

 

The Ubuntu team, with support from Arm, has released a ready-made image that can be written to an SD Card and directly booted on a Raspberry Pi 3B or 3B+, with no configuration necessary.  We were able to give this image a test, and although it is technically considered a beta, it seems most everything is working and all of the standard functionality one would expect from Ubuntu Server intact!

 

You can download the image here:  http://cdimage.ubuntu.com/releases/18.04/beta/

How to Install Ubuntu on the Raspberry Pi 3

Once the image is downloaded, it needs to be extracted, and can then be written to an SD Card.  Of course, the higher the read and write speed of the SD Card, the better overall system performance will be.

 

After getting the image written and inserted in to the Pi, take note that the first boot may take a few minutes while the OS goes through a few setup routines.

 

A quick run through the system showed the basic console hardware requirements of HDMI, USB, and Ethernet all worked out of the box, as well as WiFi.  SSH is enabled and working, and normal software installation and updating via ‘apt’ package management is working great.  As an added bonus, the image comes with ‘cloud-init’ setup to automatically expand the partition on the SD Card to the maximum capacity of the card, generate SSH keys, configure networking for the LXD container runtime (which is also preinstalled), and finally force a password change upon first login to the system.

 

All said, this means the Ubuntu Arm Server image is ready to use immediately upon writing the SD Card and booting the Pi!

 

In the past, it was technically possible to bootstrap a system using a custom built kernel and an Ubuntu rootfs, then add Pi-specific firmware and drivers.  After that you had to add users, manually install networking, and add even basic system utilities.  That process required in-depth knowledge of system installation and configuration, and was not something most users could tackle on their own.  However, thanks to the efforts of the Ubuntu Arm team in creating this new ready-made image, no advanced knowledge of the Linux build process is required, and even casual Raspberry Pi users can be up and running easily!

 

One final thing to keep in mind, is that this image is fully intended to be a 64-bit Ubuntu Arm Server platform!  Use cases such as File or Print servers, DNS, MySQL or other database servers, web front-end caching, or other lightweight services all make sense for this platform.  It can also be used for installation and testing of Aarch64 software, developing and compiling Arm64 applications, exploring containers, or even production workloads where possible!  Small, distributed compute workloads, IoT services, Industrial Internet of Things, environmental monitoring, remote compute capacity in non-traditional settings, or many other uses cases are all possible.  While a desktop *can* be installed, due to the limited memory on the Raspberry Pi, only a lightweight desktop like LXDE or XFCE will truly work, with both Mate and Gnome quickly running out of memory, moving to Swap, and then slowing the system to a crawl.   Even so, desktop performance in this image is not optimized, so sticking with the intended use of this image as a Server OS makes the most sense.

 

In summary, thanks to a collaborative effort from Arm and the Ubuntu teams, the community now has a ready-made Raspberry Pi 3B(+) 64-bit Ubuntu Arm Server image!
Posted on

How to Install Ubuntu on an Arm Server

As a follow up to our previous blog post offering advice and options for purchasing an Arm Server, the second most frequent question we receive is regarding how to install Ubuntu on an Arm Server. This of course varies depending on the hardware you have chosen, but typically follows one of two options (with some customization likely to be necessary for Option 2).

The easiest method for installing Ubuntu on Arm is to acquire SBSA compatible hardware. This is typically a more expensive option, but because of a standard UEFI boot processes and hardware description, direct downloads of Debian Aarch64, Fedora Arm, CentOS Aarch64, and Ubuntu Arm Server install in a normal manner. Simply write the downloaded Ubuntu Arm Server image to a USB drive, insert it into the Arm Server, and then boot from that device to start the process. The installation process will then install the operating system to a local hard drive, setup the Grub bootloader, and configure the OS for boot. Typical units in this scenario are Cavium ThunderX or ThunderX2 servers, Qualcomm Centriq 2400 servers, or Softiron Overdrive 1000 or 3000 AMD Opteron A1100 servers. These machines simply install and boot operating systems in a “normal” fashion, similar to x86 counterparts.

A second, cheaper option, is to use a single board computer such as a Raspberry Pi, an Odroid, a NanoPi, a Pine64, or others. In this scenario, the board vendor is usually the one to develop and release the Ubuntu Arm image, though sometimes the Armbian team also provides an image that can be written directly to an SD Card and booted. For example, the Pine64 and many Odroid, FriendlyArm, OrangePi, and BananaPi models have pre-configured 32-bit and 64-bit Ubuntu Arm images available for installation (depending on the exact model). They typically contain a SoC-specific kernel, paired with an Ubuntu Arm rootfs, and need to written to an SD Card and then inserted into the board. Sometimes these boards also contain permanent storage such as eMMC, and the OS can be then be transferred from the SD Card to teh eMMC, depending on the model.

As always, if you have any feedback, let us know in the comments!

Posted on

ARM Server Update, Summer 2018

Continuing our quarterly ARM Server update series, it is now Summer 2018 so it is time to review the ARM Server news and ecosystem updates from the past few months!  This blog series only covers the ARM Server highlights, but for more in-depth ARM Server news be sure to check out the Works on Arm Newsletter, delivered every Friday by Ed Vielmetti!

Looking at our recent blog posts, the most important headline seems to be the rumored exit from the business by Qualcomm.  Although, at the moment, this has not been confirmed, if true it would be a major setback for ARM Servers in the datacenter.  The Qualcomm Centriq had been shown to be very effective by CloudFlare for their distributed caching workload, and had been shown by Microsoft to be running a portion of the Azure workload as well.

However, just as Qualcomm is rumored to be exiting, Cavium has released the new ThunderX2 to general availability, and several new designs have now been shown and are listed for sale.  The ThunderX2 processor is a 32-core design that can directly compete with Xeons, and provides all of the platform features that a hyperscaler would expect.

Finally, in software news, Ubuntu has released it’s latest 18.04 Bionic Beaver release, which is an LTS version, thus offering 5 years of support.  As in the past, there is an ARM64 version of Ubuntu, which should technically work on any UEFI standard ARM Server.  Examples include Ampere X-Gene servers, Cavium ThunderX servers, Qualcomm, Huawei, HP Moonshot, and AMD Seattle servers.

As always, make sure to check back for more ARM Server and Datacenter industry news, or follow us on Twitter for daily updates on all things ARM, IoT, single board computers, edge computing, and more!

 

Posted on

How to Install Nextcloud on a Debian or Ubuntu ARM Server

With the recent fork of the Owncloud project, many users are switching over to the newly founded Nextcloud project to build and use their own personal cloud servers to host personal files, photos, movies, and documents.  This alternative is popular for people concerned with data privacy, as you do not need to rely on a public cloud or drive similar to Box, Dropbox, Google Drive, OneDrive, etc.  With those services, you don’t know precisely where your data lives, who has access to view it, and what safeguards are in place to protect your data.  With Nextcloud, you know exactly where your data resides, and who has access to it.  Best of all, running it on a Debian or Ubuntu ARM server is easy!  Let’s get started!

In this tutorial, we will show you how to install Nexcloud on an Ubuntu or Debian ARM server.

First, let’s update the server to the latest versions of applications:

 

sudo apt-get update
sudo apt-get upgrade
sudo reboot

 

Next, we need to install the core applications that will make Nextcloud work; PHP, Apache, and MySQL.  You will be asked to create a MySQL root password during this installation:

apt-get install lamp-server^
apt-get install libxml2-dev php-zip php-dom php-xmlwriter php-xmlreader php-gd php-curl php-mbstring
a2enmod rewrite
sudo service apache2 reload

 

Once that is complete, it is time to actually download and configure Nextcloud (version 10 is the latest at the time of this writing, but check to see if a newer version exists and replace the number in these commands):

wget https://download.nextcloud.com/server/releases/nextcloud-10.0.1.tar.bz2
tar -vxjf nextcloud-10.0.1.tar.bz2
sudo mv nextcloud /var/www

 

Next, we need to set the proper permissions on the Nextcloud files and folders.  Nextcloud has provided a script that will do this for us, making it very easy.  Thus, we need to create a new file and paste in the contents of the script they’ve given us.

nano nextcloud_permissions.sh

Paste this in to the new file:

#!/bin/bash

ocpath=’/var/www/nextcloud’
htuser=’www-data’
htgroup=’www-data’
rootuser=’root’

printf “Creating possible missing Directories\n”

mkdir -p $ocpath/data
mkdir -p $ocpath/assets
mkdir -p $ocpath/updater

printf “chmod Files and Directories\n”

find ${ocpath}/ -type f -print0 | xargs -0 chmod 0640
find ${ocpath}/ -type d -print0 | xargs -0 chmod 0750

printf “chown Directories\n”

chown -R ${rootuser}:${htgroup} ${ocpath}/
chown -R ${htuser}:${htgroup} ${ocpath}/apps/
chown -R ${htuser}:${htgroup} ${ocpath}/assets/
chown -R ${htuser}:${htgroup} ${ocpath}/config/
chown -R ${htuser}:${htgroup} ${ocpath}/data/
chown -R ${htuser}:${htgroup} ${ocpath}/themes/
chown -R ${htuser}:${htgroup} ${ocpath}/updater/

chmod +x ${ocpath}/occ

printf “chmod/chown .htaccess\n”

if [ -f ${ocpath}/.htaccess ] then
chmod 0644 ${ocpath}/.htaccess
chown ${rootuser}:${htgroup} ${ocpath}/.htaccess
fi

if [ -f ${ocpath}/data/.htaccess ] then
chmod 0644 ${ocpath}/data/.htaccess
chown ${rootuser}:${htgroup} ${ocpath}/data/.htaccess
fi

 

Now we will just make the script executable, and then run it:

sudo chmod +x nextcloud_permissions.sh
sudo ./nextcloud_permissions.sh

 

Our next step is to configure Apache to listen for and serve requests for the NextCloud application.  We will create an Apache configuration file to accomplish this, and then populate it:

nano /etc/apache2/sites-available/nextcloud.conf

Paste this Apache configuration in to the file:

Alias /nextcloud "/var/www/nextcloud/"

<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All

&ltIfModule mod_dav.c>
Dav off
&lt/IfModule>

SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud

&lt/Directory>

 

 

Next, we are going to make some changes to the Apache modules that are loaded and then restart Apache:

sudo ln -s /etc/apache2/sites-available/nextcloud.conf /etc/apache2/sites-enabled/nextcloud.conf
sudo a2enmod headers
sudo a2enmod env
sudo a2enmod dir
sudo a2enmod mime
sudo a2enmod ssl
sudo a2ensite default-ssl
sudo service apache2 reload

 

Now it is time to configure MySQL by creating the table and user that Nextcloud needs to operate.  First we connect to MySQL:

sudo mysql -u root -p

Once logged in to MySQL, we”ll make the table and user:

create database nextcloud;
create user nextclouduser@localhost identified by 'your-password';
grant all privileges on nextcloud.* to nextclouduser@localhost identified by 'your-password';
flush privileges;
exit;

 

At this point, we decided a reboot was probably a good idea, but you might be able to skip this step:

sudo reboot

 

Once your server comes back up, the Nextcloud web interface will be available, and we will finish our configuration via the browser.  In your browser, go to http://[the-ip-address-of-your-server]/nextcloud

You will see the “Create Account” screen shown here:

nextcloud-install-on-ubuntu-or-debian-arm-server-1

You will need to create an Admin name and password for your Nextcloud install, and when you scroll down you will notice that Nextcloud needs the MySQL information you created earlier.  Provide it the information asked, if you used the instructions above, the database name is ‘nextcloud’, username is ‘nextclouduser’, and then whatever password you selected.  The location of the database is ‘localhost’.

If everything is correct, you will be redirected to the Dashboard (you will get an inline pop-up to download the Nextcloud Apps first)

nextcloud-install-on-ubuntu-or-debian-arm-server-2

 

Dismiss that and you will see the Files application:

nextcloud-install-on-ubuntu-or-debian-arm-server-3

 

At this point, you are up and running with Nextcloud on your Ubuntu or Debian ARM Server!  You can even add additional features and applications from the menu, such as Mail, Document viewer, Tasks, and more!  Happy hosting!

nextcloud-install-on-ubuntu-or-debian-arm-server-4

 

Posted on

How to Install Confluence on an Ubuntu ARM Server

Following up on our previous article, which covered How to Install JIRA on an ARM Server, we’ll now take a look at how to install Atlassian Confluence on an ARM Server as well.

As mentioned in our previous article, when we set out to use Confluence and JIRA for some development work, we noticed there was a lack of information on the topic and no real authoritative guide on how to install and run Confluence or JIRA on ARM platforms. So, we decided to piece together what we learned in the hopes that it will help someone else.

As Confluence is architecturally similar to JIRA, much of the documentation from our prior article is replicated here with just a few minor edits, but we will go through the entire exercise anyways for the sake of clarity.

First, lets discuss the specific environment this guide addresses. This tutorial is for installing Confluence on Ubuntu 14.04 LTS running on ARM architecture processors. It may also work on similar Linux distros such as Raspbian for the Raspberry Pi, Debian, etc, but we only tested and built on Ubuntu Server 14.04 LTS, so your mileage may vary on the others.

Before we get in to the details, here is a quick overview of what we will accomplish in this guide:

1. Add Oracle Java repository
2. Install Oracle Java SDK
3. Download and configure Confluence
4. Run Confluence!

Let’s get started.

First, we need to ensure we have a few software utilities installed that will help us add some software repositories in the next step.

sudo apt-get install python-software-properties software-properties-common

This is going to give us access to the ‘add-apt-repository’ command, which we’ll make use of now:

sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

This will pull in a new repository that contains the Oracle Java SDK. We need to use the Oracle Java runtime environment, as opposed to the OpenJDK packages that are in the default Ubuntu repos.

sudo apt-get install oracle-java7-installer

The JAVA_HOME variable should be set for you during installation, but just to be certain we are going to install one more utility, which will allow us to also choose which Java to run if more than one are present on your system.

sudo apt-get install oracle-java7-set-default

Once it finishes installing, we run it with:

sudo update-alternatives --config java

And then choose your Oracle Java installation from the numerical options. It will look similar to this:

There are 2 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status
————————————————————
* 0 /usr/lib/jvm/java-7-oracle/jre/bin/java 1062 auto mode
1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-7-oracle/jre/bin/java 1062 manual mode

Press enter to keep the current choice[*], or type selection number:

Select the one that references your new Oracle Java installation, if it is not already selected.

Once complete, you can test everything is working by running:

java -version

It should give you back information on the installed Java version, and should be similar to this:

java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) Client VM (build 24.60-b09, mixed mode)

Now that Java is installed and configured, it is time to download and setup Confluence. Atlassian only provides a binary for installing Confluence on 32-bit and 64-bit x86 platforms, so we cannot use their automated installation scripts. To run Confluence on ARM, we need to use the Archive File option provided by Atlassian. Further reading on the topic can be found here: Installing Confluence on Linux from Archive File (https://confluence.atlassian.com/display/DOC/Installing+Confluence+on+Linux+from+Archive+File). To download the archive, go to https://www.atlassian.com/software/confluence/download and click on Linux. You will see one labeled “Confluence 5.7.3 Server – Standalone (TAR.GZ Archive)” We can see that it is a link to https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-5.7.3.tar.gz (at the time of this writing). That is the file we are interested in.

On your server, navigate to the folder you want to download this file to, and then start the download.

sudo wget https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-5.7.3.tar.gz

Once the download has finished, we need to extract it.

sudo tar -xvzf atlassian-confluence-5.7.3.tar.gz

This will extract the contents of the archive in to a subdirectory. Next, we are going to need to declare a path for the variable ‘confluence.home’, so lets first make a directory to point the variable at.

sudo mkdir /var/confluence

Now we can set the property in the ‘atlassian-confluence-5.7.3/WEB-INF/classes/confluence-init.properties’ file.

sudo nano atlassian-confluence-5.7.3/WEB-INF/classes/confluence-init.properties

Uncomment the line to define ‘confluence.home’ and add /var/confluence/ Save and exit.

At this point, Confluence has what it needs and is able to run, so we can start it with:

cd bin
./start-confluence.sh

Confluence can take up to 10 minutes or more to start, depending on your ARM processor’s core and speed, as well as your filesystem location and speed. Once it’s fully loaded and operational, you can access Confluence by browsing to http://your-ip-address:8080 and going through the steps to finalize setup.

Remember, installing Confluence like this was only tested on an Ubuntu 14.04 LTS ARM Server, but these steps should be roughly the same for installing Confluence on a Raspberry Pi running Raspian, or a Debian ARM server.

Enjoy!

Posted on

How to Install JIRA on an Ubuntu ARM Server

We recently began testing Atlassian JIRA and Confluence for some internal development work, and we noticed there was a lack of documentation on the steps necessary to install and run JIRA on ARM Servers. There are fragmented pieces of information scattered about the web, but not a complete installation guide specifically designed for running JIRA on ARM. Hopefully this walkthrough will help clear up any confusion on the topic, and help you install JIRA successfully.

First, lets discuss the specific environment this guide addresses. This tutorial is for installing JIRA on Ubuntu 14.04 LTS running on ARM architecture processors. It may also work on similar Linux distros such as Raspbian for the Raspberry Pi, Debian, etc, but we only tested and built on Ubuntu Server 14.04 LTS, so your mileage may vary on the others.

Before we get in to the details, here is a quick overview of what we will accomplish in this guide:

1. Add Oracle Java repository
2. Install Oracle Java SDK
3. Download and configure JIRA
4. Run JIRA!

Let’s get started.

First, we need to ensure we have a few software utilities installed that will help us add some software repositories in the next step.

sudo apt-get install python-software-properties software-properties-common

This is going to give us access to the ‘add-apt-repository’ command, which we’ll make use of now:

sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

This will pull in a new repository that contains the Oracle Java SDK. We need to use the Oracle Java runtime environment, as opposed to the OpenJDK packages that are in the default Ubuntu repos.

sudo apt-get install oracle-java7-installer

The JAVA_HOME variable should be set for you during installation, but just to be certain we are going to install one more utility, which will allow us to also choose which Java to run if more than one are present on your system.

sudo apt-get install oracle-java7-set-default

Once it finishes installing, we run it with:

sudo update-alternatives --config java

And then choose your Oracle Java installation from the numerical options. It will look similar to this:

There are 2 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-7-oracle/jre/bin/java 1062 auto mode
1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-7-oracle/jre/bin/java 1062 manual mode

Press enter to keep the current choice[*], or type selection number:

Select the one that references your new Oracle Java installation, if it is not already selected.

Once complete, you can test everything is working by running:

java -version

It should give you back information on the installed Java version, and should be similar to this:

java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) Client VM (build 24.60-b09, mixed mode)

Now that Java is installed and configured, it is time to download and setup JIRA. Atlassian only provides a binary for installing JIRA on 32-bit and 64-bit x86 platforms, so we cannot use their automated installation scripts. To run JIRA on ARM, we need to use the Archive File option provided by Atlassian. Further reading on the topic can be found here: Installing JIRA from an Archive File on Windows, Linux or Solaris. To find the archive, browse to https://www.atlassian.com/software/jira/download and click on “All JIRA download options”. You will see one labeled “JIRA 6.4.2 (TAR.GZ Archive)” We can see that it is a link to https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-6.4.2.tar.gz (at the time of this writing). That is the file we are interested in.

On your server, navigate to the folder you want to download this file to, and then start the download.

sudo wget https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-6.4.2.tar.gz

Once the download has finished, we need to extract it.

sudo tar -xvzf atlassian-jira-6.4.2.tar.gz

This will extract the contents of the archive in to a subdirectory. Next, we are going to need to declare a path for the variable ‘jira.home’, so lets first make a directory to point the variable at.

sudo mkdir /var/jira

Now we can set the property in the ‘atlassian-jira/WEB-INF/classes/jira-application.properties’ file.

sudo nano atlassian-jira/WEB-INF/classes/jira-application.properties

Uncomment the line to define ‘jira.home’ and add ‘/var/jira’ (without the quotes). Save and exit.

At this point, JIRA has what it needs and is able to run, so we can start it with:

cd bin
./start-jira.sh

JIRA can take up to 10 minutes or more to start, depending on your ARM processor’s core and speed, as well as your filesystem location and speed. Once it’s fully loaded and operational, you can access JIRA by browsing to http://your-ip-address:8080 and going through the steps to finalize setup.

Remember, installing JIRA like this was only tested on an Ubuntu 14.04 LTS ARM Server, but these steps should be roughly the same for installing JIRA on a Raspberry Pi running Raspian, or a Debian ARM server.

Enjoy!

Posted on

HOW-TO: Install Minecraft Server on the Raspberry Pi Server or Ubuntu 18.04 Arm Server

Minecraft is one of the most popular games played online, and installing your own Minecraft Server on Arm is easy! These instructions will allow you to install Minecraft Server on our Raspberry Pi, Raspberry Pi 3, or on our Ubuntu 18.04 Arm Server.

First, we need to connect to our node via SSH.

Once logged in, lets make sure we keep our downloads in our home directory for ease of use:

cd /home

Once in the home directory, we are first going to download and set up Java.

We do that by running:

sudo wget --no-check-certificate http://www.java.net/download/jdk8/archive/b111/binaries/jdk-8-ea-b111-linux-arm-vfp-hflt-09_oct_2013.tar.gz

After Java has finished downloading, we need to extract it:

sudo tar zxvf jdk-8-ea-b111-linux-arm-vfp-hflt-09_oct_2013.tar.gz -C /opt/

If the download and extract were successful, we will test to make sure Java is working by:

sudo /opt/jdk1.8.0/bin/java -version

We should see this, confirming Java is now ready:

java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b111)
Java HotSpot(TM) Client VM (build 25.0-b53, mixed mode)

Finally, let’s remove the downloaded gzip to save a bit of disk space:

sudo rm jdk-8-ea-b111-linux-arm-vfp-hflt-09_oct_2013.tar.gz

Now, it is time to download Minecraft Server!

wget https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar

Once it has finished downloading, we can launch it by running:

sudo /opt/jdk1.8.0/bin/java -Xmx1024M -Xms1024M -jar minecraft_server.jar

The Raspberry Pi only has 512mb of RAM, so it will not actually allocate 1024…but it will take approximately 400mb or so that is available to it.  The Raspbery Pi 3 and our Ubuntu 18.04 LTS Arm Server both have 1gb of RAM, which definitely helps increase performance of the Arm Minecraft Server.  Of course, the Operating System does take up some of the available memory, but Minecraft Server will probably reserve about 750mb to 800mb of memory to run.  This is plenty.

At this point, Minecraft Server will go through it’s startup routine, and you will be able to join the newly created world by pointing your game to the IP Address of your node (you can also modify game variables by editing the server.properties file, located in your /home directory.)