Why self-host FileBrowser on a VPS
FileBrowser is a web file manager written in Go, distributed as a single binary. It exposes a folder of your server in a modern interface: upload, download, preview, text editing, user management and share links. It's the ideal tool when a Nextcloud would be oversized: no external database, no PHP, a footprint of a few tens of megabytes. On a VPS, it becomes the web access point to your server data — delivering files to a client, granting scoped access to a folder, or simply managing an application's files without going through SFTP. A VPS is required because FileBrowser must read/write in the file system and run as a daemon, which shared hosting does not allow.
Concrete benefits of self-hosted FileBrowser
- Ultra-lightweight: a Go binary, built-in SQLite database, starts in a few milliseconds.
- Fine-grained permission management: each user is confined to a subfolder (scope) with precise rights.
- Share links with password and expiry: send a file without creating an account for the recipient.
- Editing and preview in the browser (text, images, videos) without downloading.
- Custom commands and hooks: trigger a script on upload (conversion, antivirus scan).
- A clean web interface to replace SFTP for non-technical users.
Technical prerequisites
FileBrowser is one of the most resource-efficient tools: 1 vCPU and 512 MB of RAM are more than enough, with disk space depending solely on the volume of files to serve. No external database is required — the configuration and accounts are stored in a local SQLite file. You need Docker and Docker Compose, a fichiers.yourdomain.com subdomain pointed at the VPS, and a reverse proxy for HTTPS. Important: plan which host folder you want to expose (a dedicated /srv/partage folder, never the system root) and mount it as a volume in the container.
Deploy FileBrowser step by step
Prepare the folders and the config
On the VPS: mkdir -p /opt/filebrowser /srv/partage. Create an empty file for the database: touch /opt/filebrowser/filebrowser.db. The /srv/partage folder is the one FileBrowser will expose.
Write the docker-compose.yml
Base it on the filebrowser/filebrowser:latest image. Mount /srv/partage:/srv (the data), /opt/filebrowser/filebrowser.db:/database/filebrowser.db (the database) and set PUID/PGID. Expose the internal port 80 to the reverse proxy only.
Start and retrieve the credentials
Start with docker compose up -d. On first launch, FileBrowser creates an admin account with a password shown in the logs: docker compose logs filebrowser. Note it down for the first login.
Set up the reverse proxy and SSL
Place FileBrowser behind an HTTPS reverse proxy. With Caddy: fichiers.yourdomain.com { reverse_proxy filebrowser:80 }. The Let's Encrypt certificate is generated and renewed automatically.
Secure and create the accounts
Log in, immediately change the admin password, then create users limiting each to its scope (subfolder) with the appropriate rights. Enable the reverse proxy's two-factor authentication if the access is sensitive.
Make use of FileBrowser's “custom commands” to automate post-processing: for example, associate a script triggered on each upload (after_upload) that generates a thumbnail or launches a ClamAV scan. For client shares, always create a dedicated user with a reduced scope rather than sharing the admin account, and enable automatic expiry on public links so that no file remains accessible indefinitely.