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?

404 Error: Signature Not Found

Thanked by (2)Erisa Aidan

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.

    Thanked by (1)Aidan
  • @stevewatson301 said:
    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

    When using an object store as primary storage, Nextcloud assumes exclusive access over the bucket being used.

    Contrary to using an object store as external storage, when an object store is used as primary storage, no metadata (names, directory structures, etc) is stored in the object store. The metadata is only stored in the database and the object store only holds the file content by unique identifier.

    Because of this primary object stores usually perform better than when using the same object store as external storage but it restricts being able to access the files from outside of Nextcloud.

    I have tested this myself and performance was fine for my usage, but there may be some cases where it isn't ideal.

    Thanked by (1)pikachu
  • 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.

    Thanked by (1)Erisa

    404 Error: Signature Not Found

  • edited March 2022

    @Erisa said:

    @stevewatson301 said:
    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

    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) :tongue: 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.

    Thanked by (1)Erisa
Sign In or Register to comment.