signal-setup-guide
signal-setup-guide copied to clipboard
how to use LocalStack instead of Amazon s3 service?
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 which version of android and server? There's a policy needed to be added for upload, but I've only tried with minio
@madeindra thanks for reply... Android version : 4.53.6 Server version: 3.21
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:
- 404 Not Found: The URL is not there, could be a problem with routing or it's just not there
- 403 Forbidden: There is an incorrect credential used, making the URL inaccessible
- 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