Skip to content

Latest commit

 

History

History
95 lines (64 loc) · 2.66 KB

File metadata and controls

95 lines (64 loc) · 2.66 KB

Discord Auto-Updater (upodate.py)

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.


🧩 How It Works

The script:

  1. Checks the latest Discord version available from the official API.
  2. Compares it to the version currently installed on your system.
  3. If a newer version exists, it automatically downloads and installs the latest .deb package.

⚙️ Installation

1. Clone the repository

git clone https://github.com/SimonJahn/discord-updater.git
cd discord-updater

2. Make the script executable

chmod +x upodate.py

3. Move the systemd service file

You 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/

🧭 Configure the Service

Open the service file for editing:

sudo nano /etc/systemd/system/upodate.service

You 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 your upodate.py is located.

🚀 Activate the Service

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.service

To check the service status:

systemctl status upodate.service

🧾 Notes

  • The service uses dpkg and sudo, 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.