Files
node/.env.example
Kevin CodexandOpenClaude 6b9c5278d4 chore: initial public release
Open-source release of the gitlawb node, CLI, and git remote helper.

- gitlawb-node: Axum HTTP server with git smart-HTTP and DID auth
- gl: command-line client (identity, repos, PRs, MCP server)
- git-remote-gitlawb: git remote helper for gitlawb:// URLs
- gitlawb-core: shared crypto primitives (DID, CID, HTTP sigs, UCAN)

Dual licensed under MIT or Apache-2.0.

Co-Authored-By: OpenClaude <[email protected]>
2026-04-29 16:34:27 +08:00

76 lines
4.2 KiB
Bash

# gitlawb node — environment variables
# Copy to .env and fill in your values.
# All variables are optional unless marked REQUIRED.
# ── Node identity ─────────────────────────────────────────────────────────
# Path to the node's Ed25519 keypair PEM file.
# Generate with: gl identity new
GITLAWB_KEY=/data/keys/identity.pem
# Publicly reachable URL of this node (used in peer announcements)
GITLAWB_PUBLIC_URL=https://your-node.example.com
# ── Server ────────────────────────────────────────────────────────────────
GITLAWB_HOST=0.0.0.0
GITLAWB_PORT=7545
# ── Storage ───────────────────────────────────────────────────────────────
GITLAWB_REPOS_DIR=/data/repos
# PostgreSQL connection URL. Required.
# When using the bundled docker-compose, this is wired automatically.
DATABASE_URL=postgresql://gitlawb:changeme@localhost:5432/gitlawb
# ── IPFS pinning (Pinata) ─────────────────────────────────────────────────
# Get a JWT at https://app.pinata.cloud/developers/api-keys
GITLAWB_PINATA_JWT=
GITLAWB_PINATA_UPLOAD_URL=https://uploads.pinata.cloud/v3/files
# ── Arweave permanent anchoring (Irys devnet) ─────────────────────────────
# Leave empty to disable Arweave anchoring.
GITLAWB_IRYS_URL=https://devnet.irys.xyz
# ── Base L2 smart contracts ───────────────────────────────────────────────
GITLAWB_CHAIN_RPC_URL=https://sepolia.base.org
GITLAWB_CONTRACT_DID_REGISTRY=0x8046284116C5ac6724adbBf860feBeA85692d574
GITLAWB_CONTRACT_NAME_REGISTRY=0x73094B9DAb2421878A20Abed1497001fbD51302c
# $GITLAWB ERC20 token (Base mainnet).
GITLAWB_TOKEN=0x5F980Dcfc4c0fa3911554cf5ab288ed0eb13DBa3
# ── On-chain PoS (operators — required to earn rewards) ───────────────────
# Set both of the next two to enable Proof-of-Stake mode. With both set, the
# node verifies its registration on startup and posts heartbeats automatically.
# Leave empty to run without on-chain PoS (local dev / pre-launch).
# Deployed GitlawbNodeStaking contract address.
GITLAWB_CONTRACT_NODE_STAKING=
# Operator wallet private key (0x-prefixed hex). Used to sign heartbeats.
# Use a dedicated wallet with only enough ETH for gas — not your treasury.
GITLAWB_OPERATOR_PRIVATE_KEY=
# If true, the node refuses to start unless registered and currently active.
# Leave false while bootstrapping; flip to true once your stake is confirmed.
GITLAWB_OPERATOR_STRICT_MODE=false
# Heartbeat cadence in hours. Must be < 24 with headroom. Default: 20.
GITLAWB_HEARTBEAT_INTERVAL_HOURS=20
# ── docker-compose Postgres password ──────────────────────────────────────
# Only used when running via `docker compose up` with the bundled Postgres.
POSTGRES_PASSWORD=changeme
# ── P2P networking ────────────────────────────────────────────────────────
GITLAWB_P2P_PORT=7546
# Comma-separated multiaddrs of bootstrap peers
GITLAWB_BOOTSTRAP_PEERS=
# ── Access control ────────────────────────────────────────────────────────
# Set to false to require auth on all read endpoints
GITLAWB_PUBLIC_READ=true
# ── Sync ─────────────────────────────────────────────────────────────────
# Enable automatic background sync from known peers
GITLAWB_AUTO_SYNC=false