Git Storage
This document defines the first local code-hosting target for Clawdie.
Decision
Section titled “Decision”Use a dedicated FreeBSD jail named {agent}-git for local code storage.
Initial scope:
- bare repositories only
- optional later Gitea upgrade on the same jail role
- no CI
- no public exposure by default
This keeps code storage simple and reduces dependence on external remotes during bootstrap, maintenance, and recovery.
- lower operational complexity than introducing Gitea immediately
- easy to mirror from Codeberg without changing public workflow
- fits the existing jail-per-role design
- clean separation from:
- the host orchestrator
dbPostgreSQLcmscontent stack
Jail Shape
Section titled “Jail Shape”- jail name:
{agent}-git - hostname:
git.<agent>.home.arpa - role: persistent internal service
- preferred storage path:
/srv/git
IP address is assigned dynamically via WARDEN_GIT_IP — there is no fixed
slot for the git jail in the current layout (.4 is cms, .5 is llama-cpp).
The installer stores this as:
CODE_HOSTING_MODE=external|git|giteaREMOTE_GIT_URL=...FEATURE_GIT=true|falseFEATURE_GITEA=true|falseWARDEN_GIT_IP
Mode meanings:
external= bootstrap from a remote git URL onlygit= plain local git storage in thegitjailgitea= local git plus the optional Gitea application layer
Recommended default:
- all current-main installs default to
git
First Bootstrap Goal
Section titled “First Bootstrap Goal”The first supported target is:
- create the
gitjail - install
git - create
/srv/git - create one or more bare repositories
- allow local clone/push from host and future worker/cms tooling
This stage does not require nginx, a public UI, or a separate database.
Recommended Workflow
Section titled “Recommended Workflow”Keep public and local remotes separate.
origin= Codeberggit= local bare repository in thegitjail
If CODE_HOSTING_MODE=external, keep the bootstrap path simple:
origin=REMOTE_GIT_URL
If CODE_HOSTING_MODE=git, use:
origin= Codeberggit= local git jail
If CODE_HOSTING_MODE=gitea, use:
origin= Codeberggitorgitea= local Gitea-backed remote
That allows:
- local-first clone/push inside the host
- later push or mirror upstream when wanted
- reduced dependence on external network availability
When CODE_HOSTING_MODE=external, the installer also captures
REMOTE_GIT_URL for bootstrap and clone operations.
Non-Goals
Section titled “Non-Goals”Not part of the first bootstrap implementation:
- Gitea provisioning
- full Codeberg-like forge
- public HTTP UI
- SSH key management for the git jail
- automatic mirroring
Those can be layered on later if the plain git jail proves useful. The
installer may already expose Local Gitea as a future mode, but the first
bootstrap target remains plain git storage.
First Repository Layout
Section titled “First Repository Layout”The first useful filesystem shape inside the git jail is:
/srv/git/ Clawdie-AI.gitThe repository should be:
- bare
- internal-first
- mirrored from the current repo or the configured upstream remote
- clonable from host-side tooling and future jailed workflows
Recommended first command shape after bootstrap:
git clone --mirror https://codeberg.org/Clawdie/Clawdie-AI.git /srv/git/Clawdie-AI.gitRelated Files
Section titled “Related Files”- setup/git.ts — git jail provisioning
- setup/install.ts — install orchestrator
- git-jail-bootstrap.yaml
- ansible-freebsd skill