Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion scripts/setup-vps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ ufw default deny incoming
ufw default allow outgoing
ufw allow 22/tcp # SSH
ufw allow 80/tcp # HTTP
ufw allow 443/tcp # HTTPS
FERNET_KEY=$(docker run --rm python:3.11-slim python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())" 2>/dev/null || {
echo "ERROR: Failed to generate Fernet key using Docker. Please install Docker properly or generate the key manually." >&2
echo "To generate manually, run: python3 -c 'from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())'" >&2
echo "Then set ENCRYPTION_KEY in /opt/minirag/.env" >&2
exit 1
})
ufw --force enable

echo "==> Creating minirag user and project directory..."
Expand Down