All endpoints require authentication via cookie-based sessions (web UI) or HTTP Basic Auth (API).
Default credentials:
- Username:
admin - Password: auto-generated during install (or
changeme-strong-passwordin Docker)
Change credentials: edit AUTH_USERNAME and AUTH_PASSWORD in .env (or docker-compose.yml) and restart.
Device passwords and secrets are encrypted at rest using Fernet symmetric encryption, derived from your SECRET_KEY.
The following headers are added to all responses:
X-Content-Type-Options: nosniffX-Frame-Options: DENYX-XSS-Protection: 1; mode=blockStrict-Transport-Security: max-age=31536000; includeSubDomainsContent-Security-Policy
CORS is restricted to origins listed in CORS_ORIGINS. See docs/CONFIGURATION.md for details.
- Changed default
AUTH_PASSWORDto a strong password - Set a strong, random
SECRET_KEY(32+ characters) - Restricted
CORS_ORIGINSto known IPs/domains only - Enabled HTTPS via reverse proxy or direct SSL
- Configured firewall rules to restrict port 5005 access
- Regular backups of the database file
- Enabled automatic security updates on the server
Use Nginx or similar as a reverse proxy with SSL termination:
server {
listen 443 ssl http2;
server_name backup.yourdomain.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
ssl_protocols TLSv1.2 TLSv1.3;
location / {
proxy_pass http://localhost:5005;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}# Generate self-signed certificate (testing only)
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes
# Run with SSL
uvicorn app.main:app --host 0.0.0.0 --port 5005 --ssl-keyfile key.pem --ssl-certfile cert.pemIf using a reverse proxy, restrict the listen address:
HOST=127.0.0.1# Allow only specific subnets
sudo ufw allow from 198.51.100.0/24 to any port 5005
# Block external access if using reverse proxy
sudo ufw deny 5005/tcpBlock brute-force login attempts:
sudo apt install fail2banCreate /etc/fail2ban/filter.d/vibenetbackup.conf:
[Definition]
failregex = ^.*INFO:.*<HOST>.*"POST /login HTTP.*" 401Create or add to /etc/fail2ban/jail.local:
[vibenetbackup]
enabled = true
port = 5005
filter = vibenetbackup
logpath = /var/log/syslog
maxretry = 5
bantime = 3600Note: Adjust
logpathto match your setup. For systemd installs, use/var/log/syslogor pipe journal output. For Docker, usedocker compose logsoutput.
If you suspect unauthorized access:
- Stop the application —
sudo systemctl stop vibenetbackupordocker compose down - Check logs —
sudo journalctl -u vibenetbackupordocker compose logs - Change all credentials — update
AUTH_PASSWORDin.env - Regenerate SECRET_KEY — this will invalidate all stored encrypted credentials (you will need to re-enter device passwords)
- Review database — check for unauthorized changes
- Verify backups — ensure backup files have not been tampered with
If you discover a security vulnerability, please report it privately through GitHub:
- GitHub Security Advisories: Report a vulnerability
Please do not open public issues for security vulnerabilities.