Auto Update Cursor on Linux
If you are using Cursor with .AppImage format, you would have noticed that the auto updater doesn’t work. Here is how you can fix it
Write an update script: symlinks are needed to work around updating a running instance of cursor
$ cat ~/Documents/software/cursor/update.sh #!/bin/bash APPDIR="/opt/cursor" SYMLINK="$APPDIR/cursor.AppImage" TIMESTAMP=$(date +"%Y%m%d%H%M%S") # Fetch the latest download URL from the Cursor API APPIMAGE_URL=$(curl -s 'https://www.cursor.com/api/download?platform=linux-x64&releaseTrack=latest' | jq -r '.downloadUrl') # Validate that we got a URL if [[ -z "$APPIMAGE_URL" || "$APPIMAGE_URL" == "null" ]]; then echo "Failed to fetch download URL from Cursor API" exit 1 fi # Download to a versioned filename NEW_APPIMAGE="$APPDIR/cursor.AppImage.$TIMESTAMP" mkdir -p "$APPDIR" wget -O "$NEW_APPIMAGE" "$APPIMAGE_URL" chmod +x "$NEW_APPIMAGE" # Update the symlink to point to the new version ln -sfn "$NEW_APPIMAGE" "$SYMLINK" # Optionally, clean up older versions (keep last 3) ls -tp "$APPDIR"/cursor.AppImage.* | grep -v '/$' | tail -n +4 | xargs -r rm -- echo "Cursor updated successfully: $NEW_APPIMAGE"
Make an update systemd service
$ cat /etc/systemd/system/cursor-update.service [Unit] Description=Update Cursor [Service] ExecStart=/home/d/software/cursor/update.sh Type=oneshot
Run it on a schedule
$ cat /etc/systemd/system/cursor-update.timer [Unit] Description=Run Update Cursor every 6 hours [Timer] OnBootSec=5min OnUnitActiveSec=6h Persistent=true [Install] WantedBy=timers.target