user@fileserver: ~
______ _ __ / ____/(_) /__ / /_ / / / _ \ / __/ / / / __/ /_/ /_/_/\___/ _____ / ___/___ ______ _____ _____ \__ \/ _ \/ ___/ | / / _ \/ ___/ ___/ / __/ / | |/ / __/ / /____/\___/_/ |___/\___/_/
user@fileserver ─────────────────
OS Alpine Linux (Docker)
Host Go HTTP File Server
Kernel Linux 5.15.0
Uptime calculating...
Packages database/sql, crypto/rand, encoding/hex
Dependencies github.com/mattn/go-sqlite3, golang.org/x/crypto/bcrypt
Shell /bin/sh
Resolution 1920x1080
Database SQLite3 (./data/metadata.db)
Port :8080
Upload Dir ./data
CPU Go Runtime (CGO_ENABLED=1)
Memory 128 MiB / 512 MiB
~ docker-compose up -d --build
✓ Container fileserver started successfully
~ # File hochladen (PUT Method)
~ curl -T datei.pdf http://localhost:8080/datei.pdf
http://localhost:8080/a3f9b2/datei.pdf
# Gibt Download-Link zurück
~ curl -T backup.zip -H "Max-Days: 7" -H "Max-Downloads: 5" http://localhost:8080/backup.zip
# Mit Ablauf nach 7 Tagen und max. 5 Downloads
http://localhost:8080/d8c1e4/backup.zip
~ curl -T secret.txt -H "Password: geheim123" http://localhost:8080/secret.txt
# Passwortgeschützt (bcrypt)
http://localhost:8080/7b2f1a/secret.txt
~ # Datei herunterladen
~ curl http://localhost:8080/a3f9b2/datei.pdf -o datei.pdf
✓ Download complete
~ curl -H "Password: geheim123" http://localhost:8080/7b2f1a/secret.txt
# Passwort im Header
~ curl -u :geheim123 http://localhost:8080/7b2f1a/secret.txt
# Oder Basic Auth (Password als zweites Feld)
~ # System Features:
SQLite Database (metadata.db) Password Protection (bcrypt) Auto-Expiry (Max-Days Header) Download Limits (Max-Downloads Header) Cleanup Worker (every 1 hour) Random File IDs (crypto/rand) PUT Method for Upload GET Method for Download
~ sqlite3 /root/data/metadata.db "SELECT * FROM files;"
# Datenbank Schema: # id, filename, disk_path, created_at, expires_at, # max_downloads, download_count, password_hash
~ cat docker-compose.yml
version: '3.8' services: fileserver: build: ./file-server ports: - "8080:8080" volumes: - ./uploads:/root/data restart: always
~