Automatic Discord updater for Debian/Ubuntu systems. Since Discord doesn't provide an official APT repository, this tool automatically updates Discord to keep you on the latest version without manual intervention.
- ๐ Automatic version checking and updates
- โฐ Daily checks via systemd timer
- ๐ก๏ธ Safe download and package verification
- ๐ Comprehensive logging system
- โ๏ธ Configuration file support
- ๐ System-wide installation with proper permissions
- ๐จ Desktop notifications for updates
- ๐พ Backup creation before updates
- ๐ Lock file prevents multiple instances
- ๐งน Automatic cleanup of temporary files
- Debian/Ubuntu or other dpkg-based systems
- Root privileges (sudo)
- Internet connection
curl
orwget
(automatically installed if missing)systemd
(for scheduled updates)
# Clone the repository
git clone <repository-url>
cd discord-auto-updater
# Run the installation script
sudo ./install.sh
# Copy script to system location
sudo cp discord-auto-updater.sh /usr/local/bin/
sudo chmod +x /usr/local/bin/discord-auto-updater.sh
# Create configuration file
sudo cp discord-updater.conf /etc/
# Install systemd files
sudo cp discord-auto-updater.service /etc/systemd/system/
sudo cp discord-auto-updater.timer /etc/systemd/system/
# Reload and enable systemd
sudo systemctl daemon-reload
sudo systemctl enable discord-auto-updater.timer
sudo systemctl start discord-auto-updater.timer
# Update Discord now
sudo discord-auto-updater.sh
# Force update (even if versions match)
sudo discord-auto-updater.sh --force
# Check only, don't install
sudo discord-auto-updater.sh --check-only
# Show current version
sudo discord-auto-updater.sh --version
# Help information
sudo discord-auto-updater.sh --help
# Silent mode (no console output)
sudo discord-auto-updater.sh --silent
# Check timer status
sudo systemctl status discord-auto-updater.timer
# View logs
sudo journalctl -u discord-auto-updater.service
# Stop automatic updates
sudo systemctl stop discord-auto-updater.timer
# Start automatic updates
sudo systemctl start discord-auto-updater.timer
# Disable automatic updates completely
sudo systemctl disable discord-auto-updater.timer
# See next scheduled run
sudo systemctl list-timers discord-auto-updater.timer
Configuration file: /etc/discord-updater.conf
# Enable automatic update checks (1 = enabled, 0 = disabled)
DEFAULT_UPDATE_CHECK=1
# Force updates even if versions match (1 = enabled, 0 = disabled)
DEFAULT_FORCE_UPDATE=0
# Silent mode - suppress console output (1 = silent, 0 = verbose)
DEFAULT_SILENT=0
# Create backup before updates (1 = enabled, 0 = disabled)
DEFAULT_BACKUP=1
# Custom Discord download URL (advanced users only)
DISCORD_URL="https://discord.com/api/download?platform=linux&format=deb"
# Custom temporary directory
TEMP_DIR="/tmp/discord-updater"
# Custom log file location
LOG_FILE="/var/log/discord-updater.log"
Log file: /var/log/discord-updater.log
# Follow live logs
sudo tail -f /var/log/discord-updater.log
# Last 50 lines
sudo tail -n 50 /var/log/discord-updater.log
# Systemd logs
sudo journalctl -u discord-auto-updater.service -f
# View logs with timestamps
sudo journalctl -u discord-auto-updater.service --since "1 hour ago"
Problem: Discord not updating
# Check manually
sudo discord-auto-updater.sh --check-only
# Check logs
sudo tail -n 20 /var/log/discord-updater.log
# Test internet connection
curl -I https://discord.com
Problem: Permission denied
# Check script permissions
ls -la /usr/local/bin/discord-auto-updater.sh
# Fix permissions
sudo chmod +x /usr/local/bin/discord-auto-updater.sh
Problem: Systemd timer not working
# Check timer status
sudo systemctl status discord-auto-updater.timer
# Restart timer
sudo systemctl restart discord-auto-updater.timer
# Check if timer is enabled
sudo systemctl is-enabled discord-auto-updater.timer
Problem: Download failures
# Test direct download
curl -I "https://discord.com/api/download?platform=linux&format=deb"
# Check DNS resolution
nslookup discord.com
# Verify proxy settings if applicable
echo $http_proxy $https_proxy
# Test configuration loading
sudo discord-auto-updater.sh --check-only
# Run with verbose logging
sudo discord-auto-updater.sh
# Manual service execution
sudo systemctl start discord-auto-updater.service
# Check service status
sudo systemctl status discord-auto-updater.service
# Validate systemd timer syntax
sudo systemd-analyze verify /etc/systemd/system/discord-auto-updater.timer
sudo ./install.sh uninstall
# Stop and disable service
sudo systemctl stop discord-auto-updater.timer
sudo systemctl disable discord-auto-updater.timer
# Remove files
sudo rm -f /usr/local/bin/discord-auto-updater.sh
sudo rm -f /etc/systemd/system/discord-auto-updater.service
sudo rm -f /etc/systemd/system/discord-auto-updater.timer
sudo rm -f /etc/discord-updater.conf
# Optionally remove log file
sudo rm -f /var/log/discord-updater.log
# Reload systemd
sudo systemctl daemon-reload
discord-auto-updater/
โโโ discord-auto-updater.sh # Main updater script
โโโ discord-auto-updater.service # Systemd service file
โโโ discord-auto-updater.timer # Systemd timer file
โโโ discord-updater.conf # Configuration template
โโโ install.sh # Installation script
โโโ README.md # This document
- Downloads only from official Discord URLs
- Package verification and integrity checks
- Requires root privileges for system-wide installation
- Temporary files are automatically cleaned up
- Systemd security restrictions applied (PrivateTmp, ProtectSystem, etc.)
- Lock file prevents multiple simultaneous executions
- Safe error handling and rollback capabilities
- Version Detection: Compares installed Discord version with latest available
- Secure Download: Downloads official Discord .deb package from Discord's servers
- Verification: Validates downloaded package integrity and authenticity
- Backup: Creates backup information before updates (optional)
- Installation: Uses dpkg/apt to safely install the new version
- Cleanup: Removes temporary files and sends notifications
- Logging: Records all operations for audit and troubleshooting
- Fork this repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Follow bash best practices and use
shellcheck
- Test on multiple Debian/Ubuntu versions
- Maintain backward compatibility
- Update documentation for new features
- Add appropriate error handling and logging
This project is licensed under the MIT License. See the LICENSE file for details.
If you encounter issues or have suggestions, please report them in the GitHub Issues section.
Q: When does the update check happen?
A: Daily with a randomized delay of up to 2 hours to distribute server load.
Q: Can updates happen while Discord is running?
A: Yes, but Discord will need to be restarted to use the new version.
Q: Are there update notifications?
A: Yes, via desktop notifications (if available) and log entries.
Q: How are versions compared?
A: Using dpkg's built-in package version comparison system.
Q: What happens if Discord is already up to date?
A: The script exits gracefully without making changes.
Q: Can I customize the update schedule?
A: Yes, edit the systemd timer file or disable it and use cron instead.
Q: Is this safe to use on production systems?
A: Yes, the script includes safety checks, backups, and proper error handling.
# Download and install
git clone <repository-url>
cd discord-auto-updater
sudo ./install.sh
# Verify installation
sudo discord-auto-updater.sh --version
sudo systemctl status discord-auto-updater.timer
# Manual update (optional)
sudo discord-auto-updater.sh
# Check logs
sudo tail -f /var/log/discord-updater.log
Note: This tool is not an official Discord product and is not supported by Discord's official support team. Use at your own discretion.