From 3f186a1d57dfb5d92fde6808582a687398fc082f Mon Sep 17 00:00:00 2001 From: AlexanderWhitestone <8633216+AlexanderWhitestone@users.noreply.github.com> Date: Thu, 5 Mar 2026 22:19:27 -0500 Subject: [PATCH] Fix: Automatically allow VPS IP in PAPERCLIP_ALLOWED_HOSTNAMES --- setup_timmy.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/setup_timmy.sh b/setup_timmy.sh index 6e3da7a8..0cc8ab14 100755 --- a/setup_timmy.sh +++ b/setup_timmy.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # ============================================================================= -# Sovereign Agent Stack — VPS Deployment Script (Final Remote-Ready) +# Sovereign Agent Stack — VPS Deployment Script (Remote-Ready Version v5) # # A single file to bootstrap Paperclip + OpenFang + Obsidian on a VPS. # @@ -136,10 +136,16 @@ start_services() { else step "Starting Paperclip (binding to 0.0.0.0)..." cd "$PAPERCLIP_DIR" + + # --- Remote Access Configuration --- + PUBLIC_IP=$(curl -s ifconfig.me) export DATABASE_URL="$DATABASE_URL" export BETTER_AUTH_SECRET="sovereign-$(openssl rand -hex 16)" export PAPERCLIP_AGENT_JWT_SECRET="agent-$(openssl rand -hex 16)" - export BETTER_AUTH_URL="http://$(curl -s ifconfig.me):3100" + export BETTER_AUTH_URL="http://$PUBLIC_IP:3100" + + # Security: Allow the public IP hostname + export PAPERCLIP_ALLOWED_HOSTNAMES="$PUBLIC_IP,localhost,127.0.0.1" nohup pnpm dev --authenticated-private > "$LOG_DIR/paperclip.log" 2>&1 & echo $! > "$PID_DIR/paperclip.pid"