Installing Gitea (Git Server developed in GO) in Windows

I’ve been a long-time user of gogs, but I decided to update my version recently and found out this fork called gitea which seems to have more features.

How to install it on a Windows server:

  • Download and install GO language. (It’s as easy as next-next-finish)

  • Open a command prompt and type:

    • mkdir %GOPATH%
    • cd %GOPATH%
    • go get -d -u
    • cd "%GOPATH%/src/"
    • go build
    • Optional: copy this gitea folder to some other folder (e.g. C:\gitea\) if you don’t want to run this from your %GOPATH% folder
    • .\gitea web
    • launch http://localhost:3000
    • Click "sign in" to configure initial configuration (I suggest to use PostgreSQL)
  • Instead of running as command prompt, you can configure it as Windows Service:

    • Close gitea web (ctrl-c)
    • Edit C:\gitea\custom\conf\app.ini: and set Gitea to run using local system user: RUN_USER = COMPUTERNAME$
    • Open a command prompt (cmd) as an Administrator, then run the following command to register Gitea as a Windows service:
      sc create gitea start= auto binPath= ""C:\gitea\gitea.exe" web --config "C:\gitea\custom\conf\app.ini""
    • Open “Windows Services”, search for the service named “gitea”, right-click it and click on “Run”. If everything is OK, Gitea will be reachable on http://localhost:3000


comments powered by Disqus