Self-Hosted Google Drive: Lightweight File Browser
In this article
The best lightweight self-hosted Google Drive alternative is File Browser, a single-binary web file manager that gives you a clean interface to upload, download, share, and edit files on your own server. It runs on virtually any Linux machine, uses minimal RAM (often under 50 MB), and has no database or complicated dependencies—just a config file and a folder of files. This article explains what File Browser does, how it compares to heavier options like Nextcloud, and how to set it up safely.
What File Browser Actually Does
File Browser is a web-based file manager for a single directory tree on your server. You log in through a browser, and you see a two-pane interface: left side for folders, right side for files. You can upload and download files with drag-and-drop, create and rename folders, edit text files directly in the browser, and share individual files or folders via temporary public links. It also has a built-in user system, so you can create accounts for family or colleagues, each restricted to specific directories.
Unlike Google Drive, there is no sync client, no document collaboration, no office suite, and no automatic photo backup. It is purely a file manager. That simplicity is exactly why it is so light: the entire program is a single executable file (about 10–15 MB) that you run directly. It stores its configuration in a simple JSON file and can use SQLite for user databases if you need more than one user.
Why Choose a Lightweight Option Over Nextcloud
Nextcloud is the most popular self-hosted Google Drive alternative, but it is not lightweight. A typical Nextcloud installation requires a web server (Apache or Nginx), PHP, a database (MySQL or PostgreSQL), and a Redis cache for performance. The PHP-FPM process alone can consume 200–400 MB of RAM, and the database adds another 100–200 MB. On a small VPS with 512 MB of RAM, that leaves little room for anything else.
File Browser, by contrast, runs as a single Go binary. It has no external dependencies—no database server, no PHP, no web server. It can serve files directly over HTTP or HTTPS, and it can even run behind a reverse proxy like Caddy or Nginx if you want a domain name and automatic SSL. For a home server on a Raspberry Pi or an old laptop, this is often the difference between a snappy interface and a sluggish one.
How to Install File Browser (Step-by-Step)
Installation is intentionally simple. The following steps assume a Linux server (Debian/Ubuntu) with a non-root user that has sudo privileges.
- Download the binary. Go to the official File Browser GitHub releases page and grab the latest
linux-amd64tarball. Extract it withtar -xzf filebrowser*.tar.gz. - Move it to your PATH.
sudo mv filebrowser /usr/local/bin/ - Create a config directory.
sudo mkdir /etc/filebrowser - Initialize the database. Run
filebrowser -d /etc/filebrowser/filebrowser.db config initto create the SQLite database. - Set the root directory.
filebrowser -d /etc/filebrowser/filebrowser.db config set --root /srv/files(replace/srv/fileswith the folder you want to manage). - Create an admin user.
filebrowser -d /etc/filebrowser/filebrowser.db users add admin yourpassword --perm.admin - Start the service. You can run it manually with
filebrowser -d /etc/filebrowser/filebrowser.db, or better, create a systemd service file so it starts on boot. The service file should specify the binary path, the database path, and the listening address (e.g.,0.0.0.0:8080).
After that, open http://your-server-ip:8080 in a browser and log in with the admin credentials. You will see the file manager immediately.
Key Features and Configuration Options
File Browser has several features that make it a practical daily driver for personal or small-team use:
- User management: Each user can be assigned a specific scope (a subdirectory) and can have permissions for upload, download, delete, rename, and share. You can also set a user as an admin to manage other users.
- Public sharing: Right-click any file or folder and select “Share.” You get a link that works without login, with optional expiration and password protection. This is handy for sending a large file to a friend without setting up a separate sharing service.
- Built-in text editor: Edit configuration files, notes, or code directly in the browser. It supports syntax highlighting for many languages.
- Command-line execution: For admin users, there is a “Console” tab that lets you run shell commands on the server. This is powerful but also a security risk, so it should only be enabled for trusted users.
- HTTPS support: You can enable TLS directly in File Browser by specifying a certificate and key file, or you can put it behind a reverse proxy like Caddy for automatic Let’s Encrypt certificates.
Configuration is done via the config set command or by editing the config.json file. Common settings include the default language, the brand name shown in the interface, and whether to enable the “exec” command feature.
Security Considerations and Best Practices
Since File Browser exposes your files over the network, security is critical. Here are the most important measures:
- Use HTTPS. If you are not using a reverse proxy, at least enable TLS in File Browser. Without encryption, your login credentials and files travel in plain text over the network.
- Change the default port. Running on port 8080 is fine, but changing it to a random high port (e.g., 8432) reduces automated scanning.
- Disable the command console. Unless you absolutely need it, keep the
--execfeature off. A compromised admin account with exec access is essentially root on your server. - Use strong passwords and 2FA. File Browser supports TOTP two-factor authentication for users. Enable it for any account with admin rights.
- Run as a non-root user. Do not run the File Browser process as root. Create a dedicated system user and give it read/write permissions only on the directory it manages.
- Keep the binary updated. File Browser releases security patches regularly. Check the GitHub releases page every few months and update.
One common misconception is that File Browser is inherently insecure because it is lightweight. In reality, the security depends on how you configure it. A properly configured File Browser behind a reverse proxy with HTTPS and 2FA is as secure as most self-hosted apps.
Comparing File Browser to Other Lightweight Alternatives
File Browser is not the only lightweight option. Here is how it stacks up against two other popular choices:
- File Browser vs. H5AI: H5AI is a PHP-based directory listing script that is even simpler—no login, just a pretty file index. It is fine for a public read-only file dump, but it has no upload, no user management, and no sharing. File Browser is a full file manager with authentication.
- File Browser vs. Pydio Cells: Pydio Cells is a modern file sharing platform with a web UI, but it is heavier (requires MySQL and a Java runtime) and more complex to set up. It offers more collaboration features, but for a single user or small team, File Browser is far simpler.
- File Browser vs. rclone with WebDAV: rclone can serve a directory over WebDAV, which you can then mount on your computer. That gives you a network drive but no web interface. File Browser gives you a web UI and sharing links, which is more user-friendly for non-technical users.
For most people who want a “Google Drive replacement” without the overhead, File Browser hits the sweet spot. If you need document editing, calendar, contacts, and mobile sync, then Nextcloud is the right tool—just be prepared for the resource usage.
Frequently Asked Questions
Can File Browser sync files like Google Drive does?
No, File Browser does not have a desktop sync client. It is a web-based file manager, not a sync tool. You can upload and download files manually through the browser, or you can use WebDAV (File Browser supports WebDAV) to mount the folder as a network drive on Windows, macOS, or Linux. That gives you a semblance of sync, but it is not automatic two-way sync like Google Drive’s client.
Does File Browser support video streaming?
Yes, File Browser can serve video files directly. If you open a video file in the browser, it will play using the browser’s built-in HTML5 video player. It supports range requests, so seeking works. However, there is no transcoding, so the file must be in a format your browser can play (MP4, WebM, etc.).
Can I use File Browser on Windows or macOS as a server?
Yes, File Browser provides binaries for Windows and macOS. You can run it on a Windows machine or a Mac, and it will work the same way. However, the systemd service instructions are Linux-specific; on Windows you would use Task Scheduler or NSSM, and on macOS you would use launchd.
How do I update File Browser?
Updating is simple: download the new binary and replace the old one. Your configuration and database remain intact. Stop the service, replace the executable, and start it again. Check the release notes for any breaking changes, but generally the config format is stable.
Is File Browser free?
Yes, File Browser is open source under the Apache 2.0 license. You can use it for free, including for commercial purposes, without any licensing fees. There is no paid tier or premium features.