Local object storage support? Seems S3 is hardcoded to use port 443?

Hello,

I am trying to get the S3 object storage support working with Garage following this tutorial (and the official Akkoma docu): Apps (Nextcloud, Peertube...) | Garage HQ

But the problem seems to be that even when I set:

config :ex_aws, :s3,
region: “garage”,
scheme: “http://”,
host: “192.168.1.1:3900”

for the local storage backend (which works with Peertube for example), the logs show that it tries to access the backend via

ExAws: HTTP ERROR: :nxdomain for URL: “http://[192.168.1.1:3900]:443/akkoma/788afdf4f5566f95f3e4a684f3e36b6fb764a2e7e374a7d2be91932849b38808.png?uploads=1” ATTEMPT: 10

So it clearly it doesn’t understand the custom port and maybe also the IP?

Thanks for the help.

it’s because it’s expecting a host and you’ve put the port with it, which makes the parser think it’s an ipv6 address

see: ExAws.S3 — ExAws.S3 v2.5.9
there’s a port option

1 Like

I’m using it fine. Highly recommend putting Angie or Nginx in front of your garage instance though.

1 Like

@Jason

Could you share your config that works with a local Garage with me please?

I added the port: 3900 setting and removed the port from the host: entry , and while that gets rid of the error in the logs it still doesn’t seem to actually use the s3 backend for uploading files (but no visible error). But maybe it is related to the media-proxy I have still configured, but before changing all that I would like to confirm that my S3 config is indeed correct.

This is configured in the upload section (different to media-proxy).

Select S3 as the uploader.

Put a https://\<fqdn\>/ as the Base URL

S3 Settings:

Host and Region as defined in Garage

It is the S3 uploader settings that need to be considered:

Bucket: The bucket you have created in garage

Bucket namespace: blank

Truncated namespace: /

The rest can be adjusted for your site specific needs. Don’t forget you need to ensure you allow garage to share files via web as it is denied by default.

1 Like

Thanks.

What do you mean with Truncated namespace: / is that the same as the default truncated_namespace: nil, ?

With blank you mean: bucket_namespace: “”, ?

Does streaming_enabled: true work for you?

/ the same as null? Yes it could be but the default that was populated when I configured on a stock install was incorrect for Garage usage.

bucket_namespace: correct, null

streaming_enabled: is true for me and works.