signal-setup-guide icon indicating copy to clipboard operation
signal-setup-guide copied to clipboard

how to use LocalStack instead of Amazon s3 service?

Open amirm20 opened this issue 4 years ago • 3 comments

Hi, I am trying to install Signal-Server without AWS. I am trying using LocalStack. I installed LocalStack in my server with endpoint("http://localhost:4566") and created a bucket("mybucket") in s3 service. also created SQS queue. I changed server code WhisperServerService.java: AmazonS3 cdnS3Client = AmazonS3Client.builder().withCredentials(credentialsProvider).withRegion(config.getCdnConfiguration().getRegion()).build(); to: AmazonS3 cdnS3Client = AmazonS3Client.builder() .withCredentials(credentialsProvider) .withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration("http://localhost:4566", "us-west-2")) .withPathStyleAccessEnabled(true) .build(); but profile picture uploading not work at all. Please help me to do this. Thanks

amirm20 avatar Feb 10 '21 13:02 amirm20

@amirm20 which version of android and server? There's a policy needed to be added for upload, but I've only tried with minio

madeindra avatar Feb 12 '21 04:02 madeindra

@madeindra thanks for reply... Android version : 4.53.6 Server version: 3.21

amirm20 avatar Feb 12 '21 07:02 amirm20

While debugging this, I recommend you to look into the server log, and try uploading profile picture again. Some error can help you getting into the real problem.

Some usual errors are:

  1. 404 Not Found: The URL is not there, could be a problem with routing or it's just not there
  2. 403 Forbidden: There is an incorrect credential used, making the URL inaccessible
  3. 405 Method Not Allowed: It means the app cannot do some action, be it uploading or updating data, this could be problem with the app or the s3 server

While you at it, I saw that you change your WhsiperServerService.java, what was that? AFAIK, Localstack suppose to work the same with AWS, so any URL change need to be put on the config.yml, not on the code itself

madeindra avatar Feb 12 '21 08:02 madeindra