Skipping the first configuration page in a Docker container

Hi, I am running a Docker container like this:

docker container run -p 3000:3000 -p 222:22 --name gitea gitea/gitea:1.16.5

The container starts up fine, but when I turn my Browser to localhost:3000, I get the “First configuration” page. Okay, all I need to do is click on “Install Gitea”, but for automated installation of a Container, I would like to skip that step. Is that possible?

I am aware of install with docker, but if that topic is covered there, then I don’t recognize it.



1 Like

I think the solution I proposed back in July 2021 is still good.

docker run --name gitea -p 8080:3000 -e GITEA__security__INSTALL_LOCK=true -d gitea/gitea:1.16.5

Thanks, very much. In particular for replying to what would have been my next question (Creation of the admin user.) Followup, though:

1.) Is there a particular reason for choosing version 1.14.2?

2.) Possibly related: I am getting the error message below with 1.16.5:

[F] Gitea is not supposed to be run as root. Sorry. If you need to use privileged TCP ports please instead use setcap and the cap_net_bind_service permission

1.14.2 was the current version at the time

You should --user 1000 IIRC