Sample create admin user command for docker-next image fails because admin is a reserved name
What needs to be improved? Please describe
If I try the sample command from the First start section of the docker-next image markdown guide (with the workaround for https://github.com/gogs/gogs/issues/8403 ), like this:
$ docker exec -it gogs /app/gogs/gogs admin create-user \
--name admin \
--password ${PASSWORD} \
--email [email protected] \
--admin \
--config /data/gogs/conf/app.ini
I get the following error:
2026/08/09 10:37:33 [TRACE] Auto migrated "Access"
2026/08/09 10:37:34 [TRACE] Auto migrated "AccessToken"
2026/08/09 10:37:35 [TRACE] Auto migrated "Action"
2026/08/09 10:37:35 [TRACE] Auto migrated "EmailAddress"
2026/08/09 10:37:36 [TRACE] Auto migrated "Follow"
2026/08/09 10:37:37 [TRACE] Auto migrated "LFSObject"
2026/08/09 10:37:38 [TRACE] Auto migrated "LoginSource"
2026/08/09 10:37:39 [TRACE] Auto migrated "Notice"
2026/08/09 10:37:39 [FATAL] [gogs.io/gogs/gogs.go:36 main()] Failed to start application: create user: name is not allowed: map[name:admin reason:reserved]
Apparently, it is simply not allowed to create a user literally named admin (just in case, I also tried by following the web-based installation process).
So the documentation should be improved to either replace the literal admin name by a placeholder (like ${ADMIN_USER_NAME}) or something that makes it clearer that it is an example to be customized (like myadminuser).
Why do you think it is important?
The mentioned document is usually used by newbies who may not happen to know that admin is a reserved not allowed user name. Newbies also tend more often to just follow guidelines literally, specially when they look like no customization or modification is required for something. So I believe this doc needs to be as correct and easy as possible in order to provide a smooth first experience for newcomers.
Code of Conduct
- I agree to follow this project's Code of Conduct
Source: gogs/gogs