Automatic Self Update #8749

Closed
opened 2025-11-02 08:16:24 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @idc77 on GitHub (Mar 25, 2022).

Feature Description

Gitea should be able to update itself automatically to keep up with the latest, at least, security updates.

How should this work?
gitea is running and checking the latest release version. If higher than current:

  • download new binary for your platform
  • on Linux it is possible to overwrite the current binary while it's running, I'm not sure if that's possible on other platforms.
  • If not possible: write a little update daemon whos sole role is to check current release version, download new release, stop running systemd service, replace binary of old with new, restart systemd service.
  • if possible: replace current binary with new one. restart systemd service.

The idea is "install once, never worry about it again".

In the beginning this could work with pre-compiled binaries only, later this could be extended with building from source with a binary fallback.

This could be very easily implemented. Have a background timer running that checks the latest release on github every 24h.
https://docs.github.com/en/rest/reference/releases

If activity, wait for activity to complete and execute copy/restart.

Screenshots

No response

Originally created by @idc77 on GitHub (Mar 25, 2022). ### Feature Description Gitea should be able to update itself automatically to keep up with the latest, at least, security updates. How should this work? gitea is running and checking the latest release version. If higher than current: - download new binary for your platform - on Linux it is possible to overwrite the current binary while it's running, I'm not sure if that's possible on other platforms. - If not possible: write a little update daemon whos sole role is to check current release version, download new release, stop running systemd service, replace binary of old with new, restart systemd service. - if possible: replace current binary with new one. restart systemd service. The idea is "install once, never worry about it again". In the beginning this could work with pre-compiled binaries only, later this could be extended with building from source with a binary fallback. This could be very easily implemented. Have a background timer running that checks the latest release on github every 24h. https://docs.github.com/en/rest/reference/releases If activity, wait for activity to complete and execute copy/restart. ### Screenshots _No response_
GiteaMirror added the type/featuretype/proposal labels 2025-11-02 08:16:24 -06:00
Author
Owner
@wxiaoguang commented on GitHub (Mar 25, 2022): See * https://github.com/go-gitea/gitea/issues/13015 * https://github.com/go-gitea/gitea/pull/18286
Author
Owner

@idc77 commented on GitHub (Apr 4, 2022):

I'm talking a bit more sophisticated than a simple shell script.

@idc77 commented on GitHub (Apr 4, 2022): I'm talking a bit more sophisticated than a simple shell script.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8749