Remove registration shared secret and update database info
This commit is contained in:
parent
bb23fe1a0f
commit
632772250e
27
README.md
27
README.md
@ -17,7 +17,6 @@ A simple way to set up Synapse with bridges for WhatsApp, Telegram, and Discord,
|
||||
## Features
|
||||
|
||||
- Integrated bridges for WhatsApp, Telegram, and Discord
|
||||
- Automated media management with Cleanmedia
|
||||
- Simple setup process with provided scripts
|
||||
- Docker-based deployment for easy maintenance
|
||||
|
||||
@ -40,28 +39,28 @@ This script will:
|
||||
- Prompt you for your domain (the one you configured in "Before Starting")
|
||||
- Generate a secure database password
|
||||
- Create your private key and config in the `./config/synapse` directory
|
||||
- Display two important pieces of information:
|
||||
- The "Registration shared secret"
|
||||
- The Database URI
|
||||
- Display the Database configuration info
|
||||
|
||||
**Important**: Make sure to save both the registration shared secret AND the Database URI in a secure location. The Database URI will be needed later when configuring the bridges for WhatsApp, Telegram, and Discord.
|
||||
**Important**: Make sure to save the Database information in a secure location. The Database URI will be needed later when configuring the bridges for WhatsApp, Telegram, and Discord.
|
||||
|
||||
3. Open your configuration file located at `./config/synapse/homeserver.yaml`. **You may need `sudo` to edit this file.** Search for `registration_shared_secret` and paste the registration secret you copied in the previous step. The section should look similar to this:
|
||||
3. Open your configuration file located at `./config/synapse/homeserver.yaml`. **You may need `sudo` to edit this file.** Search for `database` and replace it with the following:
|
||||
|
||||
```yaml
|
||||
client_api:
|
||||
registration_disabled: true
|
||||
registration_requires_token: false
|
||||
registration_shared_secret: "YourBigCopiedKey123" # This is your key!
|
||||
guests_disabled: false
|
||||
enable_registration_captcha: false
|
||||
recaptcha_api_js_url: ""
|
||||
database:
|
||||
name: psycopg2
|
||||
args:
|
||||
user: synapse
|
||||
password: YourBigPassword # Replace with your DB password here!
|
||||
dbname: synapse
|
||||
host: postgres
|
||||
cp_min: 5
|
||||
cp_max: 10
|
||||
```
|
||||
|
||||
4. Start the core services:
|
||||
|
||||
```sh
|
||||
docker compose up -d postgres monolith
|
||||
docker compose up -d postgres synapse
|
||||
```
|
||||
|
||||
5. Once PostgreSQL is up, create the bridge databases:
|
||||
|
5
setup.sh
5
setup.sh
@ -21,14 +21,11 @@ docker run -it --rm \
|
||||
-e SYNAPSE_REPORT_STATS=no \
|
||||
matrixdotorg/synapse:latest generate
|
||||
|
||||
# Generate and display the registration shared secret
|
||||
SHARED_SECRET=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 50)
|
||||
echo
|
||||
echo "Registration shared secret: $SHARED_SECRET"
|
||||
echo "Database info:"
|
||||
echo " - Host: postgres"
|
||||
echo " - Username: synapse"
|
||||
echo " - Password: $DB_PASSWORD"
|
||||
echo " - Database: synapse"
|
||||
echo "Database URI: postgres://synapse:$DB_PASSWORD@postgres/synapse?sslmode=disable"
|
||||
echo
|
||||
echo "Make sure to save this information securely!"
|
||||
|
Loading…
x
Reference in New Issue
Block a user