My primary Nextcloud server is at my home in Europe, but I currently live in Asia. The high latency and slow speeds with the Nextcloud client are becoming an issue.
I want to keep my main server at home. Is there a recommended setup where I can deploy a secondary server here on another continent (on a cheap device like a Raspberry Pi) to act as a local “cache”? The goal is to speed up syncs for my local clients, while this secondary server silently handles the slower upload to the main server in the background. This would also serve as a backup.
I am mainly interested in file and photo sync; contacts and calendar are not an issue as they don’t change much.
Since this is a homelab setup, I’m not interested in enterprise-grade solutions or commercial providers.
Hi @smihael,
A second server that is kept in sync with the first one is not a backup. If you delete a file on server 1 – accidentally or through ransomware – it will be gone on server 2 shortly after. A backup requires independence from the source: no automatic propagation of deletions, and a versioned history that the primary system cannot overwrite.
With that said, here are my thoughts about your main question:
What you are describing is essentially a simplified version of → Nextcloud Global Scale ←
which is designed exactly for geographically distributed setups – but it is an enterprise feature.
For a homelab, I would approach it differently: set up a second, independent Nextcloud instance in Asia and host your files and photos there. Connect the two instances → via Federation ←
Your local clients in Asia sync fast to the local server, and the Europe instance can access shared content via Federation when needed.
When you move back to Europe, you copy your files from the Asia Hub to the Europe Hub and the Asia server becomes obsolete – or you keep it as a regional node and repeat the same pattern in reverse.
This is just one approach – the one I would personally follow. There are other options, but they tend to get complex quickly. I also cannot rule out that simpler, ready-made solutions already exist; I have simply never had a reason to look into it, as I can access my server in Europe from the US just as fast as from Germany, and my brother living in China has no timeout issues either.
h.t.h.
ernolf
I would try this path first, check if there is a problem with the internet connection, either you don’t have enough bandwidth on the server in general or there might be a problem with peering between the providers. If you get better speed from a different access in Asia, or if you get better speed by using a VPN, then it might be an issue with the peering.
If you want this easy and fast, I’d have a look into syncthing.
Or as ernolf proposed, set up a Nextcloud in Asia, then in the night or something, create a backup and push during the night/weekend to your server in Europe (rsync-based, restic, borg, …).