Self-host with arks
You can host an independent arks forge with the same arks CLI — git remotes and a forge API for PRs/issues — no separate server product, and no need to run git or gh underneath.
This is the arks product self-host story: localhost, intranet (LAN), and optionally the internet (WAN). Stock git-daemon flag parity is related but not the same story. Forge client ops are flat on the same binary (arks pr, arks issue, … — like gh without a second CLI).
What arks does
- Speaks git-compatible clone / fetch / push on claimed transports
- Runs a single
arks serveprocess that can listen for HTTP, SSH, and forge API together (product default) - Auth for remotes aligns with stock Git: HTTP Basic + HTTPS/TLS for HTTP; SSH keys for SSH
- Forge API auth is for
arks hubtalking to the forge module — not a substitute for Git remote auth - Never spawns
gitorghon product paths
Commands (product surface)
arks serve [--no-http] [--no-ssh] [--no-forge] [listener flags…] <directory>
arks serve config show|set|path|validate|sync …
| Command | Role |
|---|---|
arks serve |
Hosting umbrella — default enables HTTP + SSH + forge API |
arks serve --no-ssh |
Omit in-process SSH |
arks serve --no-http |
Omit HTTP git |
arks serve --no-forge |
Git transports only |
arks serve config … |
Self-host server config (not arks config, not hub client config) |
arks serve-http |
Transitional HTTP-git spelling; not a permanent alias |
arks daemon |
git:// TCP daemon (top-level; weak/no auth; not the GitHub-like story) |
arks pr / issue / auth / … |
Flat client forge ops (peer: gh) |
arks hub … |
Transitional forward to flat leaves — not day-to-day UX |
arks hub serve |
Transitional thin alias toward arks serve forge — not the primary host start |
arks upload-pack / arks receive-pack |
Stdio pack peers (ops SSHD today) |
There is no arks self-host command. Nested arks serve http / serve ssh / serve forge verbs are not the primary surface (flags won).
Target journey
# one host process (self-hosted arks forge)
arks serve /path/to/repos
# clients (merged git + gh surface)
arks clone http://host/repo.git # or stock git
arks pr list --host http://host # flat forge client
Bind: localhost, LAN, WAN
| Reach | What you do | What arks owns |
|---|---|---|
| Localhost | Default loopback-friendly demos | Git wire / forge API on enabled modules |
| LAN | Bind to a LAN address (or all interfaces) + open the host firewall | Same |
| WAN | Bind + firewall + HTTPS/TLS in front (HTTP) and/or SSH keys + firewall | Wire after traffic arrives |
Ops owns: firewall rules, DNS, TLS certificates, reverse proxies. Prefer HTTPS for HTTP off localhost. In-process TLS is clean-room verified (TLS receipt); ops reverse-proxy remains a valid deploy pattern. arks does not claim “safe on the open internet by default.”
Ports (normative vs demo)
Prefer IANA / Git-documented ports in operator-facing clone URLs when you can bind them or put an ops front in front. Unprivileged loopback demos may use higher ports — those are alternates, not “more standard” Git ports.
| Surface | Normative target | Demo / alternate | Why the alternate |
|---|---|---|---|
| SSH git | 22 | 2222 | Non-root bind (<1024 needs privilege) or host sshd already owns 22 |
| HTTP git | 80 | 8080 | Same unprivileged-bind reason |
| HTTPS | 443 | Ops TLS front | Prefer reverse-proxy TLS off localhost |
git:// (arks daemon) |
9418 | — | Already the registered git-daemon default |
| Forge API | 3920 | configurable | arks-local convention (not an IANA Git port) |
Today’s process listen defaults stay loopback-friendly demos (8080 HTTP, 2222 SSH, 9418 daemon, 3920 forge) so demos do not require privileged bind. Docs and --help treat 22 / 80 / 443 / 9418 as the product story. See the self-host specification and port standards research.
Auth (Git remote vs forge client)
- HTTP git path: HTTP Basic when configured; prefer HTTPS/SSL/TLS via operator-terminated TLS off-localhost.
- SSH path: public keys /
authorized_keys-style expectations. In-process SSH underarks serveis clean-room verified for OpenSSH ChaCha wire and stockgit clone ssh://end-to-end (SSH receipt); bind failures fail closed. Ops SSHD +upload-pack/receive-packremains a valid alternate. - Forge API & Web UI: tokens /
arks auth …against the forge base URL; HTTPS remote client end-to-end (HTTPS client receipt) and local forge-in-serve hosting end-to-end (self-host forge receipt) are clean-room verified. Production auth and forge hardening — PBKDF2 password hashing, CSPRNG tokens, mandatory CSRF checks, strict admin RBAC, real HTTP/HTTPS webhook delivery, a unified/reposAPI, and async local Actions runs — is Docker clean-room verified (production hardening receipt). - Fail-closed: if an enabled module is unavailable or unready,
arks serveexits cleanly rather than silently degrading. Use--no-ssh/--no-forgewhen you want a narrower transport set. git://(arks daemon): typically unauthenticated, no SSL — preferarks servewhen auth matters.
Versus other surfaces
Self-host (arks serve) |
arks daemon |
Flat forge client | |
|---|---|---|---|
| Job | Self-hosted forge (git + arks forge API) | Match git-daemon flags |
arks pr / issue / … (peer: gh) |
| Required for git alias? | No (server bar) | No | No |
| Separate binary? | No | No | No |
Honesty
Wire transports (smart HTTP, dumb HTTP, SSH stdio, git://) and configured HTTP Basic auth are backed by clean-room receipts:
- In-process SSH: verified with stock
git clone ssh://(SSH receipt);arks serve ssh-smoke [--git-pack]is a separate local listener diagnostic (smoke receipt). - In-process TLS & HTTPS forge client: verified end-to-end (TLS receipt, HTTPS client receipt; never spawns
gh). - Zero-downtime config reload (
arks serve config): verified across HTTP, SSH, and forge listeners viaSIGHUPon Unix (HTTP, SSH, forge) and file-mtime reload on Windows (covered bywindows-2025CI). - Forge API under
arks serve: local hosting end-to-end is verified (self-host forge receipt); a dedicated multi-host LAN/WAN end-to-end harness remains a scaffold. Full specification: arks-self-host-server.
Embedded Web UI & deploy templates
arks serve also includes an embedded forge Web UI and ready-to-adapt operator deployment templates under deploy/:
- Deployment templates:
deploy/docker-compose.yml,deploy/Caddyfile,deploy/nginx.conf,deploy/systemd/arks-serve.service, anddeploy/backup-restore.sh(ops-owned reverse-proxy TLS and backup patterns). - Embedded Web UI & API routes (Docker clean-room verified): first-user
/registerRBAC bootstrap, login rate limiting, global logout session revocation across child repos, multi-repo dashboard (--root), private-repo visibility enforcement (401across Web/REST/dashboard/search), archived-repo write guard (403across HTTP/REST/SSH/LFSPUT), repo deletion,/agentssession view & leases API/unlock,/adminaudit log (retention cap & export),/healthz,/metrics,/robots.txt, HSTS & security headers, RFC 6238 TOTP 2FA (QR & recovery), secrets,.tar.gz/.patch& commit.patchdownloads, web file edit/delete, draft PRs, Atom feeds, cross-repo code search, Actions runs API/live logs/rerun/artifacts, unified/reposREST writes, PR reviews/templates, and real webhooks — verified with stockgit 2.39.5live interop (enterprise receipt, production hardening receipt, UI & enforcement receipt, round-2 hardening receipt, private-visibility receipt, session-revocation receipt). See Quickstart & Migration for launch examples.
Next
Ports · Daemon · Forge client · Completeness · Getting started · Quickstart & migration · Limits · Git vs arks