Install on Windows
Run Gitea Enterprise as a Windows service by adapting the upstream Gitea Windows instructions.
Prerequisites
-
Windows Server 2019 or later (desktop versions such as Windows 11 also work for evaluation).
-
Local administrator rights.
-
Recommended hardware sized for your expected user base:
Team size (approx.) Memory CPU cores SSD capacity ~10 users 2-4 GB 2-4 cores 50-100 GB ~100 users 4-8 GB 4-8 cores 200-500 GB ~1000 users 16-32 GB 8-16 cores 2-5 TB -
Git for Windows installed and added to the
PATH. -
nssm (the Non-Sucking Service Manager) to run Gitea as a service.
-
(Optional) An Enterprise license to enable premium features. Use License Activation to request a trial or apply the license after installation.
1. Create the Gitea directories
-
Create
C:\giteafor program files andC:\gitea-datafor repositories and configuration. -
In PowerShell, create the directory structure and set permissions so only the service account can access the data directory:
@('custom','data','log') | ForEach-Object { New-Item -ItemType Directory -Path "C:\gitea-data\$_" -Force | Out-Null }
icacls C:\gitea-data /inheritance:r
icacls C:\gitea-data /grant "Users:(OI)(CI)(RX)"
icacls C:\gitea-data /grant "Administrators:(OI)(CI)(F)"Replace
Userswith a dedicated account if you plan to run the service as a non-admin identity.
2. Download the Enterprise binary
- Pick the Enterprise release you intend to deploy (for example
24.6.0). - Download
gitea-ee-<version>-windows-4.0-amd64.exefrom commitgo/gitea-ee releases and place it inC:\gitea\gitea.exe. - Optionally copy an existing
app.initoC:\gitea-data\custom\conf\app.inito reuse your configuration.
3. Configure the database (optional)
Gitea Enterprise requires MySQL/MariaDB or PostgreSQL. Create the database ahead of time and set the connection string in custom/conf/app.ini.
MySQL / MariaDB
[database]
DB_TYPE = mysql
HOST = db.internal:3306
NAME = gitea
USER = gitea
PASSWD = change-me-now
SSL_MODE = disable
PostgreSQL
[database]
DB_TYPE = postgres
HOST = db.internal:5432
NAME = gitea
USER = gitea
PASSWD = change-me-now
SSL_MODE = disable
Use Windows Credential Manager, Secrets Manager, or your orchestration tool to store passwords securely.
4. Run the setup wizard
-
Launch PowerShell as Administrator and start Gitea interactively the first time:
cd C:\gitea
.\gitea.exe web --config C:\gitea-data\custom\conf\app.ini -
Browse to
http://localhost:3000(or the host address) and complete the setup wizard, pointing theAppDataPathtoC:\gitea-data. -
Stop the process once the initial configuration is saved.
5. Install Gitea as a Windows service
-
Extract
nssm.exetoC:\nssm(or any directory inPATH). -
Register the service:
nssm install Gitea "C:\gitea\gitea.exe" "web" "--config" "C:\gitea-data\custom\conf\app.ini" -
In the NSSM service editor:
- Set Startup directory to
C:\gitea. - Under I/O, redirect Output and Error to
C:\gitea-data\log\gitea.log. - Optionally run under a dedicated service account.
- Set Startup directory to
-
Start the service with
nssm start Giteaor via the Services MMC snap-in.
6. Configure HTTP/HTTPS access
- Use Windows Defender Firewall rules or your load balancer to expose ports 3000 and 22 (or the SSH port you configure).
- To serve HTTPS directly, install a TLS certificate and configure reverse proxy settings in
app.ini, or place Gitea behind IIS/NGINX/Traefik.
7. Post-install configuration
- Review the upstream Configuration Cheat Sheet to fine-tune
app.ini(authentication providers, email, storage backends, etc.). - Edit
C:\gitea-data\custom\conf\app.ini, then runnssm restart Gitea(or restart the Windows service) to apply the new settings.