Self-hosting Nextcloud with Dokku and s3 compatible storage
I wrote a post on how to self host Nextcloud with Dokku - https://vitobotta.com/2022/03/11/self-hosting-nextcloud-with-dokku-and-s3-compatible-storage/
Usually tutorials are about plain installation or standard Docker, but I really like Dokku.
In the post I am also using Wasabi (any s3 compatible service will do) as primary storage instead of local storage. So I can store any amounts of data for cheap.
Thoughts? Do you use Nextcloud? If yes, how do you self host it?
Lead Platform Architect at the day job, Ethical Hacker/Bug Bounty Hunter on the side
Comments
I'm not sure about how Nextcloud implements their S3 layer, nor have I used their S3 integration myself.
Having said that I'd suggest staying away from anything that maps between an object storage (S3) and a file-based storage layer (Nextcloud). Object storages operate on a different paradigm and doing this can lead to extraneous requests which negatively affect performance.
When you configure S3 as the primary storage provider for Nextcloud it treats it as a way of storing "blocks" of data rather than storing the files directly, which they claim improves performance:
Docs: https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/primary_storage.html
I have tested this myself and performance was fine for my usage, but there may be some cases where it isn't ideal.
Yeah I can confirm, I don't see much difference in performance compared to local storage provided the latency between Nextcloud and the object storage isn't high. It's a different story though if you enable encryption.
Lead Platform Architect at the day job, Ethical Hacker/Bug Bounty Hunter on the side
Interesting. Using object storage (which is a persistent key-value store) to implement another object storage (where the keys are on the local database and the files are on the object storage) This usage is fine, and probably even necessary to maximize performance since object storages don't actually run well when files are uploaded in a typical folder like structure.