# Upgrading from 1.15 to latest version possible

**URL:** <https://forum.gitea.com/t/upgrading-from-1-15-to-latest-version-possible/12028>\
**Category:** Install/Maintain/Configure\
**Created:** [April 6, 2026, 9:34pm UTC](https://forum.gitea.com/t/upgrading-from-1-15-to-latest-version-possible/12028 "2026-04-06T21:34:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tobysimmons](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/tobysimmons/32/7360_2.png) [@tobysimmons](https://forum.gitea.com/u/tobysimmons)\
**Post date:** [April 6, 2026, 9:34pm UTC](https://forum.gitea.com/t/upgrading-from-1-15-to-latest-version-possible/12028/1 "2026-04-06T21:34:30Z")

</div>

I am running Gitea 1.15 on Ubuntu directly with the binary. I made a back up of my database and my data folder before downloading the latest binary (1.25.5). After stopping Gitea, I renamed the 1.15 binary, moved the 1.25.5 binary in place with the old name and tried starting Gitea. It failed to start and one of the issues was outdated template tags. The template I think was /var/lib/gitea/custom/templates/home.tmpl but I did not create that file (I assume it was created by the original installation of 1.15); What is the recommend method to make sure everything in /var/lib/gitea/ updates for the new version without causing data loss for the repos?

Edit: I restored my database and data folder and reverted to running 1.15 for now.

---

<div class="post-metadata">

**Author:** ![linkp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/linkp/32/4833_2.png) [@linkp](https://forum.gitea.com/u/linkp)\
**Post date:** [April 7, 2026, 2:57pm UTC](https://forum.gitea.com/t/upgrading-from-1-15-to-latest-version-possible/12028/2 "2026-04-07T14:57:11Z")

</div>

Welcome to the Gitea forum.

Have you considered incrementally upgrading across the highest point versions of each subsequent release instead of trying to fast forward directly to current?

---

<div class="post-metadata">

**Author:** ![tobysimmons](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/tobysimmons/32/7360_2.png) [@tobysimmons](https://forum.gitea.com/u/tobysimmons)\
**Post date:** [April 7, 2026, 3:30pm UTC](https://forum.gitea.com/t/upgrading-from-1-15-to-latest-version-possible/12028/3 "2026-04-07T15:30:13Z")

</div>

I considered that, that was one reason I wanted to ask on the forum to see what other’s experiences were! I’ll give that a try and will report back.

---

<div class="post-metadata">

**Author:** ![Hellen-charless56](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/hellen-charless56/32/7353_2.png) [@Hellen-charless56](https://forum.gitea.com/u/Hellen-charless56)\
**Post date:** [April 7, 2026, 4:41pm UTC](https://forum.gitea.com/t/upgrading-from-1-15-to-latest-version-possible/12028/4 "2026-04-07T16:41:16Z")

</div>

You hit this because of **old custom templates** , not your repos.

**Fix (short):**

1. Remove/disable custom overrides:

```auto
mv /var/lib/gitea/custom /var/lib/gitea/custom_backup

```

1. Don’t jump versions — upgrade step-by-step:

```auto
1.15 → 1.17 → 1.19 → 1.21 → 1.25

```

1. Start Gitea at each step and let it migrate.

👉 Your repo data in `/var/lib/gitea` is safe — just don’t delete it.

---

<div class="post-metadata">

**Author:** ![tobysimmons](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/tobysimmons/32/7360_2.png) [@tobysimmons](https://forum.gitea.com/u/tobysimmons)\
**Post date:** [April 7, 2026, 5:26pm UTC](https://forum.gitea.com/t/upgrading-from-1-15-to-latest-version-possible/12028/5 "2026-04-07T17:26:10Z")

</div>

Ah, this is exactly the advice for which I was looking! You say don’t jump versions, but there are some gaps in what you listed, I assume this is the recommended version path?

---

<div class="post-metadata">

**Author:** ![tobysimmons](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/tobysimmons/32/7360_2.png) [@tobysimmons](https://forum.gitea.com/u/tobysimmons)\
**Post date:** [April 8, 2026, 7:26pm UTC](https://forum.gitea.com/t/upgrading-from-1-15-to-latest-version-possible/12028/6 "2026-04-08T19:26:01Z")

</div>

This worked perfectly, summarizing the process I used:

```bash
# Download each needed binary to ~/gitea/
cd ~/gitea/
wget https://dl.gitea.com/gitea/1.17.4/gitea-1.17.4-linux-amd64
wget https://dl.gitea.com/gitea/1.19.4/gitea-1.19.4-linux-amd64
wget https://dl.gitea.com/gitea/1.21.11/gitea-1.21.11-linux-amd64
wget https://dl.gitea.com/gitea/1.25.5/gitea-1.25.5-linux-amd64
chmod +x gitea*

# UPGRADE LOOP: For each version, make backup into ~/gitea/backups/ and copy new binary to /usr/local/bin/gitea and launch from command line to verify migration success
sudo rm ~/gitea/backups/*
mysqldump --routines -p gitea > ~/gitea/backups/gitea.sql
sudo tar -cvpzf ~/gitea/backups/var-lib-gitea.tar /var/lib/gitea
sudo systemctl stop gitea.service
# Replace gitea version, REPLACE EACH TIME WITH THE NEXT VERSION NUMBER
sudo cp ~/gitea/gitea-1.17.4-linux-amd64 /usr/local/bin/gitea
# Test running as the git user
sudo su - git
cd /etc/gitea/
/usr/local/bin/gitea web -c /etc/gitea/app.ini --work-path=/var/lib/gitea/

```

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![linkp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/linkp/32/4833_2.png) [@linkp](https://forum.gitea.com/u/linkp)\
**Post date:** [April 9, 2026, 1:28am UTC](https://forum.gitea.com/t/upgrading-from-1-15-to-latest-version-possible/12028/7 "2026-04-09T01:28:40Z")

</div>

Glad to hear that it worked out!
