Skip to content

Self-hosted Nextcloud on 1GB RAM

VPS Hosting by SamAlvi 5 replies 131 views
#1

Why pay for Dropbox or Google One when you can self-host Nextcloud on a $3/month VPS? That's what I asked myself six months ago, and now my whole family is on it—photos, documents, calendar, the works.

The setup: 1GB RAM KVM at KnownHost, Debian 12, docker compose with mariadb:10.6, redis for file locking, and caddy as reverse proxy. I followed the official Nextcloud AIO project initially but it was too heavy, so I stripped it down to manual compose.

Tweaks that made it viable:
- php memory limit to 512MB
- mariadb innodb_buffer_pool_size to 256MB
- cron every 5 minutes instead of default ajax background jobs
- preview generator app with strict limits, 2048px max

It worked. Wife synced 30GB photos. Kids use the calendar. I even got the office document collaboration running with OnlyOffice, though that needed 512MB swap to not choke.

Then yesterday: Nextcloud 29.0.4 update. Database migration failed. Corruption in oc_filecache. I had backups... theoretically. Restic to Backblaze B2, but I never tested restore. Never. The one thing you preach to everyone and don't do yourself.

The restore failed because I forgot the B2 application key had expired. Three hours of panic, finally found a week-old manual sql dump on my laptop. Lost a week of family photos.

Lesson: test your backups. Test them. docker exec into your container, restore to temp database, verify. I was so focused on the self-hosting purity that I skipped the boring part.

Still self-hosting though. Just with tested backups now. And a second offsite copy.

For anyone starting out, I use https://restic.net for backups.

my cloud. my rules. my 3AM alerts.
6 #2

Ngl 1GB for Nextcloud is pretty tight

I'm over here struggling to fit a 7B LLM into 8GB VRAM and you're running a whole collaboration suite on a gig of system RAM

What's the swap usage look like during that OnlyOffice spike? Curious if zram would help more than disk swap

CUDA cores are my love language
#3

GDPR Article 32 requires "the ability to restore the availability and access to personal data in a timely manner."

Your backup failure would not satisfy this. "timely" implies tested, documented, verified.

Also: family photos count as personal data. Children's photos, special category? Worth considering.

I do not wish to be the bureaucrat in the room, but self-hosting does not exempt one from obligations.

#4

I am deeply sorry to intrude upon your thread with my own experience, but let us consider that 1GB may be sufficient for personal use if one is diligent.

I too run Nextcloud in constrained environment, and it is my humble request that you not take offense if I suggest that PostgreSQL may consume less memory than MariaDB in certain configurations. I apologize for any presumption.

#5

The privacy angle: self-hosting is valid, but the backup failure reveals a gap. I use borgmatic to two targets, with automated restore tests every Sunday. The configuration is not complex, and the peace of mind is, to be precise, worth the initial effort.

GDPR compliance with family data is, as far as I know, a matter of documentation as much as technical measure.

Neuland. Aber schnell.
#6

One thing working beats everything broken
One working backup
Beats ten untested

Post a reply

You need an account to reply. Log in or register to join the conversation.

Post reply Preview Save draft