Iām a relatively new user to NextcloudPi, but a long-time Raspberry Pi user. Iām setting up a NCP system for a (very) nontechnical friend, and I was wondering if there is some way that they can do a safe shutdown (sudo halt) of the Pi and NCP via the web interface. Sheās on solar, so sheās very sensitive about things like power usage, and I just know sheāll be unplugging it probably regularly and I want to minimize the risk of storage corruption. Getting her to install and use a terminal window to ssh to the Pi, log in and do a shutdown command is something Iād like to avoid.
If this is true she will risk ruining the data and nothing will prevent this. My suggestion is to not selfhost at all. Pay for a simple VPS and host your data on Vultr or Linode or Digital Ocean.
This sounds like a disaster. Nextcloud is not meant to be power cycled. Donāt even bother if that is what will happen. Itāll lead to conflicts and who knows what else. Just pay for a hosted account or a VPS.
Others thoughtsā¦
What about automating this process yourself? You could write a simple ssh (passwordless) command and call it from a menu button: Shutdown NextcloudPi
Building this into NextcloudPi is actually not practical for all users.
You might also want to consider adding PoE to the device so it can be remotely turned on as well.
Thanks again for the recommendations. She doesnāt have internet service where she lives so this will be part of a self-hosted local network. Iāll take a look at some options for sending the shutdown command via some form of SSH options.
Create a script / batch file for her to double click on. Name it āShutdown Piā or whatever. Use these instructions to write the script: https://www.shellhacks.com/ssh-execute-remote-command-script-linux/
Look into how to configure SSH with a key-pair, so she wonāt need to enter the password:
Thanks everyone for the suggestions. I ended up going with an app on her phone that sends SSH commands and configured it to log into the pi and run āsudo haltā to shut it down. I assumed that NC will correctly shut down when it receives the halt signal from the system
I also recommend using KDE Connect. It syncs device to device without internet by using wifi or bluetooth and can also sync between your phone to computer for files, messages, and other useful functionality.
Despite the name, you do not need either KDE or Linux to use it.
The final solution I came up with was to install Smart Command on her phone, configured a button in the app to send a āsudo haltā command to the RPi, and installed one of those inline USB power switches. She presses the Smart Command button on her phone to shutdown the Nextcloud Pi, waits 10 seconds, then presses the button to power it off. When she wants to turn it back on she just presses the button again.