Difficulty Level: very easy

Why would you want to boot from a USB drive?

  • It is faster and a SSD has a far longer life expectancy than a microSD. Therefore, as a home user who wants to have a working system over several years, it is highly suggested doing this. (You could of course also use an HDD, but it would spin 24/7.)


  • Warning: You will not be able to keep the data on your USB drive as you have to flash the .img to it. A backup is therefore required to restore settings, users and data.
  • Warning: You will not be able to format USB devices any more using the NCP web panel and will have to do it manually by using the terminal.
  • Warning: You will not be able to use nc-snapshot because your USB drive will be an ext4 filesystem and not BTRFS. (you could, however, partition the drive manually - Difficulty Level: advanced)
  • Warning: The RaspberryPi 4 has issues providing enough power to USB devices. Consider using an externally powered case for the SSD (see Troubleshooting below).

What we have


  • No setup yet
  • NCP on Raspberry Pi 4 booting from microSD with external USB drive for data. (If you are still using a armhf image (32bit) you will have updated to arm64 after following this guide.)

What we want

  • NCP runs from a USB 3 drive (preferably a SSD drive) without the need for a microSD.

What we need:


  • Raspberry Pi 4B (ideally 4 or 8 GB model)
  • USB drive (you should use a SSD with USB 3.0)
  • microSD card (only if you don’t run the latest bootloader already)
  • Secondary backup drive with a nextcloud_bkp of all your data, (nc-backup) & a ncp-config backup of our configurations (export-ncp) on a separate drive.

Preparation:

  1. Backup all your data and configs to a separate drive using nc-backup & export-ncp.
  2. If your bootloader is not up-to-date, or you are not sure about it, update it to the latest version. (A more complete 'how to' you find here or, if you set up a new Pi follow this documentation.)
    1. login into your Pi using SSH
    2. type: sudo apt update & sudo apt upgrade
    3. type: sudo rpi-eeprom-update to see if an update is available.
    4. if there is, type: sudo rpi-eeprom-update -a to update
  3. Power off the pi (sudo shutdown now)
  4. Disconnect all of your attached data drives and remove the SD card from the Pi.

Installation

  1. Flash the latest Image “NextCloudPi_Rpi_xx-xx-xx.img” to the USB media.
  2. Connect the Pi to Ethernet, plug in the drive and boot. Give it a few minutes and then go to https://nextcloudpi.local (or use the IP address of the Pi) and activate NCP (don’t forget to note the passwords)

Note:

Do not attempt to use the web panel to format a USB device with this setup!

Troubleshooting

Congratulations, you are done.
Please leave a comment in the Forum if you succeeded or have issues.
It helps to improve this documentation.
Updated: 2021.10.13