Skip to content

PostgreSQL password update [podman]

1. Change the password inside the database

Connect to the running database container using Podman:

podman exec -it clrt4-db psql -U postgres

Run the SQL command to update it:

ALTER USER postgres WITH PASSWORD 'your_new_password';

Type \q to exit.

2. Update the Quadlet files

Update /etc/containers/systemd/clrt4-backend.container with your_new_password:

```bash
    sed -i -e 's/\(Environment=DBPASS=\).*/\1your_new_password/' \
     -e 's/"dbPassword": "[^"]*"/"dbPassword": "your_new_password"/' \
     /etc/containers/systemd/clrt4-backend.container
```

3. Apply the changes

Reload systemd and restart the backend service so it picks up the new credentials:

sudo systemctl daemon-reload
sudo systemctl restart clrt4-backend.service