You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add support for custom S3-compatible endpoints in S3CloudStorage #3293
Currently, the serverpod_cloud_storage_s3 package doesn't support configuring custom endpoints for S3-compatible storage providers like Tigris, DigitalOcean Spaces, MinIO, etc. Even when copying and modifying the package, users encounter connection issues due to hardcoded AWS-specific endpoint formatting.
Current behavior:
The S3 endpoint URL is constructed using a fixed format: https://$bucket.s3-$region.amazonaws.com
No way to specify a custom endpoint host
When attempting to use a custom host by modifying the code, connection handshake errors occur
Proposal
Proposed solution:
Add an optional endpoint parameter to the S3CloudStorage constructor that allows specifying a custom S3-compatible endpoint URL format. This would make the package more flexible for use with various S3-compatible storage providers.
pod.addCloudStorage(s3.S3CloudStorage(
serverpod: pod,
storageId:'public',
public:true,
region:'us-west-2',
bucket:'my-bucket-name',
endpoint:'fly.storage.tigris.dev', // New parameter for custom endpoints
));
Error encountered:
When attempting to implement a custom solution:
calling 2
Failed to upload to AWS, with exception:
e: HandshakeException: Connection terminated during handshake
This suggests SSL/TLS negotiation issues with the custom endpoint.
Use Case
-----
Alternatives
This feature would align with the community's needs as discussed in:
Hi, guys, we have the same problem, because we use Yandex Cloud.
We made a local copy of serverpod package and added their an additional parameter - for custom endpoint. And then we changed all method calls to use this parameter instead of standard endpoint string.
So, it's about 6-8 lines of code. However, I am not sure, that our approach is completely fine for a wider range of hosts.
I could help with implementing this.
@Isakdl can I help with this issue? we have local patch for this, which works fine for Yandex. If somebody will help to test with other providers, it should be fine for everyone
Activity
Isakdl commentedon Mar 11, 2025
Good idea, should be included with #3128
iampopal commentedon Mar 11, 2025
Thank you @Isakdl
I am currently using minio https://pub.dev/packages/minio which is a great package and has the ability to custom url and works all great.
Is there is a way to include upload and download of these calls with serverpod?
iampopal commentedon Mar 11, 2025
Or can you suggest how to upload a file from client side now using milio or how to fix the serverpod by my self?
Disregard-Therest commentedon Aug 27, 2025
Hi, guys, we have the same problem, because we use Yandex Cloud.
We made a local copy of serverpod package and added their an additional parameter - for custom endpoint. And then we changed all method calls to use this parameter instead of standard endpoint string.
So, it's about 6-8 lines of code. However, I am not sure, that our approach is completely fine for a wider range of hosts.
I could help with implementing this.
Disregard-Therest commentedon Aug 27, 2025
@Isakdl can I help with this issue? we have local patch for this, which works fine for Yandex. If somebody will help to test with other providers, it should be fine for everyone