Updating the server
Installers from version 0.3.2 onward preserve your settings, keys and data during an update. Back up the database before running the installer.
Run the new .run installer on the same machine. It detects the existing installation, replaces the executables and systemd services, updates the database schema and restarts the server. It preserves the configuration and keys in /etc/gadka and the data in /var/lib/gadka.
Before you start
- Download the new server installer (version 0.3.2 or later) from the downloads page and copy it to the server.
- Make sure you have root access.
- Allow a few minutes of downtime. Users’ apps will reconnect automatically.
1. Back up the database
For SQLite, run:
sudo gadka --config /etc/gadka/gadka.yaml admin backup --out /var/lib/gadka/przed-aktualizacja.dbFor PostgreSQL or MySQL, use your database’s backup tools. See Backup and restore.
2. Run the new installer
Replace <wersja> with the version in the downloaded filename.
chmod +x gadka-server-<wersja>-linux-amd64.run
sudo ./gadka-server-<wersja>-linux-amd64.runThe installer detects /etc/gadka/gadka.yaml and displays this update prompt in place of the installation questions. It reminds you to back up the database before continuing.
Gadka — aktualizacja istniejącej instalacji
Konfiguracja /etc/gadka i dane /var/lib/gadka pozostają bez zmian.
Przed aktualizacją zrób kopię zapasową bazy danych.
Kontynuować? (tak/nie) [tak]:3. Confirm the update
Press Enter or type tak (yes). Any other response cancels the update without making changes and displays Błąd: przerwano.
The installer then:
- Stops
gadkaandgadka-proxy. - Replaces the
/usr/local/bin/gadkaand/usr/local/bin/gadka-caddyexecutables and the systemd service files. - Writes
/etc/systemd/system/gadka.service.d/10-credentials.confso the server can calculate its Server ID. - Updates the database schema (
Migracja bazy…). - Starts the services.
The installer confirms the new version with this message:
Gotowe. Zaktualizowano do wersji …4. Check the version and send a message
gadka --version
systemctl status gadka gadka-proxy
gadka healthcheck && echo OKThe services should show active (running), and the last command should print OK. Sign in to the app and send a test message.
After upgrading from a version earlier than 0.3.2
The update preserves gadka.yaml. Older installers did not set the trusted proxy option that new installations include. Add the setting manually as described in Configuration file.
Update errors and restoring the previous version
- Read the error with
journalctl -u gadka -n 50. - Check the schema status with
sudo runuser -u gadka -- /usr/local/bin/gadka --config /etc/gadka/gadka.yaml migrate status. - If you need to return to the previous version, restore the database from the backup you made in step 1. See Backup and restore.
Desktop apps
Desktop apps update automatically, independently of the server. See App updates.