If you’re not familiar with Ubuntu Core, here’s a quote:
Ubuntu Core is a tiny, transactional version of Ubuntu for IoT devices and large container deployments. It runs a new breed of super-secure, remotely upgradeable Linux app packages known as snaps
After following this guide Ubuntu Core and any installed snaps (and their data) will reside on the SD card. This guide explains how to:
- Install and configure Ubuntu Core 16 for the Raspberry Pi 3
- Install the Nextcloud snap and connect the
removable-mediainterface to allow access to the hard disk
- Optional configuration of Email and HTTPS for Nextcloud
Prepare a microSDHC card
I explained the main steps in this post but you really should read and follow the Get started with a Raspberry Pi 2 or 3 page as it fully explains how to use a desktop computer to download an Ubuntu Core image for your Raspberry Pi 2 or 3 and copy it to an SD card ready to boot.
Ubuntu Core first boot
An Ubuntu SSO account is required to setup the first user on Ubuntu Core:
- Start by creating an Ubuntu SSO account
- Import an SSH Key into your Ubuntu SSO account
- Here are instructions to generate an SSH Key
- You’ll need a keyboard and monitor connected to the Raspberry Pi 3 to go complete the first boot process and device configuration.
Insert the Ubuntu Core microSHDC into the Raspberry Pi with a keyboard and monitor connected. Plug in the power.
- The system will boot then become ready to configure
- The device will display the prompt “Press enter to configure”
- Press enter then select “Start” to begin configuring your network and an administrator account. Follow the instructions on the screen, you will be asked to configure your network and enter your Ubuntu SSO credentials
- At the end of the process, you will see your credentials to access your Ubuntu Core machine:
This device is registered to <Ubuntu SSO email address>. Remote access was enabled via authentication with the SSO user <Ubuntu SSO user name> Public SSH keys were added to the device for remote access.
Once setup is done, you can login to Ubuntu Core using ssh, from a computer on the same network, using the following command:
ssh <Ubuntu SSO user name>@<device IP address>
The user name is your Ubuntu SSO user name.
Enable Non-key login
Once login to the device, you have option to enable normal user login (I'm using store name as login name: pi-store):
sudo passwd pi-store
Should you need to reconfigure the network at a later stage you can do so with:
Update Ubuntu Core
Make sure Ubuntu Core is up-to-date and reboot.
sudo snap refresh sudo reboot
The Nextcloud snap uses the
removable-media interface, which grants access to
/media/*, and requires manual connection:
sudo snap install nextcloud sudo snap connect nextcloud:removable-media core:removable-media
Browse to the Nextcloud IP address and create the admin user account, for example: