Can't access my server / storage full

Hi, suddenly today I lost the ability to log in to the server, both through the web interface and the application went offline. When I try to access it through the website, I receive:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

I connected to the server via SSH and ran the usual
sudo apt update && sudo apt upgrade
It told me I don’t have enough space for the update, so I thought maybe the server got clogged somehow without warning and that’s why it’s not booting up. I manually deleted a few large folders from
/var/www/html/nextcloud/data/myusername/files/
but it didn’t help; it still told me there wasn’t enough space during the update. So I did:
sudo apt-get autoremove
which freed up about 500 MB and allowed the packages to update. After that, I rebooted, and thankfully, I can now access it through the web interface.
I’m not very proficient in Linux; I set up the server a long time ago, and what I did today is just what I found on Google.
Looking at the system, I have:
md0
Mounted: /
File System: ext4
Size: 868.13 GB
Available: 1.91 GB
Used: 100% (866.21 GB)

Now, my question is whether all of this is my files like movies, etc., on Nextcloud, or is it some system partition? I’m not sure if it’s also occupied. And how can I prevent this in the future, so if I upload some files for synchronization that will take up the rest of the available space on the server, it won’t crash?

When I managed to make it online, I’ve deletd about 100 gigs, but when I checkout system tab, I still have:
md0
Zamontowany: /
System plików: ext4
Size: 868.13 GB
Avilable: 1.90 GB
Used: 100% (866.22 GB)

I have now idea, how to free up space…

Probably both. You can see what your individual Nextcloud account is consuming in the Web UI on the Files app to the lower left.

Your Nextcloud logs are another possible consumer of space if you’re not auto rotating them (see the Admin Manual for how to do this).

I’ve deletd about 100 gigs, but when I checkout system tab, I still have

If you’re deleting files within Nextcloud, they first go to the trash. So disk space may not be freed right away. You can force clearing the trash. See the Admin Manual (https://docs.nextcloud.com).