Settings

{#if loading && !settingsLoaded}
Loading settings...
{:else}
{#if activeTab === 'general'}
Theme
{/if} {#if activeTab === 'git-setup'}

When enabled, changes are automatically committed every 10 minutes if there are unsaved changes.

{#if presetUserName}

{#if userName.trim()} Custom value saved. Default would be: {presetUserName} {:else} Will use: {presetUserName} (from your Nostr profile: display_name → name → shortened npub) {/if}

{/if}

Your name as it will appear in git commits. Leave empty to use the preset value from your Nostr profile.

{#if presetUserEmail}

{#if userEmail.trim()} Custom value saved. Default would be: {presetUserEmail} {:else} Will use: {presetUserEmail} (from your Nostr profile: NIP-05 → shortenednpub@gitrepublic.web) {/if}

{/if}

Your email as it will appear in git commits. Leave empty to use the preset value from your Nostr profile.

Default branch name to use when creating new repositories. This will be used as the base branch when creating the first branch in a new repo.

{/if} {#if activeTab === 'connections'}

Server Configuration

Environment variables and server settings. Configure these in your environment or process manager.

{#if loadingConfig}

Loading configuration status...

{:else if configStatus}
{#if expandedSections.has('github')}
GITHUB_TOKEN: {configStatus.github.tokenConfigured ? '✓ Configured' : '✗ Not configured'}

Purpose: GitHub Personal Access Token for API authentication

Why needed: Without a token, you're limited to 60 requests/hour per IP. With a token, you get 5,000 requests/hour.

How to set: export GITHUB_TOKEN=your_token_here

How to create: GitHub Settings → Developer settings → Personal access tokens → Tokens (classic) → Generate new token (classic) with public_repo scope

{/if}
{#if expandedSections.has('git')}
GIT_REPO_ROOT: {configStatus.git.repoRoot}
GIT_DOMAIN: {configStatus.git.domain}
DEFAULT_BRANCH: {configStatus.git.defaultBranch}
GIT_OPERATION_TIMEOUT_MS: {configStatus.git.operationTimeoutMs}ms ({Math.round(configStatus.git.operationTimeoutMs / 1000 / 60)} min)
GIT_CLONE_TIMEOUT_MS: {configStatus.git.cloneTimeoutMs}ms ({Math.round(configStatus.git.cloneTimeoutMs / 1000 / 60)} min)
ALLOW_FORCE_PUSH: {configStatus.git.allowForcePush ? '✓ Enabled' : '✗ Disabled'}

GIT_REPO_ROOT: Directory where repositories are stored (default: /repos)

GIT_DOMAIN: Domain for git clone URLs (default: localhost:6543)

DEFAULT_BRANCH: Default branch name for new repositories (default: master)

GIT_OPERATION_TIMEOUT_MS: Timeout for git operations in milliseconds (default: 300000 = 5 minutes)

GIT_CLONE_TIMEOUT_MS: Timeout for git clone operations (default: 300000 = 5 minutes)

ALLOW_FORCE_PUSH: Allow force push operations (default: false)

{/if}
{#if expandedSections.has('nostr')}
NOSTR_RELAYS: {configStatus.nostr.relays.length} relay(s) configured
NOSTR_SEARCH_RELAYS: {configStatus.nostr.searchRelays.length > 0 ? configStatus.nostr.searchRelays.length + ' relay(s)' : 'Using defaults'}
NIP98_AUTH_WINDOW_SECONDS: {configStatus.nostr.nip98AuthWindowSeconds}s

NOSTR_RELAYS: Comma-separated list of Nostr relays for publishing/fetching (default: wss://theforest.nostr1.com,wss://nostr.land)

NOSTR_SEARCH_RELAYS: Comma-separated list of relays for searching (uses extended default list if not set)

NIP98_AUTH_WINDOW_SECONDS: Authentication window for NIP-98 HTTP auth (default: 60 seconds)

{/if}
{#if expandedSections.has('tor')}
TOR_SOCKS_PROXY: {configStatus.tor.enabled ? configStatus.tor.socksProxy : 'Disabled'}
TOR_HOSTNAME_FILE: {configStatus.tor.hostnameFile || 'Not set'}
TOR_ONION_ADDRESS: {configStatus.tor.onionAddress || 'Not set'}

TOR_SOCKS_PROXY: Tor SOCKS proxy address (format: host:port, default: 127.0.0.1:9050, set to empty to disable)

TOR_HOSTNAME_FILE: Path to file containing Tor hidden service hostname

TOR_ONION_ADDRESS: Tor .onion address for the service

{/if}
{#if expandedSections.has('security')}
ADMIN_PUBKEYS: {configStatus.security.adminPubkeysConfigured ? '✓ Configured' : '✗ Not configured'}
AUDIT_LOGGING_ENABLED: {configStatus.security.auditLoggingEnabled ? '✓ Enabled' : '✗ Disabled'}
AUDIT_LOG_FILE: {configStatus.security.auditLogFile || 'Default location'}
AUDIT_LOG_RETENTION_DAYS: {configStatus.security.auditLogRetentionDays} days
RATE_LIMIT_ENABLED: {configStatus.security.rateLimitEnabled ? '✓ Enabled' : '✗ Disabled'}
RATE_LIMIT_WINDOW_MS: {configStatus.security.rateLimitWindowMs}ms ({Math.round(configStatus.security.rateLimitWindowMs / 1000)}s)

ADMIN_PUBKEYS: Comma-separated list of admin pubkeys (hex format) with elevated privileges

AUDIT_LOGGING_ENABLED: Enable audit logging (default: true, set to false to disable)

AUDIT_LOG_FILE: Path to audit log file (uses default if not set)

AUDIT_LOG_RETENTION_DAYS: Number of days to retain audit logs (default: 90)

RATE_LIMIT_ENABLED: Enable rate limiting (default: true, set to false to disable)

RATE_LIMIT_WINDOW_MS: Rate limit window in milliseconds (default: 60000 = 1 minute)

{/if}
{#if expandedSections.has('resources')}
MAX_REPOS_PER_USER: {configStatus.resources.maxReposPerUser} repositories
MAX_DISK_QUOTA_PER_USER: {Math.round(configStatus.resources.maxDiskQuotaPerUser / 1024 / 1024 / 1024)} GB ({configStatus.resources.maxDiskQuotaPerUser} bytes)

MAX_REPOS_PER_USER: Maximum number of repositories per user (default: 100)

MAX_DISK_QUOTA_PER_USER: Maximum disk quota per user in bytes (default: 10737418240 = 10 GB)

{/if}
{#if expandedSections.has('messaging')}
MESSAGING_PREFS_ENCRYPTION_KEY: {configStatus.messaging.encryptionKeyConfigured ? '✓ Configured' : '✗ Not configured'}
MESSAGING_SALT_ENCRYPTION_KEY: {configStatus.messaging.saltEncryptionKeyConfigured ? '✓ Configured' : '✗ Not configured'}
MESSAGING_LOOKUP_SECRET: {configStatus.messaging.lookupSecretConfigured ? '✓ Configured' : '✗ Not configured'}

MESSAGING_PREFS_ENCRYPTION_KEY: Encryption key for messaging preferences

MESSAGING_SALT_ENCRYPTION_KEY: Encryption key for salt values

MESSAGING_LOOKUP_SECRET: Secret for message lookup operations

{/if}
{#if expandedSections.has('enterprise')}
ENTERPRISE_MODE: {configStatus.enterprise.enabled ? '✓ Enabled' : '✗ Disabled (Lightweight mode)'}

ENTERPRISE_MODE: Enable enterprise mode for Kubernetes container-per-tenant architecture (default: false, set to true to enable)

{/if}
{:else}

Failed to load configuration status.

{/if}
{/if}
{/if}