Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Commit 953fa7a

Browse files
authored
Update README.md - update creating secrets manually for mastodon
1 parent 4495f6e commit 953fa7a

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

mastodon/small-hack/README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,28 @@ This template relies on you already having created secrets. You can do that via
2323

2424
### Creating secrets manually
2525

26-
```bash
27-
SECRET_KEY_BASE=$(docker run --rm -it tootsuite/mastodon:latest bin/rake secret)
28-
OTP_SECRET=$(docker run --rm -it tootsuite/mastodon:latest bin/rake secret)
26+
For the secret key base, otp secret and vapid key:
27+
28+
```console
29+
$ SECRET_KEY_BASE=$(docker run --rm -it tootsuite/mastodon:latest bin/rake secret)
30+
$ OTP_SECRET=$(docker run --rm -it tootsuite/mastodon:latest bin/rake secret)
2931

30-
docker run --rm -e "OTP_SECRET=$OTP_SECRET" \
32+
$ docker run --rm -e "OTP_SECRET=$OTP_SECRET" \
3133
-e "SECRET_KEY_BASE=$SECRET_KEY_BASE" \
3234
-it tootsuite/mastodon:latest bin/rake mastodon:webpush:generate_vapid_key
3335
```
3436

37+
For the active record encryption keys:
38+
39+
```console
40+
$ docker run docker.io/tootsuite/mastodon:latest rails db:encryption:init
41+
Add the following secret environment variables to your Mastodon environment (e.g. .env.production), ensure they are shared across all your nodes and do not change them after they are set:
42+
43+
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=ig3iQLB5FAzU7500SJNdbsoncKBmrR7f
44+
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=1laBmHjzGUJRpAbXLI1RJVmng7uZN8i1
45+
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=10AfrwAKCgPVuzT8FuaSpSXoMGAFKIQk
46+
```
47+
3548
# Troubleshooting Mastodon
3649

3750
## Connect to PostgreSQL with worker container

0 commit comments

Comments
 (0)