1# Soft Serve
 2
 3A tasty Git server. Self-hosted with a built in SSH powered TUI.
 4
 5## What is it?
 6
 7Soft Serve is a Git server that runs its own SSH service, allows repo creation
 8on first push, is configured by cloning a `config` repo and provides a TUI
 9accessible to anyone over SSH without having to worry about setting up accounts
10on the host machine. Give it a shot!
11
12```
13ssh beta.charm.sh
14```
15
16## Installing / Building
17
18The Soft Serve command is called `soft`. You can build it with `go`.
19
20```
21cd cmd/soft
22go build
23```
24
25## Setting up a server
26
27Make sure `git` is installed, then run `soft`.
28
29## Configuring
30
31When Soft Serve is run for the first time, it creates a configuration repo that
32contains the README displayed for Home and user access control. By default the
33`config` repo is publicly writable, so be sure to setup your access as desired.
34You can also set the `SOFT_SERVE_AUTH_KEY` environment variable and it will
35restrict access to that initial public key.
36
37```
38git clone ssh://localhost:23231/config
39```
40
41## Pushing a repo
42
43You can add your Soft Serve server as a remote to any existing repo.
44
45```
46git remote add soft ssh://localhost:23231/REPO
47```
48
49After you've added the remote, you can push. If it's a new repo, it will be
50automatically added to the server.
51
52```
53git push soft main
54```
55
56## Soft Serve TUI
57
58Soft Serve provides a TUI over SSH to browse repos, view READMEs, and grab
59clone commands.
60
61```
62ssh localhost -p 23231
63```
64
65It's also possible to direct link to a specific repo.
66
67```
68ssh localhost -t -p 23231 REPO
69```
70
71### Server Options
72
73You have control over the various options via the following server environment
74variables:
75
76* `SOFT_SERVE_PORT` - SSH listen port (_default 23231_)
77* `SOFT_SERVE_HOST` - SSH listen host (_default 0.0.0.0_)
78* `SOFT_SERVE_KEY_PATH` - SSH host key-pair path (_default .ssh/soft_serve_server_ed25519_)
79* `SOFT_SERVE_REPO_PATH` - Path where repos are stored (_default .repos_)
80* `SOFT_SERVE_AUTH_KEY` - Initial admin public key (_default ""_)