This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Forgejo - Upgrade ====== Notes and instructions for upgrading [[https://forgejo.org|Forgejo]], the self-hosted lightweight software forge. ===== Upgrading Forgejo (binary) ===== Follow these steps to upgrade a binary (not Docker) Forgejo installation. These instructions are adapted from the [[https://forgejo.org/docs/latest/admin/upgrade/|Forgejo upgrade guide]] and [[https://forgejo.org/docs/latest/admin/installation/binary/|Forgejo installation guide]]. ==== 0. Prerequisites ==== SSH to the server with a sudo-capable user account. ==== 1. Back up existing install ==== Switch to the Forgejo user (usually ''git''), and back up the existing Forgejo installation, then flush the queues. Note that you'll need to specify the config file location, which by default is located at ''/etc/forgejo/app.ini''. Once done, switch back to your sudo-capable user. <code bash> sudo -i -u git forgejo dump --config /etc/forgejo/app.ini forgejo manager flush-queues --config /etc/forgejo/app.ini exit </code> ==== 2. Download the latest Forgejo binary ==== Check https://forgejo.org/download/ for the latest version. Make sure to change the name depending on your processor architecture (most commonly this would be ''amd64'' or ''arm64''). <code bash>wget https://codeberg.org/forgejo/forgejo/releases/download/vXX.Y.Z/forgejo-XX.Y.Z-linux-XXX64 chmod +x forgejo-XX.Y.Z-linux-XXX64</code> ==== 3. Stop Forgejo ==== Stop the running (existing) Forgejo binary. <code bash>sudo systemctl stop forgejo.service</code> ==== 4. Copy in the new binary ==== Copy the newly downloaded Forgejo binary over the existing binary. <code bash>sudo cp forgejo-x.y.z-linux-xxx64 /usr/local/bin/forgejo</code> Update the new binary's file permissions. <code bash>sudo chmod 755 /usr/local/bin/forgejo</code> ==== 5. Start Forgejo ==== Start the newly-replaced Forgejo binary. <code bash>sudo systemctl start forgejo.service</code> ==== 6. Make sure it works ==== Make sure that everything works!