Deployment
What do I do if another service is already using port 3000?
What do I do if another service is already using port 3000?
You can change the listening port on the first run by passing the This flag also updates the port number shown on the install page, so pick the port you intend to keep using.
-port flag:How do I run Gogs in offline mode or on an intranet?
How do I run Gogs in offline mode or on an intranet?
Set the This disables external network calls such as CDN resource loading and Gravatar avatar fetching.
OFFLINE_MODE option to true in the [server] section of your custom/conf/app.ini:How do I make a custom robots.txt?
How do I make a custom robots.txt?
Create a file named Gogs will serve this file automatically at
robots.txt in the custom directory at the root of your Gogs installation:/robots.txt.Administration
How can I become an administrator?
How can I become an administrator?
The first user to register (with
ID = 1) is automatically granted administrator privileges. No email confirmation is required for this account, even if email confirmation is enabled.Once logged in, the administrator can promote other users by navigating to Admin Panel > Users and editing user accounts. A user who registers through the initial install page is also made an administrator.How do I reset a forgotten administrator password?
How do I reset a forgotten administrator password?
If you have shell access to the server, follow these steps:
-
Stop Gogs, then create a temporary admin user from the command line:
-
Start Gogs again, then log in as
tmpuserin your browser. Navigate to Admin Panel > Users, click Edit next to the original administrator account, and set a new password. -
Clean up by logging out, logging back in as the original administrator with the new password, then deleting the
tmpuseraccount from Admin Panel > Users.
Repository management
How do I give Git hooks permission to users?
How do I give Git hooks permission to users?
Git hooks permission is a high-level privilege that can allow arbitrary code execution on the server. Only grant it to users you fully trust.To enable or disable this permission, go to the Admin Panel > Users, select the user, and toggle the Git hooks permission in their account settings (
/admin/users/:userid).Other
Why can't I create a wiki for my mirrored repository?
Why can't I create a wiki for my mirrored repository?
Mirrored repositories cannot have their own wiki because the mirror is a read-only copy of the upstream repository.If you see the “Welcome to Wiki!” page but no green “Create the first page” button, your repository was likely created as a mirror. You have two options:
- Edit the wiki on the upstream repository that is being mirrored.
- Convert the mirror to a regular repository under Settings > Danger Zone if you no longer need it to be a mirror.