Using Storj DCS as Pixelfed Storage

Hi :wave:,
I’m struggling with setting up Storj DCS as my storage due to lack of documentation.
Currently, I can upload files successfully… But they’re not showing up in my timeline .

What should I set as AWS_USE_PATH_STYLE_ENDPOINT ? true or false ?

Also Do I need to set anything as AWS_URL ?

TIA.

#pixelfed #mastodon

I have Self Hosted Gateway Up and Running

What should I do next ? … I have entered all credentials in .env … Kindly help me

I think I need to setup Nginx Reverse Proxy … Kindly someone tell me how to do that !

Hello @mitexleo,
Welcome to the forum!

Have you figured out what should you specify and where?
If you used a Self-hosted S3-Compatible Gateway (GatewayST), the hostname would be http://localhost:7777 by default

The NGINX setup you can easily find with Google, there is nothing Storj-specific. You will use a proxy_pass clause with pointing to your GatewayST instance, i.e.

    location / {

        proxy_pass http://localhost:7777;
    }
1 Like

Thanks :blush:… What should I do next ?

Kindly give me step by step guide to use Storj DCS similiar to DO Spaces… I messed up everything :sleepy:

There is no such one.
So basically configuration is similar, you should provide

  • AWS_ACCESS_KEY_ID with Access Key from GatewayST instance
  • AWS_SECRET_ACCESS_KEY with Secret Key from GatewayST instance
  • AWS_BUCKET with name of your bucket
  • AWS_ENDPOINT with http://localhost:7777
  • AWS_URL with http://localhost:7777
  • AWS_USE_PATH_STYLE_ENDPOINT to true

But I can assume that it want to have a public domain, not localhost. For that you need to install NGINX on your server and configure it to use SSL (for example, Configuring HTTPS servers) and add the location section as provided above inside the server section.
You need also configure your domain on some DNS provider to point to your server.
After that you can replace localhost:7777 in the Pixelfed configuration to my-favorite.domain.tld

1 Like

Facing an weird issue … My application requires https for endpoint url … I’ve enabled ssl for cdn.mydomain.com … The problem is … If I visit with https It shows error 404 not found … But If If visit normally with http it shows the MinIO dashboard …

What should I do now ? I have enabled 301 redirect…

Anything wrong here ?

The https redirect should be configured differently.

server {
    listen 80 default_server;

    server_name cdn.mydomain.com;

    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl default_server;

    server_name cdn.mydomain.com;

    location / {
        proxy_pass http://0.0.0.0:7777;
    }
}
1 Like

Okay ! Boss
… Will try .

What should I set in place of default _server ? I’m getting a conflict error …

nginx: [emerg] no “ssl_certificate” is defined for the “listen … ssl” directive in /etc/nginx/sites-enabled/default:32

Okay … Managed to solve this by including ssl_certificate and ssl_certificate_key … But getting error 502

Here is my nginx log

Is there any way to support http ? It will solve the problem easily…

I’m new to laravel actually

My bucket visibility is set to public in filesystems.php … I’ve tried by removing that … but its clear that the issue is http

nothing, this is a reserved word.

From the error

try ssl - Nginx upstream to https host - ssl3_get_record:wrong version number - Stack Overflow
and also make sure that you have two server directives, one for 80, and the second for 443 and proxy_pass.
Also make sure that your proxy_pass is pointed to http, not https
By the way, I’m not sure why you uses 0.0.0.0:7777 instead of localhost:7777, as it should.

1 Like