signal-setup-guide
signal-setup-guide copied to clipboard
Is it possible to setup a signal server locally without the Amazon services?
Server Version : (Server v5.98)
Client Version : (Android vX.XX.XX / iOS vX.XX.XX / Desktop vX.XX.XX)
Dependencies : (Twilio / AWS / MinIO / Nginx / Apache / Self-Signed SSL Certificate / Docker / On Premise Redis / On Premise Postgresql / On Premise Minio / Turn / Localstack)
Describe what are you trying to achieve
Is it possible to setup a signal server locally without the Amazon services?
Describe the issue that you face
I followed the instructions of version 5 of Server Signal but encountered the following error:
Apparently the error is related to setting up Amazon servic.
Logs
PS F:\Nujen\Signal-Server> java -jar service/target/TextSecureServer-5.98.1-SNAPSHOT.jar server service/config/config.yml
INFO [2021-06-15 07:43:40,451] org.eclipse.jetty.util.log: Logging initialized @4602ms to org.eclipse.jetty.util.log.Slf4jLog
INFO [2021-06-15 07:43:40,589] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: /
INFO [2021-06-15 07:43:40,592] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: /
INFO [2021-06-15 07:43:40,809] io.micrometer.core.instrument.push.PushMeterRegistry: publishing metrics for every 1m
WARN [2021-06-15 07:43:44,184] com.amazonaws.internal.InstanceMetadataServiceResourceFetcher: Fail to retrieve token
! java.net.SocketException: Network is unreachable: no further information
! at java.base/sun.nio.ch.Net.pollConnect(Native Method)
! at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:669)
! at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542)
! at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597)
! at java.base/java.net.Socket.connect(Socket.java:645)
! at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:177)
! at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:497)
! at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:600)
! at java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:246)
! at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:351)
! at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:372)
! at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1299)
! at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1277)
! at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1120)
! at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1051)
! at com.amazonaws.internal.ConnectionUtils.connectToEndpoint(ConnectionUtils.java:52)
! at com.amazonaws.internal.EC2ResourceFetcher.doReadResource(EC2ResourceFetcher.java:80)
! ... 22 common frames omitted
! Causing: com.amazonaws.SdkClientException: Failed to connect to service endpoint:
! at com.amazonaws.internal.EC2ResourceFetcher.doReadResource(EC2ResourceFetcher.java:100)
! at com.amazonaws.internal.InstanceMetadataServiceResourceFetcher.getToken(InstanceMetadataServiceResourceFetcher.java:91)
! at com.amazonaws.internal.InstanceMetadataServiceResourceFetcher.readResource(InstanceMetadataServiceResourceFetcher.java:69)
! at com.amazonaws.internal.EC2ResourceFetcher.readResource(EC2ResourceFetcher.java:66)
! at com.amazonaws.util.EC2MetadataUtils.getItems(EC2MetadataUtils.java:403)
! at com.amazonaws.util.EC2MetadataUtils.getData(EC2MetadataUtils.java:372)
! at com.amazonaws.util.EC2MetadataUtils.getData(EC2MetadataUtils.java:368)
! at com.amazonaws.util.EC2MetadataUtils.getEC2InstanceRegion(EC2MetadataUtils.java:283)
! at com.amazonaws.regions.InstanceMetadataRegionProvider.tryDetectRegion(InstanceMetadataRegionProvider.java:59)
! at com.amazonaws.regions.InstanceMetadataRegionProvider.getRegion(InstanceMetadataRegionProvider.java:50)
! at com.amazonaws.regions.AwsRegionProviderChain.getRegion(AwsRegionProviderChain.java:46)
! at com.amazonaws.client.builder.AwsClientBuilder.determineRegionFromRegionProvider(AwsClientBuilder.java:475)
! at com.amazonaws.client.builder.AwsClientBuilder.setRegion(AwsClientBuilder.java:458)
! at com.amazonaws.client.builder.AwsClientBuilder.configureMutableProperties(AwsClientBuilder.java:424)
! at com.amazonaws.client.builder.AwsSyncClientBuilder.build(AwsSyncClientBuilder.java:46)
! at org.whispersystems.textsecuregcm.storage.DynamicConfigurationManager.<init>(DynamicConfigurationManager.java:49)
! at org.whispersystems.textsecuregcm.WhisperServerService.run(WhisperServerService.java:413)
! at org.whispersystems.textsecuregcm.WhisperServerService.run(WhisperServerService.java:210)
! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:59)
! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:98)
! at io.dropwizard.cli.Cli.run(Cli.java:78)
! at io.dropwizard.Application.run(Application.java:94)
! at org.whispersystems.textsecuregcm.WhisperServerService.main(WhisperServerService.java:652)
WARN [2021-06-15 07:43:44,184] com.amazonaws.util.EC2MetadataUtils: Unable to retrieve the requested metadata (/latest/dynamic/instance-identity/document). Failed to connect to service endpoint:
! java.net.SocketException: Network is unreachable: no further information
! at java.base/sun.nio.ch.Net.pollConnect(Native Method)
! at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:669)
! at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542)
! at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597)
! at java.base/java.net.Socket.connect(Socket.java:645)
! at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:177)
! at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:497)
! at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:600)
! at java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:246)
! at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:351)
! at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:372)
! at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1299)
! at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1277)
! at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1120)
! at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1051)
! at com.amazonaws.internal.ConnectionUtils.connectToEndpoint(ConnectionUtils.java:52)
! at com.amazonaws.internal.EC2ResourceFetcher.doReadResource(EC2ResourceFetcher.java:80)
! ... 22 common frames omitted
! Causing: com.amazonaws.SdkClientException: Failed to connect to service endpoint:
! at com.amazonaws.internal.EC2ResourceFetcher.doReadResource(EC2ResourceFetcher.java:100)
! at com.amazonaws.internal.InstanceMetadataServiceResourceFetcher.getToken(InstanceMetadataServiceResourceFetcher.java:91)
! at com.amazonaws.internal.InstanceMetadataServiceResourceFetcher.readResource(InstanceMetadataServiceResourceFetcher.java:69)
! at com.amazonaws.internal.EC2ResourceFetcher.readResource(EC2ResourceFetcher.java:66)
! at com.amazonaws.util.EC2MetadataUtils.getItems(EC2MetadataUtils.java:403)
! at com.amazonaws.util.EC2MetadataUtils.getData(EC2MetadataUtils.java:372)
! at com.amazonaws.util.EC2MetadataUtils.getData(EC2MetadataUtils.java:368)
! at com.amazonaws.util.EC2MetadataUtils.getEC2InstanceRegion(EC2MetadataUtils.java:283)
! at com.amazonaws.regions.InstanceMetadataRegionProvider.tryDetectRegion(InstanceMetadataRegionProvider.java:59)
! at com.amazonaws.regions.InstanceMetadataRegionProvider.getRegion(InstanceMetadataRegionProvider.java:50)
! at com.amazonaws.regions.AwsRegionProviderChain.getRegion(AwsRegionProviderChain.java:46)
! at com.amazonaws.client.builder.AwsClientBuilder.determineRegionFromRegionProvider(AwsClientBuilder.java:475)
! at com.amazonaws.client.builder.AwsClientBuilder.setRegion(AwsClientBuilder.java:458)
! at com.amazonaws.client.builder.AwsClientBuilder.configureMutableProperties(AwsClientBuilder.java:424)
! at com.amazonaws.client.builder.AwsSyncClientBuilder.build(AwsSyncClientBuilder.java:46)
! at org.whispersystems.textsecuregcm.storage.DynamicConfigurationManager.<init>(DynamicConfigurationManager.java:49)
! at org.whispersystems.textsecuregcm.WhisperServerService.run(WhisperServerService.java:413)
! at org.whispersystems.textsecuregcm.WhisperServerService.run(WhisperServerService.java:210)
! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:59)
! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:98)
! at io.dropwizard.cli.Cli.run(Cli.java:78)
! at io.dropwizard.Application.run(Application.java:94)
! at org.whispersystems.textsecuregcm.WhisperServerService.main(WhisperServerService.java:652)
com.amazonaws.SdkClientException: Unable to find a region via the region provider chain. Must provide an explicit region in the builder or setup environment to supply a region.
at com.amazonaws.client.builder.AwsClientBuilder.setRegion(AwsClientBuilder.java:462)
at com.amazonaws.client.builder.AwsClientBuilder.configureMutableProperties(AwsClientBuilder.java:424)
at com.amazonaws.client.builder.AwsSyncClientBuilder.build(AwsSyncClientBuilder.java:46)
at org.whispersystems.textsecuregcm.storage.DynamicConfigurationManager.<init>(DynamicConfigurationManager.java:49)
at org.whispersystems.textsecuregcm.WhisperServerService.run(WhisperServerService.java:413)
at org.whispersystems.textsecuregcm.WhisperServerService.run(WhisperServerService.java:210)
at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:59)
at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:98)
at io.dropwizard.cli.Cli.run(Cli.java:78)
at io.dropwizard.Application.run(Application.java:94)
at org.whispersystems.textsecuregcm.WhisperServerService.main(WhisperServerService.java:652)
PS F:\Nujen\Signal-Server>
Screenshots
Attach screenshots of your error here
Additional context
If you have any additional info, please explain it here
My config.yml file
`abuseDatabase: # Postgresql database configuration driverClass: org.postgresql.Driver user: postgres password: postgres url: jdbc:postgresql://127.0.0.1:5432/abusedb
accountDatabaseCrawler: chunkSize: 1000 chunkIntervalMs : 8000
accountsDatabase: driverClass: org.postgresql.Driver user: postgres password: postgres url: jdbc:postgresql://127.0.0.1:5432/accountdb
apn: sandbox: true bundleId: test keyId: test teamId: test signingKey: test
awsAttachments: # AWS S3 configuration accessKey: postgres accessSecret: postgres bucket: signal region: us-west-2 endpoint: http://127.0.0.1:9000 # add this entry, then change to your own domain & Minio port
backupService: userAuthenticationTokenSharedSecret: test uri: redis://127.0.0.1:6379/ backupCaCertificate: test
cacheCluster: # Redis server configuration for cache cluster urls: - redis://127.0.0.1:6379/
attachments: # S3 configuration
accessKey: Q3AM3UQ867SPQQA43P2F
accessSecret: zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG
bucket: bucket
region: us-west-2
endpoint: https://play.min.io # add this entry, then change to your own domain & Minio port
cdn: accessKey: postgres accessSecret: postgres bucket: signal region: us-west-2 endpoint: http://127.0.0.1:9000 # add this entry, then change to your own domain & Minio port
clientPresenceCluster: urls: - redis://127.0.0.1:6379/
directory: client: # Configuration for interfacing with Contact Discovery Service cluster userAuthenticationTokenSharedSecret: d59ffd02a654eb964d45417edbbab477 # hex-encoded secret shared with CDS used to generate auth tokens for Signal users userAuthenticationTokenUserIdSecret: 2387ae71fc6ed2f179ed9689bbc3e755 # hex-encoded secret shared among Signal-Servers to obscure user phone numbers from CDS sqs: accessKey: postgres # AWS SQS accessKey accessSecret: postgres # AWS SQS accessSecret queueUrls: - http://127.0.0.1:9000/minio/signal # AWS SQS queue url
server: - replicationName: minioadmin replicationUrl: http://127.0.0.1:9000 # CDS replication endpoint base url replicationPassword: minioadmin # CDS replication endpoint password replicationCaCertificate: | -----BEGIN CERTIFICATE----- MIIF7zCCA9egAwIBAgIUUme0O2hOX+OWLwfKyIzgMFl4sjcwDQYJKoZIhvc00000 BQAwgYYxCzAJBgNVBAYTAklEMRQwEgYDVQQIDAtES0kgSmFrYXJ0YTEQMA4GA1UE BwwHSmFrYXJ0YTEPMA0GA1UECgwGVGVsa29tMQwwCgYDVQQLDANEZXYxEDAOBgNV BAMMB2NoYXRhcHAxHjAcBgkqhkiG9w0BCQEWD2RldkBleGFtcGxlLmNvbTAeFw0y MDAxMTAwODEzMzFaFw0yMTAxMDkwODEzMzFaMIGGMQswCQYDVQQGEwJJRDEUMBIG A1U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7Bnm8ChFnw/CqeTRbxwa5Po7tj47CF ZH9NPpi3UEYGhAeyTcIPpa7mcgaIDoOrYA7Ku6BT2/KhlQu6vVg5xw3QBrnfplm+ 9VOnfKKoH7nD2lrW7rVZ/EZGzeChtI0AzCAlcnBQCnXziY5++LkWCzPmofHq+moP OAHyLMb3pUyPdCgTETLrrgNixrlb5s/rqTrwNe3XUo1YrPMTYzCN5mrCqQtOsvFp 2L+y8RlfQ+AFJeQDCC6eUFYfK3Ls6qz7agm19EmyXO642M5eOdT4tobgt24YsnGx TupofOEbBU9F31LELSwe3bAu5N8RZvhay5C5u9ZrrUNlp1pr1Ljy0r51SmckmyY7 4g8IT28E3cZhyFUsqwihxlwf9oHhxAzxOTVWiSobibc8r0q3hp3PutQFyPLRrfMf hDPTpUPm8v1rFRxNWXpe3w92y/iiJ53S4CWVmBIW9iKGqOyj7l2VEqe7KGKVO3Ma Z5b5jQMf6d2N1Qk2tt8YnL6EbT0mOJedhAfnkJl71UZzK7Lz1kLT+1MnlF+gazol vJiET6YNSW7sU/GNafapLfIqXU2wCfOFcrLEsW+DOEM2MLcY48ypPDcnwsl6OG+K qXeFHFld6v6s6pIGmc50pflU4qSJHAASDsUxw08xKxXnTEg= -----END CERTIFICATE-----
gcm: senderId: 12345 apiKey: test
gcpAttachments: # GCP Storage configuration domain: domain.com email: [email protected] maxSizeInBytes: 1000000 pathPrefix: / rsaSigningKey: | -----BEGIN CERTIFICATE----- ..... -----END CERTIFICATE-----
keysDynamoDb: region: us-west-2 tableName: test
messageCache: # Redis server configuration for message store cache persistDelayMinutes: 10
cluster: urls: - redis://127.0.0.1:6379/
messageDynamoDb: region: us-west-2 tableName: test
metricsCluster: urls: - redis://127.0.0.1:6379/
micrometer: uri: proxy://127.0.0.1:2878/
paymentsService: userAuthenticationTokenSharedSecret: test # hex-encoded 32-byte secret shared with MobileCoin services used to generate auth tokens for Signal users fixerApiKey: test paymentCurrencies: - USD
pubsub: url: redis://127.0.0.1:6379/cache replicaUrls: - redis://127.0.0.1:6379/cacheReplica
push: queueSize: 200 # Size of push pending queue
pushSchedulerCluster: urls: - redis://127.0.0.1:6379/
recaptcha: secret: test
remoteConfig: authorizedTokens: - dummy globalConfig: # keys and values that are given to clients on GET /v1/config dummy: dummy
server: applicationConnectors: - type: http port: 8080 adminConnectors: - type: http port: 8081
storageService: userAuthenticationTokenSharedSecret: test uri: redis://127.0.0.1:6379/ storageCaCertificate: test
turn: # TURN server configuration secret: secret # TURN server secret uris: - stun:example.com:3478 - stun:example.com:5349 - turn:example.com:3478?transport=udp - turn:example.com:5349?transport=udp
twilio: # Twilio gateway configuration accountId: test accountToken: test
numbers:
- "+12565769630"
nanpaMessagingServiceSid: test # Twilio SID for the messaging service to use for NANPA. messagingServiceSid: test # Twilio SID for the message service to use for non-NANPA. verifyServiceSid: test # Twilio SID for a Verify service localDomain: example.com # Domain Twilio can connect back to for calls. Should be domain of your service. defaultClientVerificationTexts: ios: test # Text to use for the verification message on iOS. Will be passed to String.format with the verification code as argument 1. androidNg: test # Text to use for the verification message on android-ng client types. Will be passed to String.format with the verification code as argument 1. android202001: test # Text to use for the verification message on android-2020-01 client types. Will be passed to String.format with the verification code as argument 1. android202103: test # Text to use for the verification message on android-2021-03 client types. Will be passed to String.format with the verification code as argument 1. generic: test # Text to use when the client type is unrecognized. Will be passed to String.format with the verification code as argument 1. regionalClientVerificationTexts: # Map of country codes to custom texts 999: # example country code ios: test androidNg: test # Text to use for the verification message on android-ng client types. Will be passed to String.format with the verification code as argument 1. android202001: test # Text to use for the verification message on android-2020-01 client types. Will be passed to String.format with the verification code as argument 1. android202103: test # Text to use for the verification message on android-2021-03 client types. Will be passed to String.format with the verification code as argument 1. generic: test # Text to use when the client type is unrecognized. Will be passed to String.format with the verification code as argument 1. # … all keys from defaultClientVerificationTexts are required androidAppHash: test # Hash appended to Android verifyServiceFriendlyName: test # Service name used in template. Requires Twilio account rep to enable
unidentifiedDelivery: certificate: CiYI1wgSIQVsFZpBokYT1C7bXDQguqZ44dCK3C0NN1Pb1NqHAuO3PhJAgz+VV2DKNh4GozdVUAfktMql2gMCu9O2CwFTa1ZtXm8d8TeSzcYO8jf25L8iNDJ+/5p4Bok2Xm+lqOzfo1Jjjg== # java -jar TextSecureServer.jar certificate -ca privateKey: MGwHvgIpnNPYC/hJpmDO2lWj5kwoP6PMgZiGKliyyHs= # java -jar TextSecureServer.jar certificate --key priv_key_from_step_above --id key_ID expiresDays: 365
voiceVerification: url: https://example.com locales: - en
zkConfig: serverSecret: test # java -jar TextSecure.jar zkparams serverPublic: test # java -jar TextSecure.jar zkparams enabled: true
#------------------------------------------------------------------
accountsDynamoDb: region: us-west-2 tableName: accountstbl phoneNumberTableName: phonenumtbl
appConfig: application: test environment: test configuration: test
asnTable: s3Region: test maxSize: 100 objectKey: test s3Bucket: test refreshInterval: 60
donation: uri: example.com # value apiKey: test # value supportedCurrencies: - test # 1st supported currency circuitBreaker: failureRateThreshold: 100 # value ringBufferSizeInHalfOpenState: 100 # value ringBufferSizeInClosedState: 100 # value waitDurationInOpenStateInSeconds: 60 # value retry: maxAttempts: 100 # value waitDuration: 5000 # value
migrationDeletedAccountsDynamoDb: region: us-west-2 tableName: test
migrationRetryAccountsDynamoDb: region: us-west-2 tableName: test
pushChallengeDynamoDb: region: us-west-2 tableName: test
rateLimitersCluster: urls: - redis://127.0.0.1:6379/
reportMessageDynamoDb: region: us-west-2 tableName: test
torExitNodeList: s3Region: test maxSize: 100 objectKey: test s3Bucket: test refreshInterval: 60
`
It's not yet possible, some components are not modified to be run local yet