Forgejo initial configuration - "User to run as"

Hello,

I installed Forgejo on TrueNAS Scale 25.04.2 and when I go to the web UI for the first time, I get an “Initial configuration” page. On that page, the “User to run as *” field is empty, but marked as mandatory (the star).

First problem, I cannot type into it. If I place the cursor in it and try to type, the cursor is there but no letters appear. The field just below (Server domain) works fine.

Second problem, I don’t know what to put there. I found I could use my browser’s “inspect” mode to go modify the value of the input field, so I tried “apps”, “forgejo”, and a few others, but each time when I click the “Install Forgejo” button at the bottom, this error message appears:

The “user to run as” username is not the current username: apps →

The message seems to be saying “apps” is the username I entered, and the current username is (empty), and they should match, but if I leave the field empty then the error is “form.RunUser cannot be empty.” (of course)

What am I supposed to use? Thanks in advance.

I posted the question on the forgejo issues, and got a reply. #9183 - bug: Cannot type into "User to run as" field, and error message doesn't help. - forgejo/forgejo - Codeberg.org

Apparently, in the container, the line in /etc/passwd for the git user needs to be changed. However, it looks like if I change this, it does not persist across container restarts. I don’t know how to make the change permanent.

Anyone have an idea? Thanks in advance.

Just to close off this thread, after posting on the truenas apps github we found a solution. For future searches: forgejo app fails initial configuration · Issue #3108 · truenas/apps · GitHub

It was indeed a detail about how the app was set up on my instance of TrueNAS. I had created a single dataset with separate subdirectories for config, data and postgres (with appropriate permissions for each), but that gave the issue above. What worked was to create one dataset for config+data, and another separate dataset for postgres.