Filehole is a lightweight ephemeral file hosting service written in Go.
To install Filehole, use the following command:
go install github.com/fileholeorg/filehole@latestThis will download and install the latest version of Filehole.
There is a container, you will have to build it yourself for now.
docker build -t filehole:latest .
Bind mounting /data and /buffer recommended if you want files to persist restarts and upgrades.
Filehole can be configured using environment variables or arguments.
-bind string
Address to bind ENV: FH_BIND (default "127.0.0.1:8000")
-buffer-dir string
Buffer folder for uploads ENV: FH_STORAGE_DIR (default "./buffer")
-csp-off
Disable Content-Security-Policy nonces ENV: FH_CSP_OFF
-debug
Enable debug logging for development ENV: FH_DEBUG
-metadata-path string
File metadata storage KV store filename ENV: FH_METADATA_FILE (default "./filehole.db")
-public-url string
Internet facing URL of the base of the site ENV: FH_PUBLIC_URL (default "https://filehole.org")
-serve-url string
Internet facing URL of the base of uploads, only for using a CDN, object storage, etc. ENV: FH_SERVE_URL (default "https://filehole.org")
-site-name string
User facing website branding ENV: FH_SITE_NAME (default "Filehole")
-storage-dir string
Data storage folder ENV: FH_STORAGE_DIR (default "./data")
-upload-limit int
Max allowed size for a HTTP request in bytes ENV: FH_UPLOAD_LIMIT (default 1073741824)
-
rs/zerolog Used for logging. Should be replaced with log/slog now.
-
boltdb/bolt Used to store expiry dates of files. Tempted to just use file system creation time but this is not universal.
-
gorilla/mux Can maybe be replaced with net/http now.
-
gabriel-vasile/mimetype The function used from this lib is present in stdlib but a bit slower there
-
dustin/go-humanize Only used for humanizing free disk space bytes
