Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
144 lines (114 loc) · 5.85 KB
/
Copy path.env.example
File metadata and controls
144 lines (114 loc) · 5.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# Docker Manager Configuration
# Copy this file to .env and customize for your environment
# === Required ===
# JWT Secret (min 32 characters, required unless AUTH_DISABLED=true)
# Generate with: openssl rand -hex 32
JWT_SECRET=
# === Recommended ===
# Storage key: derives the at-rest encryption key for stored secrets (git
# tokens, restic password) independently of JWT_SECRET. Strongly recommended so
# rotating JWT_SECRET does not require re-encryption and so disclosing
# JWT_SECRET alone cannot decrypt stored secrets. If unset, JWT_SECRET is used.
# Generate with: openssl rand -hex 32
STORAGE_KEY=
# Root directory containing Docker Compose stacks
STACKS_DIR=/opt/stacks
# Host path must match STACKS_DIR for Docker Compose operations to work
HOST_STACKS_DIR=/opt/stacks
# === Optional ===
# Server port (default: 5001)
PORT=5001
# Data directory for SQLite database (default: /app/data)
DATA_DIR=/app/data
# Log level: debug, info, warn, error (default: info)
# Log format: text or json (default: text)
# An unrecognised value stops the server at startup rather than silently
# falling back, so a typo is visible immediately. Use json when shipping to an
# aggregator (Loki, Elasticsearch); text is easier to read at a terminal.
# Every log line carries a request_id, also returned in the X-Request-ID
# response header and recorded on the matching action_log row.
LOG_LEVEL=info
LOG_FORMAT=text
# Sets the container clock, as an IANA zone name (default: UTC). Scheduled
# updates and backups fire in this zone, so leaving it at UTC means a 03:00
# window runs at 03:00 UTC, not 03:00 local. Set it to your own zone and the
# times you pick in the UI are the times you get: in Europe/Amsterdam, UTC
# puts a 03:00 backup at 05:00 local in summer and 04:00 in winter.
# The zone in effect is shown next to the schedule fields in
# Settings → Backup and Settings → Updates.
# Example: TZ=Europe/Amsterdam
TZ=UTC
# Disable authentication - only safe on trusted networks!
# When enabled, access is restricted to AUTH_DISABLED_ALLOWED_NETWORKS (below),
# checked against the real TCP peer address, never a forwarded header.
AUTH_DISABLED=false
# Comma-separated CIDR ranges, beyond loopback, allowed to use the
# AUTH_DISABLED bypass. Empty means loopback only.
#
# Deliberately separate from TRUSTED_NETWORKS: that value is Gin's
# trusted-proxy list, needed for correct client-IP attribution and rate
# limiting. Reusing it here would mean trusting a reverse proxy for IP
# attribution silently widens who can skip authentication entirely
# (agent-os-0s4).
# Name the client hosts, not a whole private range.
# AUTH_DISABLED_ALLOWED_NETWORKS=192.168.1.10/32
# Hostnames or IPs, beyond localhost/127.0.0.1/[::1], that the browser may use
# to reach Capstan while AUTH_DISABLED=true (comma-separated, port ignored).
# Any other Host header gets 403. This stops DNS rebinding: a malicious page
# that re-points its own domain at 127.0.0.1 arrives from loopback and would
# otherwise get the bypass. Set it to whatever is in your browser's address bar.
# ALLOWED_HOSTS=capstan.lan,192.168.1.10
# Comma-separated CIDR ranges allowed to front Capstan as a reverse proxy
# (Gin's trusted-proxy list) and to be trusted for X-Forwarded-For — this
# drives client-IP attribution for logging and the login rate limiter. It has
# no effect on AUTH_DISABLED (see AUTH_DISABLED_ALLOWED_NETWORKS above).
# Unset = loopback only. Name your reverse proxy's own address, never a whole
# private range: every host in a trusted range can spoof X-Forwarded-For.
# TRUSTED_NETWORKS=172.20.0.5/32
# Comma-separated CIDR ranges, beyond loopback, allowed to reach /health
# (liveness) and /health/ready (readiness). Empty means loopback only, which is
# all the container's own HEALTHCHECK needs. Set this to let an external uptime
# monitor or load balancer probe Capstan.
#
# Deliberately separate from TRUSTED_NETWORKS and AUTH_DISABLED_ALLOWED_NETWORKS:
# reusing either would grant a monitor X-Forwarded-For spoofing or auth bypass
# just to read health.
# HEALTH_ALLOWED_NETWORKS=10.1.0.0/16
# CORS origins (comma-separated, empty = same-origin only)
# CORS_ORIGINS=https://your-domain.com
# Git SSH key path for private repos (default: ~/.ssh/id_rsa)
# GIT_SSH_KEY=/path/to/id_rsa
# Git HTTPS credentials for private repos
# GIT_HTTPS_USER=git
# GIT_HTTPS_TOKEN=
# === Backups (restic + rclone) ===
# These are env-var fallbacks. Settings configured in the UI (Settings → Backup)
# take precedence at runtime, so you can also leave these unset and configure
# everything through the web interface — the password is stored encrypted at rest.
# Path to the restic repository inside the container.
# Default: {DATA_DIR}/restic-repo (i.e. /app/data/restic-repo when DATA_DIR=/app/data)
# The ./data directory MUST be a host bind mount so snapshots survive container recreation.
# RESTIC_REPOSITORY=/app/data/restic-repo
# Restic repository password. Use a strong passphrase — this encrypts your backups.
# Store securely; losing it means losing access to all snapshots.
# RESTIC_PASSWORD=
# Retention policy (number of snapshots to keep; defaults: 7/4/6/0)
# BACKUP_KEEP_DAILY=7
# BACKUP_KEEP_WEEKLY=4
# BACKUP_KEEP_MONTHLY=6
# BACKUP_KEEP_YEARLY=0
# Run restic prune automatically after forget (default: true)
# BACKUP_AUTO_PRUNE=true
# Backup schedule interval in minutes (0 = disabled; configure in UI instead)
# BACKUP_SCHEDULE_INTERVAL=0
# Run an rclone sync automatically after each local backup (default: false)
# BACKUP_SYNC_AFTER=false
# rclone remote name as configured in rclone.conf (e.g. s3, b2, gdrive)
# RCLONE_REMOTE=
# Remote path/bucket for the sync destination (e.g. my-bucket/capstan-backups)
# RCLONE_PATH=capstan-backups
# Number of parallel rclone transfers (default: 4)
# RCLONE_TRANSFERS=4
# Host name stored in restic snapshots (default: capstan). Keep it fixed:
# restic picks a backup's parent snapshot per host.
# BACKUP_HOSTNAME=