Always back to the intial configuration page


#1

Hello Everybody!

I’ve tried Gitea today for the first time. I have successfully installed it on an ODROID XU4 device and I’m storing its repos on some USB mounted hard disks.

At first Gitea looks to be working just fine. But when I reboot the machine and try to log into Gitea again (from the webpage), it always reverts back to the Initial configuration page, asking me to configure the database, the domain, the paths, etc. This page should only be displayed on first install, not after every reboot.

I’m guessing that it cannot save some data somewhere and that’s why it always thinks that it’s initializing itself again from scratch. Can you tell me what it is checking to determine if it is the first install or not, so that I can track down what is wrong?

Additional details:
Machine type: ODROID XU4
Architecture: ARMv7l
OS: Ubuntu 18.04
System disk: SD card
Gitea repository storage disk: HDD over USB.

Thank you!


#2

I have figured it out!

When you complete the initial configuration, the settings are saved into an app.ini file which is located in a subdirectory of the directory into which Gitea is installed (in my case: /home/git/gitea/custom/conf/app.ini). However, after reboot Gitea is trying to read the contents of the app.ini from /etc/gitea/app.ini. I’m guessing that upon first configuration it should have written the config to this file too, but for some reason it could not do it (although the permissions were correctly set as per the installation guide for the /etc/gitea/app.ini file and its parent directory). The /etc/gitea/app.ini was almost empty (contained one line) while the /home/git/gitea/custom/conf/app.ini contained the real settings.

So the solution is to overwrite the /etc/gitea/app.ini with /home/git/gitea/custom/conf/app.ini and after that it will not keep reverting to the initial config page. Remember to restart the Gitea service or reboot the system after overwiting the /etc/gitea/app.ini file!