wayver's git archive


a simple self-hosted git server
git clone https://git.wayver.dev/bile

README.md@34150f75160e9b2d55638b0e49fd5cab218f71d3

raw
Date Commit Message Author Files + -
2026-02-27 00:51 ... wayverd 1 1 1
...

1# `bile`
2
3a simple self-hosted git server.
4
5its a fork of [thebotlynoob/agit]https://github.com/TheBotlyNoob/agit (which
6is a fork of [alexwennerberg/mygit]https://github.com/alexwennerberg/mygit),
7along with some styling based of [stagit]https://git.codemadness.org/stagit/.
8
9for a live example see my instance: https://git.wayver.dev.
10
11**NOTE**: this is alpha software, it wont break anything, but i am and will be
12making large changes to both the code and the config, so be sure that check
13that you don't need to change anything before updating
14
15## download
16
17as bile is in alpha, there are currently no ways to download a built version
18
19in the future there will be both binary and docker downloads
20
21## building
22
23youll need the rust compiler and a c compiler
24
25run `cargo build --release`
26
27the resulting binary is in `target/release`
28
29## setup
30
31### server setup
32
33get a copy of the server
34
35move it where ever you wish to run it from
36
37by default it looks for a config file in the same directory
38
39if it doesnt find one it'll use its default values (see `src/config.rs`)
40
41highly recommend making your own config (see
42[server configuration]#server-configuration)
43
44create a folder for the repos `mkdir repos` (or what ever you set that config
45to)
46
47run `bile` (either manually, via your init system, or something like docker)
48
49and place it behind a reverse proxy
50
51### repo setup
52
53create a bare repo with `git init --bar <repo_name>`
54
55enter the newly made bare repo `cd <repo_name>`
56
57tell bile that its allowed to show the repo `touch git-daemon-export-ok`
58
59rename the post-update hook (see hook for details)
60`mv hooks/post-update.sample hooks/post-update`
61
62update `HEAD` to point to the main branch (normally master or main), for
63example `echo "ref: refs/heads/main" > HEAD`
64
65update the `description` file so show a proper description on the web page
66
67set optional git config flags (see [git configuration]#git-configuration)
68with `git config <flag_name> <flag_value>`
69
70pushing to the repo is handled by ssh, thats left as an exercise to the reader
71
72## configuration
73
74### server configuration
75
76heres an example config showing all the configuration options
77
78```toml
79# the port the server will listen on
80port = 5000
81# Directory to find git repos
82project_root = "./repos"
83# the text shown in a browsers title bar
84site_name = "wayver's git archive"
85# file to check for in the .git directory to decide whether to publicly show a repo
86export_ok = "git-daemon-export-ok"
87# base URL to clone repositories from (without trailing slash)
88clone_base = "https://git.wayver.dev"
89# the number of commits to be shown when paginating the log
90log_per_page = 100
91```
92
93### git configuration
94
95currently only supports 2 custom values
96
97  - `gitweb.owner`: sets repo owner, currently only used for rss feeds
98  - `bile.section`: sets the (visual) section of the repo on the home page
99
100## faq
101