This repository contains a Python script (upodate.py) that automatically updates Discord whenever a new version is released for Linux.
It works in the background using a systemd service, so your Discord client stays up to date without manual downloads.
The script:
- Checks the latest Discord version available from the official API.
- Compares it to the version currently installed on your system.
- If a newer version exists, it automatically downloads and installs the latest
.debpackage.
git clone https://github.com/SimonJahn/discord-updater.git
cd discord-updaterchmod +x upodate.pyYou need to copy the upodate.service file to your systemd directory.
The path may vary depending on your Linux distribution:
| Distribution | Path to systemd services |
|---|---|
| Ubuntu / Debian | /etc/systemd/system/ |
| Fedora / CentOS / RHEL | /usr/lib/systemd/system/ |
| Arch / Manjaro | /etc/systemd/system/ |
| openSUSE | /usr/lib/systemd/system/ |
Example (for Ubuntu):
sudo cp upodate.service /etc/systemd/system/Open the service file for editing:
sudo nano /etc/systemd/system/upodate.serviceYou must update the following two lines to match your system’s path:
ExecStart=/usr/bin/python3 /path/to/upodate.py
WorkingDirectory=/path/to/- Replace
/path/to/with the actual directory where yourupodate.pyis located.
Once the paths are updated, reload the systemd daemon and enable the service to run automatically:
sudo systemctl daemon-reload
sudo systemctl enable upodate.service
sudo systemctl start upodate.serviceTo check the service status:
systemctl status upodate.service- The service uses
dpkgandsudo, so make sure your user has the appropriate permissions. - The script only runs when triggered by systemd (e.g., at boot or on schedule, depending on how you configure the service).
- You can schedule it to check periodically by adding a timer unit (optional).
‼️ Important: This updater only works if Discord was installed using a .deb file or via APT. If your Discord was installed from Snap or Flatpak, the updater will not detect your current version and will instead re-download and install the .deb version from Discord’s official servers.