My nextcloud raspberry pi server used to crash when it tried to do anything difficult, like open too many photos in a row. I adjusted some settings to try and keep it from running out of memory, but I’m not a very skilled sysadmin, and I’m using nextcloudpi now which adds another later of abstraction in an attempt to have saner defaults.
Thank you everyone for the suggestions, I learned a lot and I’ll continue to check back also.