Permission error when installing through web wizard

I’m installing Gitea on a headless Raspberry Pi 5. I’ve followed all the steps carefully in these two parts of the documentation:

However, when I try to run gitea web, and then go to that URL to enter config information to finish installation, I get met with this error:

The app data path is invalid: unable to create the APP_DATA_PATH directory: “/usr/local/bin/data”, Error: mkdir /usr/local/bin/data: permission denied

I’ve tried the following:

  • Using the default SQLite setup
  • Using MariaDB, making sure I have the correct config
  • Using the default user for gitea web
  • Using sudo su - git to log into privileged user before running gitea web
  • Changing the default paths in the webpage from /usr/local/bin/data to /var/lib/gitea

APP_DATA_PATH appears to be part of the config file that gets written to during installation, so I don’t think I can edit that.

I’m out of ideas. Any help is appreciated.