For Linux, you will likely want linux-amd64. It’s for 64-bit Intel/AMD platforms, but there are other platforms available, including arm64 (e.g. Raspberry PI 4), 386 (i.e. 32-bit), arm-5, and arm-6.
For Windows, you will likely want windows-4.0-amd64. It’s for all modern versions of Windows, but there is also a 386 platform available designed for older, 32-bit versions of Windows.
For macOS, you should choose darwin-arm64 if your hardware uses Apple Silicon, or darwin-amd64 for Intel.
For FreeBSD, you should choose freebsd12-amd64 for 64-bit Intel/AMD platforms.
Starting with v1.27 Gitea signs all binaries using sigstore to prevent against unwanted modification of binaries.
To validate the binary, download the bundle file which ends in sigstore.json for the binary you downloaded and use the cosign command line tool.
Gitea signs all binaries with a GPG key to prevent against unwanted modification of binaries.
To validate the binary, download the signature file which ends in .asc for the binary you downloaded and use the GPG command line tool.
Look for the text Good signature from "Teabot <teabot@gitea.io>" to assert a good binary,
despite warnings like This key is not certified with a trusted signature!.
If you don’t want the web installer to be able to write to the config file, it is possible to make the config file read-only for the Gitea user (owner/group root:git, mode 0640) however you will need to edit your config file manually to:
Set INSTALL_LOCK= true,
Ensure all database configuration details are set correctly
Ensure that the SECRET_KEY and INTERNAL_TOKEN values are set. (You may want to use the gitea generate secret to generate these secret keys.)
Ensure that any other secret keys you need are set.
Shell completion can be generated directly from binary with:
Terminal window
giteacompletion<shell>
Supported values for <shell> are bash, fish, pwsh and zsh. Details on how to load the completion for your shell can be found in the completion command help.
You can update to a new version of Gitea by stopping Gitea, replacing the binary at /usr/local/bin/gitea and restarting the instance.
The binary file name should not be changed during the update to avoid problems in existing repositories.
It is recommended that you make a backup before updating your installation.
If you have carried out the installation steps as described above, the binary should
have the generic name gitea. Do not change this, i.e. to include the version number.
To restart your Gitea instance, we recommend to use SIGHUP signal. If you know your Gitea PID, use kill -1 $GITEA_PID, otherwise you can use killall -1 gitea.
To gracefully stop the Gitea instance, a simple kill $GITEA_PID or killall gitea is enough.
See below for troubleshooting instructions to repair broken repositories after
an update of your Gitea version.
Older Linux distributions (such as Debian 7 and CentOS 6) may not be able to load the
Gitea binary, usually producing an error such as ./gitea: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC\_2.14' not found (required by ./gitea). This is due to the integrated
SQLite support in the binaries provided by dl.gitea.com. In this situation, it is usually
possible to install from source, without including
SQLite support.
For errors like 702 runWeb()] [E] Failed to start server: listen tcp 0.0.0.0:3000: bind: address already in use, Gitea needs to be started on another free port. This
is possible using ./gitea web -p $PORT. It’s possible another instance of Gitea
is already running.
If during the update, the binary file name has been changed to a new version of Gitea,
Git Hooks in existing repositories will not work any more. In that case, a Git
error will be displayed when pushing to the repository.
remote: ./hooks/pre-receive.d/gitea: line 2: [...]: No such file or directory
The [...] part of the error message will contain the path to your previous Gitea
binary.
To solve this, go to the admin options and run the task Resynchronize pre-receive, update and post-receive hooks of all repositories to update all hooks to contain
the new binary path. Please note that this overwrites all Git Hooks, including ones
with customizations made.
If you aren’t using the Gitea built-in SSH server, you will also need to re-write
the authorized key file by running the Update the '.ssh/authorized_keys' file with Gitea SSH keys. task in the admin options.