Posted on 4 Comments

How-To: Install Minecraft Server on the Raspberry Pi Server or Ubuntu 18.04 Arm Server (2020 Edition)

Install Minecraft Server on the Raspberry Pi (2020 Edition)

Minecraft is one of the most popular games played online, and installing your own Minecraft Server on a Raspberry Pi or other Arm powered device 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.  They should also work locally on your own Raspberry Pi or other Arm powered single board computer!

To install Minecraft Server on your Raspberry Pi, just follow this quick tutorial to get you up and running!

Installing Java

Due to changes in the Oracle licensing, it is no longer possible to download JDK directly from their site without accepting a license agreement, as was possible in the past.  Thus, it is no longer possible to just use ‘wget’ from a terminal to download JDK.  Instead, you will have to use a web browser, navigate to https://www.oracle.com/java/technologies/javase-jdk8-downloads.html, and select the “jdk-8u241-linux-arm32-vfp-hflt.tar.gz” file.  This will need to be accomplished in one of two ways, depending on whether you are using SSH to connect to your server, or, if you are using a local Raspberry Pi with a desktop.  First, if you are using a local Raspberry Pi with a keyboard, monitor, mouse, and desktop installed, you can simply open up a web browser and visit https://www.oracle.com/java/technologies/javase-jdk8-downloads.html, and select the “jdk-8u241-linux-arm32-vfp-hflt.tar.gz” file.  Take note of where it downloads, we will need that in a moment.

If you are connected via SSH, you will need to use a terminal (text only) web browser such as Lynx.  This won’t be pretty, but, it should be enough to prompt for the download of the JDK file.  First connect to your node via SSH using the IP address, username, and password.  Then, install lynx and navigate to the Oracle website in text-only mode:

sudo apt-get install -y lynx && lynx https://www.oracle.com/java/technologies/javase-jdk8-downloads.html

Look for the text on the page where the name of the file is listed, jdk-8u241-linux-arm32-vfp-hflt.tar.gz, and press Enter to start the download.  If you are on a desktop version of the Raspberry Pi, now is the time to switch to the Terminal application, and change to the directory where your file got downloaded to (most likely Downloads … cd Downloads).  If you connected via SSH, then you are already in a terminal, and can proceed.

We need to extract Java, using this command:

sudo tar zxvf jdk-8u241-linux-arm32-vfp-hflt.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 (your version may vary a bit):

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-8u241-linux-arm32-vfp-hflt.tar.gz

Installing Minecraft Server

Now, it is time to download Minecraft Server!

Still in the terminal, get Minecraft from this URL:

wget https://launcher.mojang.com/v1/objects/bb2b6b1aefcd70dfd1892149ac3a215f6c636b07/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.1.15.2.jar

The original Raspberry Pi Model B 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 Raspberry Pi 3 and our Ubuntu 18.04 LTS Arm Server both have 1gb of RAM, which definitely helps increase performance of the 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, which will be plenty.  On a Raspberry Pi 4 you can purchase up to 4gb RAM models, so if you have one of those, feel free to experiment with increasing the value of the memory, (1024) in the above command line (perhaps 2048)

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.)

Have fun!

Posted on Leave a comment

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/

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 4 Comments

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/release/

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 Leave a comment

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 Leave a comment

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 2 Comments

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