Public storj access?

How do you make a bucket publicly available with storj?
Looking to host our software repos on Storj and all I can find is sharing private files.

This can be done via Access Grants and Link Sharing. Please note that you can control permissions to allow and disallow what the third parties you share the bucket with will be able to do (list, download, delete etc) and you can also restrict the time that the data will be accessible.

This can be done via Access Grants

The problem with access grants is they require access keys?
Ideally i’m looking for plain direct access to buckets.

For example, on wasabi today we put coolthing.zip into our cool things bucket and can access it at https://s3.us-east-1.wasabisys.com/coolthings/coolthing.zip

I’m ok deploying a gateway or something as well to natively connect to stor and present our files, but that doubles our bandwidth usage which kinda sucks.

You could consider hosting a static website: Host a Static Website | Storj Docs

Ok, I feel like that’s going to be the only real solution with storj. It’s not great though since we’re paying for bandwidth three times (egress from Storj, and egress + ingress to our hosting provider)

You can share the bucket via uplink

uplink share --url --not-after +2h sj://my-bucket/coolthing/coolthing.zip

You will get an URL to share, the third party can download the shared object using this URL.
You can also share the bucker or prefix and anyone who got this URL will be able to see a content of the shared bucket/prefix and can download any file.

uplink share --url --not-after +2h sj://my-bucket/coolthing/

Regarding double spending on bandwidth - what is your provider?

Like this? https://link.eu1.storjshare.io/s/jws5cnue3pwx42a5tkfnq6qdj3qa/boonjiprojectcom/

1 Like

That link doesn’t load fully…

Same here. It is probably the same issue that has already been reported: Zero bytes shown

1 Like

that also isn’t a “plain” path. (notice the broken image below referencing the png)

It’s wrapping the png with a preview thing. (notice the above doesn’t load)

I’ve looked at Storj a few times in the past, and the limiting factor was always “external usability”. Storj should really provide hosted-plain http / https gateways for content (and even charge for it… that’s fine). The hosted s3 endpoint doesn’t seemingly allow public access.

I’ve been turned on to the storj gateway-st which definitely looks to help solve the issue. The big downside is double - triple the bandwidth usage, asking customers to host infrastructure granting access to storj files, and it being a bit “rough around the edges”.

I feel like Storj is focusing on being “drop-box like” when they should be focused on being a cheap competitor to Backblaze B2, and Wasabi S3.

You can use the /raw/ link and then it only references the file, not the preview page:

https://link.eu1.storjshare.io/raw/jws5cnue3pwx42a5tkfnq6qdj3qa/boonjiprojectcom/decentralizedassets-highres/9871.png

I don’t think you could have been more wrong. It is an S3 storage solution with better encryption and access control, designed for developers. Dropbox is for end users, the only thing getting close to a StorJ end user product is still in alpha - [Testers Needed] Experimental Backup App

1 Like

Yes nice one.

Depending on what you need you could also go with
http://link.eu1.storjshare.io/s/jws5cnue3pwx42a5tkfnq6qdj3qa/boonjiprojectcom/decentralizedassets-highres/9871.png?wrap=0

Which is nice because you could also display the distribution map:
http://link.eu1.storjshare.io/s/jws5cnue3pwx42a5tkfnq6qdj3qa/boonjiprojectcom/decentralizedassets-highres/9871.png?map

A good example of something that is seemingly undocumented? I don’t see references to it anywhere :slight_smile:

The raw url path thing definitely opens up potential to use link.*.storjshare.io directly and simplify things.

So theoretically we could:

  1. send requests to link.eu1.storjshare.io/raw/534534534t6345t345345/bucket/thing
  2. think random id is generated per share, and with an infinite share it should never expire
  3. bandwidth would be subtracted from our account’s pool?

We already have a service which redirects requests via HTTP 302’s from our infrastructure to wasabi s3 buckets, so it sounds like we could redirect to link.us1.storjshare.io instead :see_no_evil:

https://docs.storj.io/dcs/api-reference/uplink-cli/share-command/

To download content directly, use /raw/ in Linkshare URL ex: https://link.us1.storjshare.io/raw/ju34skavohcqezr6vlfgshg5nmjq/dwebdemo/isthataquestion.mp4

1 Like

Hm… this doesn’t seem to be working… Just getting “bucket not found”

$ uplink --access haiku ls sj://haiku-release/
PRE r1beta3/
PRE r1alpha1/
PRE r1beta2/
PRE r1alpha4/
PRE r1alpha2/
PRE r1alpha4.1/
PRE r1alpha3/
OBJ 2022-02-17 13:22:54           94 README
PRE r1beta1/
$ uplink share --not-after=none --url=true sj://haiku-release
Sharing access to satellite XXX@us1.storj.io:7777
=========== ACCESS RESTRICTIONS ==========================================================
Download  : Allowed
Upload    : Disallowed
Lists     : Allowed
Deletes   : Disallowed
NotBefore : No restriction
NotAfter  : No restriction
.
.
Endpoint     : https://gateway.us1.storjshare.io
Public Access:  true
=========== BROWSER URL ==================================================================
REMINDER  : Object key must end in '/' when trying to share recursively
URL       : https://link.us1.storjshare.io/s/jvaksmpuohg7avu6gs5biznr6ubq/haiku-release/

nevermind. got it. Forgot to specify --access for the share command

ok… final question. Is there anywhere to see the shares you’ve created?
The uplink cli doesn’t seem to have a “share list” command, the webui also doesn’t show it.

Nowhere. All these links contains macaroon (or wrapped macaroon in case of using --url option to get a linkshare link), it will allow you to have all required information - derived API key, encryption key, satellite and caveats.
So no, if you did not write it somewhere - these shared links doesn’t stored anywhere, include satellites.
The only access grants are stored on linkshare service in encrypted form though. But it doesn’t help, if you do not know at least a public key (the jvaksmpuohg7avu6gs5biznr6ubq part).
See

You can Revoke an Access to an Object | Storj Docs in any time