Self-Hosting Gitea

Since I graduated my student discount expired and I don’t want to pay $7 a month to Github for private repositories. So time to take Gitea for a whirl.

  1. Install from the binary
  2. Set up the service
    One minor change here, since I’m running Grafana on port 3000 already I’m going to run Gitea on port 4000 by doing modifying the following line: bash ExecStart=/usr/local/bin/gitea web -p 4000 -c /etc/gitea/app.ini
  3. Add a proxy pass rule for Apache:
    /etc/apache2/sites-enabled/danielbeadle.net.conf bash ProxyPass /git http://localhost:4000
  4. Set the root_url for Gitea /etc/gitea/app.ini bash ROOT_URL = https://danielbeadle.net/git/
  5. Navigate to the install page https://danielbeadle.net/git/install
    • Database type: SQLite3
    • Path: /home/git/gitea/data/gitea.db
    • Repo Root Path: /home/git/gitea-repositories
    • Run as Username: git
    • ssh Server domain: danielbeadle.net

Update as of November, 2018: I have migrated all of my private repositories (including the one this website is tracked with) over to Gitea and it is working wonderfully. In was as simple as cloning my private repos from Github, initalizing a new repo in Gitea, changing the remote, and pushing.