[UNMAINTAINED] A cgit/webgit alternative, written in Rust
git clone git://
Log | Files | Refs | README | LICENSE (3432B)

      1 # mygit
      3 NOTE: This project is not actively developed. I decided to use cgit instead.
      5 Simple self-hosted git server, written in Rust
      7 Lighter weight than [gitea](, more modern than
      8 [cgit]( or
      9 [gitweb]( For people
     10 who want to run a git server themselves, rather than depending on someone else,
     11 but don't want to put too much work into it.
     13 ## Deploying
     14 Build your binary with `cargo build --release`. Then probably move it somewhere
     15 sensible so it's in your $PATH or use `cargo install --release`. Packages and
     16 prebuilt binaries are TBD.
     18 Probably you want to use your linux distro's init system to keep this server
     19 running.
     21 ## Setting up your repos
     22 Acquire a Linux server that you have ssh access to, and decide on the best
     23 place to place your repos. You can also do this locally to experiment with it.
     25 To initialize a repo, you'll need to run a few commands. I'm using a
     26 self-hosted instance of the mygit repo as an example. Find a directory where
     27 you want to host your repositories. This is using the default settings found in
     28 `mygit.toml` 
     30 ```
     31 git init --bare mygit
     32 cd mygit
     33 touch git-daemon-export-ok
     34 # update "dumb http" server on updates
     35 mv hooks/post-update.sample hooks/post-update
     36 ```
     37 Update the `description` file with a description of the repository
     39 Make sure the HEAD in your remote repo points to your default branch (e.g. master vs main)
     41 Pushing your changes is not handled via mygit -- this will be done over ssh. For example:
     42 ```
     43 git remote add origin ssh://
     44 git push -u origin main
     45 ```
     47 Set up a reverse proxy on an http server which forwards port 8081 (or whatever port you configure) to your mygit server. 
     49 ## Why self-host?
     50 Self-hosting provides self-reliance and independence from large platforms that
     51 using a git hosting platform does not. There are inconvenciences and
     52 disadvantages to self-hosting, but I think there are also advantages as well of
     53 a decentralized, self-hosted network of collaboration. Mygit is designed
     54 primraily for hobbyists or open source hosts, so it's easy to setup and
     55 maintain with little effort, rather than an unnecessarily piece of software
     56 like GitLab. The tradeoff is that you lose out on a lot of features.
     57 Self-hosting git isn't for everyone!
     59 ## Accepting patches
     60 The simplest way to accept patches when self-hosting Git is through
     61 [git-send-email](
     62 ([guide]( You can accept patches either to your
     63 personal email or use a mailing list. Basically only obsessive ideologues like
     64 myself still use git-send-email these days, so you will probably lose
     65 contributers, and not being on GitHub means you lose a lot of discoverability,
     66 so make sure that you're willing to accept that when self-hosting git. You can
     67 mitigate these issues by mirroring to GitHub, but that kind of defeats the
     68 purpose of self-hosting.
     70 I am working on a sibling project to this that handles mailing list archives
     71 for exactly this purpose, but it is not ready for the public yet.
     73 ## Contributing
     74 * [ticket tracker](
     75 * [patches](
     77 This exists on GitHub solely for visibility sake, and probably won't forever,
     78 but while it's here feel free to use GitHub issues, etc. This is alpha
     79 software, please report any bugs, etc!