This commit is contained in:
parent
4fd291f27f
commit
5b30e6eb0c
2 changed files with 14 additions and 7 deletions
|
|
@ -9,7 +9,6 @@ server {
|
|||
hostname berlin.ccc.de;
|
||||
location = /.well-known/matrix/server {
|
||||
default_type application/json;
|
||||
add_header Access-Control-Allow-Origin "*";
|
||||
return 200 '{"m.server":"matrix.berlin.ccc.de:443"}';
|
||||
}
|
||||
location = /.well-known/matrix/client {
|
||||
|
|
@ -31,13 +30,21 @@ matrix.berlin.ccc.de. IN CAA 0 issue "letsencrypt.org;validationme
|
|||
matrix.berlin.ccc.de. IN CAA 0 iodef "mailto:admin@berlin.ccc.de"
|
||||
```
|
||||
|
||||
## Bots
|
||||
## Accounts
|
||||
|
||||
```bash
|
||||
matrix-synapse-register_new_matrix_user \
|
||||
-u <USERNAME> \
|
||||
--no-admin
|
||||
```
|
||||
|
||||
it wraps this:
|
||||
|
||||
```bash
|
||||
register_new_matrix_user \
|
||||
-c homeserver.yaml https://matrix.berlin.ccc.de \
|
||||
--user_domain berlin.ccc.de \
|
||||
--user <YOUR_BOT> \
|
||||
--user <USERNAME> \
|
||||
--password <YOUR_PASSWORD>
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ _here 16 => 17_
|
|||
1. Stop services that use postgres or cut connection by change postgres port
|
||||
2. Login as postgres user
|
||||
```shell
|
||||
sudo -su postgres
|
||||
old=16
|
||||
su postgres
|
||||
cd /var/lib/postgresql/
|
||||
old=16
|
||||
pg_old=$(nix-build --no-out-link -A postgresql_${old:?} '<nixpkgs>')
|
||||
pg_new=$(nix-build --no-out-link -A postgresql_$((old+1)) '<nixpkgs>')
|
||||
```
|
||||
|
|
@ -42,13 +42,13 @@ $pg_new/bin/pg_upgrade \
|
|||
```
|
||||
7. Start the new Postgres
|
||||
```shell
|
||||
# Change 'services.postgres.packages = pkgs.postgresql_17;' in services/postgres.nix
|
||||
# Change 'services.postgres.packages = pkgs.postgresql_17;' in `hosts/sql/postgres.nix`
|
||||
nixos-rebuild switch
|
||||
```
|
||||
|
||||
Cleanup (after a few days):
|
||||
```shell
|
||||
sudo -su postgres
|
||||
su postgres
|
||||
vacuumdb --all --analyze-in-stages
|
||||
cd /var/lib/postgresql/
|
||||
./delete_old_cluster.sh
|
||||
|
|
|
|||
Loading…
Reference in a new issue