- Replace raw TOML textarea with Alpine.js interactive form editor (10 collapsible sections with change-tier badges, dynamic array management for connections/shares/ warmup rules, proper input controls per field type) - Add SSE-based live dashboard updates replacing htmx polling - Add log viewer tab with ring buffer backend and incremental polling - Fix SMB not seeing new shares after config reload: kill entire smbd process group (not just parent PID) so forked workers release port 445 - Add SIGHUP-based smbd config reload for share changes instead of full restart, preserving existing client connections - Generate human-readable commented TOML from config editor instead of bare toml::to_string_pretty() output - Fix Alpine.js 2.x __x.$data calls in dashboard/share templates (now Alpine 3.x) - Fix toggle switch CSS overlap with field labels - Fix dashboard going blank on tab switch (remove hx-swap-oob from tab content) - Add htmx:afterSettle → Alpine.initTree() bridge for robust tab switching Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
135 lines
3.3 KiB
Plaintext
135 lines
3.3 KiB
Plaintext
# Warpgate Configuration
|
|
# See: https://github.com/user/warpgate for documentation
|
|
|
|
# --- NAS Connections ---
|
|
# Each connection defines an SFTP endpoint to a remote NAS.
|
|
# The "name" is used as the rclone remote identifier and must be unique.
|
|
|
|
[[connections]]
|
|
# Unique name for this connection (alphanumeric, hyphens, underscores)
|
|
name = "nas"
|
|
# Remote NAS Tailscale IP or hostname
|
|
nas_host = "100.x.x.x"
|
|
# SFTP username
|
|
nas_user = "admin"
|
|
# SFTP password (prefer key_file for security)
|
|
# nas_pass = "your-password"
|
|
# Path to SSH private key (recommended)
|
|
# nas_key_file = "/root/.ssh/id_ed25519"
|
|
# SFTP port
|
|
sftp_port = 22
|
|
# SFTP connection pool size
|
|
sftp_connections = 8
|
|
|
|
# --- Additional NAS (uncomment to add) ---
|
|
# [[connections]]
|
|
# name = "office"
|
|
# nas_host = "192.168.1.100"
|
|
# nas_user = "photographer"
|
|
# nas_pass = "secret"
|
|
# sftp_port = 22
|
|
# sftp_connections = 8
|
|
|
|
[cache]
|
|
# Cache storage directory (should be on SSD, prefer btrfs/ZFS filesystem)
|
|
dir = "/mnt/ssd/warpgate"
|
|
# Max cache size (leave room for dirty files during offline writes)
|
|
max_size = "200G"
|
|
# Max cache retention time
|
|
max_age = "720h"
|
|
# Minimum free space on cache disk
|
|
min_free = "10G"
|
|
|
|
[read]
|
|
# Chunk size for large file reads
|
|
chunk_size = "256M"
|
|
# Max chunk auto-growth limit
|
|
chunk_limit = "1G"
|
|
# Read-ahead buffer for sequential reads
|
|
read_ahead = "512M"
|
|
# In-memory buffer size
|
|
buffer_size = "256M"
|
|
|
|
[bandwidth]
|
|
# Upload (write-back) speed limit ("0" = unlimited)
|
|
limit_up = "0"
|
|
# Download (cache pull) speed limit ("0" = unlimited)
|
|
limit_down = "0"
|
|
# Enable adaptive write-back throttling (auto-reduce on congestion)
|
|
adaptive = true
|
|
|
|
[writeback]
|
|
# Delay before async write-back to NAS
|
|
write_back = "5s"
|
|
# Concurrent upload transfers
|
|
transfers = 4
|
|
|
|
[directory_cache]
|
|
# Directory listing cache TTL (lower = faster remote change detection)
|
|
cache_time = "1h"
|
|
|
|
[protocols]
|
|
# Enable SMB (Samba) sharing — primary for macOS/Windows
|
|
enable_smb = true
|
|
# Enable NFS export — for Linux clients
|
|
enable_nfs = false
|
|
# Enable WebDAV service — for mobile clients
|
|
enable_webdav = false
|
|
# NFS allowed network CIDR
|
|
nfs_allowed_network = "192.168.0.0/24"
|
|
# WebDAV listen port
|
|
webdav_port = 8080
|
|
|
|
# --- Optional: SMB user authentication ---
|
|
# By default, SMB shares use guest access (no password).
|
|
# Enable smb_auth for password-protected access.
|
|
#
|
|
# [smb_auth]
|
|
# enabled = true
|
|
# username = "photographer"
|
|
# smb_pass = "my-password"
|
|
|
|
# --- Shares ---
|
|
# Each share maps a remote NAS path to a local mount point.
|
|
# Each gets its own rclone mount process with independent FUSE mount.
|
|
# The "connection" field references a [[connections]] entry by name.
|
|
|
|
[[shares]]
|
|
name = "photos"
|
|
connection = "nas"
|
|
remote_path = "/volume1/photos"
|
|
mount_point = "/mnt/photos"
|
|
|
|
# [[shares]]
|
|
# name = "projects"
|
|
# connection = "nas"
|
|
# remote_path = "/volume1/projects"
|
|
# mount_point = "/mnt/projects"
|
|
#
|
|
# [[shares]]
|
|
# name = "backups"
|
|
# connection = "nas"
|
|
# remote_path = "/volume1/backups"
|
|
# mount_point = "/mnt/backups"
|
|
# read_only = true
|
|
#
|
|
# # Share from a different NAS:
|
|
# [[shares]]
|
|
# name = "office-docs"
|
|
# connection = "office"
|
|
# remote_path = "/data/documents"
|
|
# mount_point = "/mnt/office-docs"
|
|
|
|
[warmup]
|
|
# Auto-warmup configured paths on startup
|
|
auto = true
|
|
|
|
# [[warmup.rules]]
|
|
# share = "photos"
|
|
# path = "2024"
|
|
# newer_than = "30d"
|
|
#
|
|
# [[warmup.rules]]
|
|
# share = "photos"
|
|
# path = "Lightroom/Catalog"
|