Prerequisites
- Gogs requires use of one of the following database backends:
- MySQL, >= 5.7
- PostgreSQL, >= 9.6
- SQLite 3
- Git, >= 1.8.3, on both server and client side
- SSH server
- Only required when enable Git over SSH, e.g.,
git clone [email protected]:... - Builtin SSH server is also available
- Only required when enable Git over SSH, e.g.,
For Windows users:
- When using builtin SSH server, you still need to have
ssh-keygeninstalled and available via the%PATH%environment variable. - Use OpenSSH on Windows 10 or newer.
- Cygwin OpenSSH or Copssh are available on older versions of Windows.
Initialize database
If you choose to use MySQL or PostgreSQL as your database backend, you need to first complete the initial database creation.- PostgreSQL
- MySQL
Create a database user and database:
Installation methods
- Pre-built binary
- Docker
- Packages
All release archives containing pre-built binaries are available in dl.gogs.io and GitHub releases.Once extracted the archive, run
For Windows users:Release archives containing
mws come with built-in Windows service support. If you prefer to manage the service using NSSM, download the standard version instead../gogs web to start the server. Use ./gogs web --help to see all available options.