How to add Storj to Nextcloud "as external storages"?

Ah it looks like I got it working. Here are steps I did:

1 - Downloading files (uplink and gateway):

  1. curl -L https://github.com/storj/gateway/releases/latest/download/gateway_linux_amd64.zip -o gateway_linux_amd64.zip && unzip gateway_linux_amd64.zip
  2. curl -L https://github.com/storj/storj/releases/latest/download/uplink_linux_amd64.zip -o uplink_linux_amd64.zip && unzip uplink_linux_amd64.zip
  3. chmod 755 gateway
  4. chmod 755 uplink

2 - Setting up (uplink):

  1. ./uplink setup
  2. Create a bucket by running ./uplink mb sj://example (See Using the Uplink CLI - Storj Docs for other commands like deleting/removing a bucket, listing files inside a bucket, etc.)

3 - Setting up (gateway):

  1. screen (to let gateway run on another screen)
  2. ./gateway setup (See Setting Up a Self-Hosted S3 Compatible Gateway - Storj Docs for more detail)
  3. ./gateway run
  4. Make sure to copy Endpoint, Access key, and Secret key to somewhere safe (like a password manager)

4 - Setting up (Nextcloud):

  1. Open External storages setting page
  2. Input a folder name
  3. Select Amazon S3 for External storage
  4. Select Access key for Authentication type
  5. Input example for Bucket (See above: 2.2)
  6. Input 127.0.0.1 for Hostname (See above: 3.4)
  7. Input 7777 for Port (See above: 3.4)
  8. Leave Region blank
  9. Check Enable Path Style
  10. Paste your Access key (See above: 3.4)
  11. Paste your Secret key (See above: 3.4)
  12. Click three-dot-icon for advanced settings
  13. Click check mark to complete the configuration

And the external folder should be available!

If you want to sync the folder to your local machine, open the Nextcloud client and follow the instruction displayed there.

Please make sure that syncing the external storage with other machines multiplies the bandwidth. Also storing a bunch of tiny files can be costly (See: Nextcloud on Storj? - #17 by kevink).

On Tardigrade there are three ways of calculating fees (Object Storage fee, Per Object Fee, Bandwidth Fee). I would recommend you to read https://documentation.tardigrade.io/pricing/billing-and-payment carefurelly before you move your files to the external folder on your Nextcloud instance.

While Storj have arrived at 1.0 the procedures written above are subject to change after future release. Please follow https://documentation.tardigrade.io/ periodically for available changes.

Also according to @kevink:

2 Likes

Hello!
Iā€™m looking into linking my nextcloud server with storj dcs. Are the above steps still valid and/or is there an up-to-date howto to do so?
Thanks in advance!

Hi @silaxe nobody has told me anythin about an update to those instructions. Therefore, I think they should still work. What happens when you step through it? thanks!

1 Like

Thanks Jocelyn! I will do this in the next days and will get back to you with my feedback.

2 Likes

Hi all,
I have managed to set up storj as external storage for nextcloud thanks, among others, to Andisersā€™ explanations. I am using it for backup purposes.
Is anyone using storj for nextcloud as primary storage? Iā€™d be interested to do this in the long run but would like to know first how fast and reliable this option is.
Thanks!

Iā€™ve worked on an app for Nextcloud so that you donā€™t need the S3 gateway. You can install it through the app store Storj - Apps - App Store - Nextcloud

Perhaps you can give it a try and see if you like it.

Is anyone using storj for nextcloud as primary storage? Iā€™d be interested to do this in the long run but would like to know first how fast and reliable this option is.

I have not done a thorough comparison but I have some decent guesses

  • Youā€™ll use more Storj bandwidth from things like tumbnails and generated assets and whatever apps decide to put there.
  • File browser will be faster because all the metadata is in the local SQL database
  • Other parts of Nextcloud may be slower.
  • Less chance of bugs because Nextcloud is treating Storj as a simple key-value store rather than as a file system.

It doesnā€™t sound like the best fit for Storj but should work fine.

4 Likes

Will this work in the Nextcloud docker?

Hello @Baldman30,
Welcome back!

Yes, but you need to build an own image (only for a native integration though):

The S3 integration should work without that.

Hey, Thanks for the reply.
I looked at it today but couldnā€™t get it working. Whatā€™s the basic breakdown of how this works. I just need to clarify. I assume the Uplink connects to Storj with the access details from Storj. Then the access details generated during the gateway setup are for Nextcloud. Thereā€™s also access details generated during the Uplink setup. Are these meant to appear in my Storj account.

Sorry for my confusion.

Thanks :slightly_smiling_face:

The standard docker image doesnā€™t contain a mandatory dependency:

So you need to make a custom Dockerfile and build your own image, which will include it.
Or perform these commands every time when you update the container.
The alternative is to use a standard S3-compatible integration (with a Server-side Encryption of courseā€¦).

not the Uplink CLI, the libuplink (the core library used by Uplink CLI too and by this third party app).

This is not required to setup the External Storage for Nextcloud. But it would be useful to generate a derived access grant (and more restrictive usually).

Thanks for your help. I got it working when I realised, I didnā€™t need to do any of the above. I just needed the S3 credentials from Storj. Then just fill in the Amazon S3 external storage app settings with those credentials. Done. Thanks again :grinning:

2 Likes

Āæ Lo lograste con estos pasos ?

https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/primary_storage.html

Hola @castrov,
Bienvenido al foro!

SĆ­, seguir las instrucciones suele ayudar.

1 Like