How to configure Gitea admin?

I want a Gitea instance for private development + an ability to invite other people to the server.

So I set settings.service.DISABLE_REGISTRATION = true;

But how do create my own user name and password?

Hi,

If you login as the first user, Gitea will create an user with admin rights. With the setting above you can create user accounts manually if you want to invite other persons. For more information see the gitea website.

1 Like

But on a fresh install there’s no first user. That’s the whole problem.

IIRC that flag does not affect the cli, so a user can be created that way. Or enable registration, create the first user and disable it again.

I was hoping for a Nix way.

you know, you need to keep the database backup anyway, so your admin password will be kept there, with nixos way you would have to setup secrets for a single use which is not worth it

If you want to do something once it’s propably ok if it’s not declarative and reproducable.

But I also thing it would be cool to configure users inside the nix config.