Self-hosted read-only demo and documentation
Run the read-only demo
Use Docker Engine and Compose 2.24.4 or later. From the repository root, create the demo’s administrator credentials and seed its isolated Compose project. The demo has its own PostgreSQL, RustFS, and data volumes. The Nginx gateway binds to 127.0.0.1:18081 by default.
umask 077
export ARKA_DEMO_ENV_FILE="$HOME/.config/arka-demo/demo.env"
mkdir -p "$(dirname "$ARKA_DEMO_ENV_FILE")"
test -e "$ARKA_DEMO_ENV_FILE" || printf 'ARKA_BOOTSTRAP_ADMIN_PASSWORD=%s\n' \
"$(openssl rand -hex 24)" > "$ARKA_DEMO_ENV_FILE"
./scripts/seed-demo.sh --buildOpen the demo for account details or go to /public to browse anonymously. To use a release image, set ARKA_IMAGE to a trusted image and explicit version in the environment file, then run ./scripts/seed-demo.sh. Once the service is healthy, the seed container creates sample data over the internal network and sets Hosted repositories to the deny write policy.
| Sample | What to verify |
|---|---|
demo-raw, demo-maven, demo-pypi, demo-helm | Browse and download real format samples anonymously. |
demo-group, demo-proxy | Raw Group uses Hosted first. Proxy reads from the same instance’s Raw upstream. A Routing Rule blocks blocked/. |
demo-quota storage pool | The demo-raw quota is 256 bytes with a 50% warning threshold. The seed process reads back the warning and storage usage. |
demo-selector | Sign in as demo-viewer with password arka-demo-viewer to read samples/visible.txt. Portable CSEL format == 'raw' && path =^ '/samples/' limits reads. |
The gateway allows the public UI, repository reads, and login. Writes return 405. Use /repositories after signing in to see the repositories available to that account. Operators run seed jobs and access the management API from the internal network. Keep administrator credentials and volumes separate from other deployments. The published viewer credentials are for this demo instance.
base=http://127.0.0.1:18081
curl -fsS "$base/repository/demo-group/samples/welcome.txt"
curl -sS -o /dev/null -w '%{http_code}\n' "$base/repository/demo-proxy/blocked/demo.txt"
curl -sS -o /dev/null -w '%{http_code}\n' -X PUT --data 'test' \
"$base/repository/demo-raw/samples/write-check.txt"
curl -fsS -u demo-viewer:arka-demo-viewer "$base/repository/demo-selector/samples/visible.txt"The second and third requests return 403 and 405, respectively. Run ./scripts/seed-demo.sh --seed-only to read back the current seed state and fill in missing samples. Reuse the same environment file for the same Compose project.
Serve the demo over HTTPS
Set ARKA_DEMO_PUBLIC_URL=https://demo.example.org in the environment file. Route the HTTPS reverse proxy to the demo’s loopback port, preserve Host, and rate-limit login and download traffic as appropriate. If the reverse proxy runs on another host, set ARKA_DEMO_BIND to an internal address and restrict source addresses in the host firewall. Keep Arka, PostgreSQL, object storage, and the seed service on the Compose network.
Use the same -p value for custom project names. The first command stops the project and keeps its volumes. The second permanently removes this demo’s samples and settings.
docker compose --env-file "$ARKA_DEMO_ENV_FILE" -f docker-compose.demo.yml down
docker compose --env-file "$ARKA_DEMO_ENV_FILE" -f docker-compose.demo.yml down -vBuild the static documentation
Use Node.js 24 and pnpm 10. The build reads both locales, the deployment guide, and the assets from the checkout. It generates both API indexes from the OpenAPI 3.1 contract and publishes the original JSON. Choose a new or empty output directory.
pnpm --dir docs-site install --frozen-lockfile
site="$(mktemp -d)"
ARKA_DOCS_BASE=/ ./deploy/demo/build-docs.sh "$site"
ARKA_DOCS_BASE=/ ARKA_DOCS_OUT_DIR="$site" pnpm --dir docs-site run preview --port 18881Open the local preview. For deployment, configure the static server to resolve extensionless page URLs to their .html files.
Mount the site on the demo gateway
Build for /docs/ and let Compose bind the output directory read-only to the Nginx gateway.
site="$(mktemp -d)"
ARKA_DOCS_BASE=/docs/ ./deploy/demo/build-docs.sh "$site"
chmod -R a+rX "$site"
export ARKA_DEMO_DOCS_DIR="$site"
docker compose --env-file "$ARKA_DEMO_ENV_FILE" -f docker-compose.demo.yml up -d demoOpen the mounted documentation. The GitHub Pages build defaults to /arka/. You can also read the documentation index and deployment guide in the repository.