- This wiki attempts to create a beginner-friendly ‘how-to guide’ to boot your NCP from a USB media.
- I have updated the doc, accordingly.
- You are most welcome to contribute, by commenting and editing this (wiki).
Difficulty Level: easy
Why would you want to boot from a USB drive?
It is faster and a SSD has a far longer life expectancy as the microSD. So as a home user who wants to have a working system over several years I highly suggest 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 and data.
- Warning: You will not be able to format any USB device 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-snapshotbecause your USB drive will be an ext4 filesystem and not BTRFS.
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 updatet 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
- 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_bkpof all your ncp data, (nc-backup) & a
ncp-configbackup of our configurations (export-ncp) on a separate drive
Backup all your data and configs to a separate drive using nc-backup & export-ncp.
- login into your Pi using SSH
- type sudo
sudo apt upgrade
sudo rpi-eeprom-updateto see if an update is available.
- if there is type
sudo rpi-eeprom-update -ato update
Power off the pi (
sudo shutdown now)
Disconnect all of your attached data drives and remove the SD card from the Pi.
- (if your Pi refuses to boot from USB try to change the boot order manually)
- Flash the latest Image “NextCloudPi_Rpi_xx-xx-xx.img” to the USB media.
- 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)
Restore your Backup
1. Restoring NCP Settings
Login to the NextcloudPi web panel (at nextcloudpi.local)
On the left in the section “System” choose “nc-automount” and activate it.
login to your pi via SSH (ssh pi@IP-ADDRESS | pswd: raspberry)
update the pi with
sudo apt update&
sudo apt upgrade
update ncp by typing
df -hto list attached drives.
Look for your backup drive and type:
You should see a list of your backups.
Look for the
config-backupand note its name:
Go back to the NextcloudPi web pannel (at nextcloudpi.local)
On the left in the section
file nameand hit
This will not take long as it only restores your
(You will not have any user or data restored. This we will do in the follwing step.)
2. Restoring the data-backup
(the process for the dateless and full backup is the same)
- Follow step 1-7 from the description above
- Look for the backup file and note its name:
- Go back to the NextcloudPi web pannel (at nextcloudpi.local)
- On the left in the section
- Fill in path and file name and hit apply
- Depending on your backup size this can take a very long time.
- Once the backup has been restored successfully reboot NCP using the web pannel (top right) or just reboot the pi with SSH
sudo reboot now
- Now you will be able to login with your former login and all your data, apps and users should be restored.
- The web panel login will not be restored, so you will have to use the one you got when you first activated (Installation: Step 2).
Do not attempt to use the web panel to format a USB device!
Congratulations, you are done. Please leave a comment if you succeeded or have issues. It helps to improve this documentation.
Note: 02.January 2021: I have followed this tutorial myself and succeeded.