website logo
Create accountLogin
Home
DCS
Node
Resources
Help center
Navigate through spaces
Home
DCS
Node
Resources
Help center
⌘K
Storj DCS
Get Started
AWS CLI and Hosted Gateway MT
AWS SDK and Hosted Gateway MT
Uplink CLI
Satellite Admin Console
Object Browser
Downloads
Download Uplink CLI
Download Self-hosted S3 Compatible Gateway
Download Storj Client Libraries
SDKs & Reference
Tutorial
How-to Guides
Concepts
Support
Support Overview
FAQ
Community Forum
Status Page
Help Desk
Billing, Payment & Accounts
Resources
Moved Documents
Docs powered by archbee 
9min

Mastodon

We have a webinar walking you through it, but you can also refer to the steps below:

The following instructions have been tested with Mastodon 4.0.2.

The things you need here are:

  • A Storj bucket
  • S3 compatible credentials (access key and secret key)
  • Linksharing credentials for public access

Because of the linksharing credentials part, the easiest way to generate all of the things you need is through our uplink CLI.

After downloading and installing the Uplink CLI (so that ls, mb, cp, etc work), you can use the following steps:

To make a bucket, you can choose the bucketname, like mastodon, and do

Shell
|

In subsequent steps it'll be referred to as BUCKET.

To generate S3 compatible credentials Access Key ID and Secret Key, run

Shell
|

Along with the credientials, the output will have the AWS endpoint you'll need to set which is https://gateway.storjshare.io.

Storj doesn’t have the same sort of concept of public buckets that S3 has. We support public access, but it’s able to be more fine-grained than at the bucket level. To generate LINKSHARINGKEY you can do

Shell
|

You’ll get a Browser URL, but the URL is not quite right. It will be of the form https://link.storjshare.io/s/LINKSHARINGKEY/BUCKET/. To make the content embeddable, swap the /s/ for /raw/. This url should be used as the AWS alias host or AWS url.

For Mastodon to use this url we'll need to set the S3_ALIAS_HOST setting (which seems to support path prefixes crammed in there as well). Note the lack of https:// and the lack of trailing slash below.

Once you have these things, you should be able to plop this configuration in to your Mastodon’s .env.production configuration and you should be all set.

ini
|

If you’re doing the rake mastodon:setup wizard and Storj isn't listed, choosing Minio as your object storage provider and telling it you do want to access the uploaded files from your own domain should allow you to set the same settings in the setup wizard.

Of course, these instructions mean all your media will be served from link.storjshare.io, and maybe you don’t like that. You can always follow our instructions for sharing a bucket via DNS settings for your own domain name. If you do that, you’d replace S3_ALIAS_HOST with your domain name backed by Storj.

Updated 21 Dec 2022
Did this page help you?
Yes
No
UP NEXT
PixelFed
Docs powered by archbee