Lightweight and easily self-hostable Git forge. git.poy.ooo
git-forge selfhosting homebrew
README.md

Farga #

Farga is a FOSS lightweight and easily self-hostable Git forge meant for personal use. It's so tiny you could theoretically run it on a PS3.

Features #

  • It's small and uses less than 50MB of RAM. Host it on a PS3!
  • It uses SQLite as a database and stores all git repos on-disk. It's self-contained.
  • All features work without Javascript. It uses a couple HTML/CSS tricks to minimize JS usage.
  • Access your repos via SSH.
  • Its useful web view allows you to browse different branches:
    • tree, blob and raw modes let you view directories, files and raw files.
    • Create issues (optionally anonymously) and reply to them.
    • View a repo's git history.
  • Download a repo or branch as a ZIP.
  • The Hackatime integration shows how much time you've spent on a repo.
  • Signups are toggleable: only let people you trust in with an invite.
  • Create gists and save code snippets.

It obviously includes no tracking, no advertising, no fingerprinting, etc.

Running Farga #

Quick setup #

sudo pacman -Syu go git
git clone https://tangled.org/poy.ooo/farga && cd farga
cp example.env .env
go run .

Note: this "quick setup" will only work on machines running Arch Linux.

Prerequisites #

  • Go 1.26.3 or higher.
  • Git + Git knowledge.

Setup #

  1. Clone this repository, and cd into it.
  2. Copy example.env and rename it to .env.
  3. Modify any environment variables you need. CSRF_KEY will be automatically set by Farga. Set PUBLIC_URL to the URL at which you would access Farga's index, including http(s) (e.g: https://localhost:3333).
  4. (Optional) Setup Hackatime OAuth: If you want to enable the hackatime integration, go to Hackatime's OAuth2 Applications page, create a new application, and put the generated App ID and Secret to the the .env.
  5. go run .

Creating an ADMIN account #

To create an "Admin" account, run go run . --new-admin. It will generate a special invite token and print it to the terminal:

Your ADMIN invite token is: 'XOX2NFYR'. DO NOT SHARE IT.

Redeem it like any other invite. You'll be assigned "Admin" on registration.

TODO: #

Farga is a work-in-progress. Here's a list of what's implemented and what's not.

Items with a ? prefix are possible future features.

      • Blob:

Contributing #

Contributions are welcome and greatly appreciated. Read DEVELOPMENT.md for reference.

Main development is happening at https://tangled.org/poy.ooo/farga

Don't hesitate to contact me if you have any questions or want to talk about the project itself.

Security #

If you believe you have found a security vulnerability, please email webmaster@poy.ooo as soon as possible with the following details:

  • Explanation of the issue.
  • Steps to reproduce / PoC.
  • How to mitigate or fix the issue. (optional)

I'll get back to you ASAP.

License #

Farga is Free Libre Open Source Software (FLOSS) licensed under the GNU AGPLv3 license. See the LICENSE.txt file for details.