Skip to content
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
Support
This is the documentation of 22.6.1, which is no longer the latest release. See the latest release.

Install on Windows

Run Gitea Enterprise as a Windows service by adapting the upstream Gitea Windows instructions.

  • 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 C:\gitea for program files and C:\gitea-data for repositories and configuration.

  2. In PowerShell, create the directory structure and set permissions so only the service account can access the data directory:

    Terminal window
    @('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 Users with a dedicated account if you plan to run the service as a non-admin identity.

  1. Pick the Enterprise release you intend to deploy (for example 24.6.0).
  2. Download gitea-ee-<version>-windows-4.0-amd64.exe from commitgo/gitea-ee releases and place it in C:\gitea\gitea.exe.
  3. Optionally copy an existing app.ini to C:\gitea-data\custom\conf\app.ini to reuse your configuration.

Gitea Enterprise requires MySQL/MariaDB or PostgreSQL. Create the database ahead of time and set the connection string in custom/conf/app.ini.

[database]
DB_TYPE = mysql
HOST = db.internal:3306
NAME = gitea
USER = gitea
PASSWD = change-me-now
SSL_MODE = disable
[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.

  1. Launch PowerShell as Administrator and start Gitea interactively the first time:

    Terminal window
    cd C:\gitea
    .\gitea.exe web --config C:\gitea-data\custom\conf\app.ini
  2. Browse to http://localhost:3000 (or the host address) and complete the setup wizard, pointing the AppDataPath to C:\gitea-data.

  3. Stop the process once the initial configuration is saved.

  1. Extract nssm.exe to C:\nssm (or any directory in PATH).

  2. Register the service:

    Terminal window
    nssm install Gitea "C:\gitea\gitea.exe" "web" "--config" "C:\gitea-data\custom\conf\app.ini"
  3. 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.
  4. Start the service with nssm start Gitea or via the Services MMC snap-in.

  • 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.
  • 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 run nssm restart Gitea (or restart the Windows service) to apply the new settings.
  • Stop the Gitea service, download the newer Enterprise executable, replace C:\gitea\gitea.exe, then start the service.
  • Keep the Enterprise version current by following the Gitea Enterprise release notes.
  • Back up C:\gitea-data frequently and test upgrades in a staging environment when possible.
  • Follow License Activation once the service is running to apply or renew the Enterprise license.
  • To scale out across multiple Windows hosts, replicate the shared storage, database, and load-balancer patterns you use on Linux so each node stays stateless.

Gitea Enterprise relies on consistent configuration files and directories across upgrades, so any existing automation or scripts continue to work after you replace the binary.