Easy File Sharing with FileBrowser on a Dedicated Server
Introduction
This guide will walk you through installing FileBrowser—a simple, web-based file manager—on a ServerStadium VM or a dedicated server running Ubuntu 24.04. You’ll set up FileBrowser as a service, secure it with HTTPS via Nginx and Let’s Encrypt, and create user accounts with scoped access for safe, point-and-click file sharing.
Prerequisites
- A ServerStadium dedicated server or VM with Ubuntu 24.04.
- A domain (e.g.,
files.example.com
) pointing to your server’s public IP. - SSH access with a sudo-capable user and an email address for Let’s Encrypt notices.
Step 1 — Install FileBrowser (Official Script)
Use the project’s installer to fetch the latest binary:
sudo apt update && sudo apt -y install curl unzip nginx certbot python3-certbot-nginx
curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash
filebrowser version
Create a dedicated system user and directories for data and config:
sudo useradd --system --create-home --home-dir /srv/share --shell /usr/sbin/nologin filebrowser
sudo mkdir -p /srv/share /etc/filebrowser
sudo chown -R filebrowser:filebrowser /srv/share /etc/filebrowser
Step 2 — Initialize Database & Create Admin
Initialize FileBrowser’s database, then add an admin account.
# Initialize the database file
sudo -u filebrowser filebrowser -d /etc/filebrowser/filebrowser.db config init
# Create an admin user (change password!)
sudo -u filebrowser filebrowser -d /etc/filebrowser/filebrowser.db users add admin 'ChangeThisStrongPassword!' --perm.admin
Step 3 — Run FileBrowser as a Service
Run FileBrowser on localhost:8080 and reverse-proxy it with Nginx for HTTPS.
sudo tee /etc/systemd/system/filebrowser.service >/dev/null <<'EOF'
[Unit]
Description=FileBrowser
After=network.target
[Service]
User=filebrowser
Group=filebrowser
WorkingDirectory=/srv/share
ExecStart=/usr/local/bin/filebrowser \
--database /etc/filebrowser/filebrowser.db \
--address 127.0.0.1 --port 8080 \
--root /srv/share
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now filebrowser
sudo systemctl status filebrowser --no-pager
Step 4 — Nginx Reverse Proxy with HTTPS
Create a simple Nginx server block for your domain that proxies to FileBrowser on localhost.
sudo tee /etc/nginx/sites-available/filebrowser >/dev/null <<'EOF'
server {
listen 80;
server_name files.example.com;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
EOF
sudo ln -s /etc/nginx/sites-available/filebrowser /etc/nginx/sites-enabled/filebrowser
sudo nginx -t && sudo systemctl reload nginx
# Issue and install a Let's Encrypt certificate
sudo certbot --nginx -d files.example.com --redirect -m you@example.com --agree-tos -n
Step 5 — Create Regular Users with Scoped Access
Give each user their own folder (scope) so they only see what they should.
# Example: user 'alice' limited to /srv/share/users/alice
sudo mkdir -p /srv/share/users/alice
sudo chown -R filebrowser:filebrowser /srv/share/users
sudo -u filebrowser filebrowser -d /etc/filebrowser/filebrowser.db users add alice 'AnotherStrongPass!' \
--scope /srv/share/users/alice \
--perm.create --perm.delete --perm.download --perm.modify --perm.rename --perm.share
Log in at https://files.example.com
using the admin
account to create additional users or adjust permissions in Settings → User Management.
Optional: Brand, Sharing Links, and Basic Security
- Branding: Set a name/logo in Settings → Global Settings or via CLI (e.g.,
filebrowser config set --branding.name "Your Company"
). - Share links: Ensure users have the share permission, then use the “Share” action to generate links for clients and teammates.
- Firewall: Allow web traffic and keep FileBrowser bound to localhost:
sudo ufw allow 80,443/tcp && sudo ufw enable
Troubleshooting
- 502/Bad Gateway: Check the service and Nginx logs:
journalctl -u filebrowser -n 100 --no-pager
andjournalctl -u nginx -n 100 --no-pager
. - Can’t log in: Reset a user’s password:
sudo -u filebrowser filebrowser -d /etc/filebrowser/filebrowser.db users update alice --password 'NewPass!'
- Permissions/visibility: Verify the user’s scope path and ownership under
/srv/share
; keep ownership withfilebrowser:filebrowser
. - SSL not issuing: Confirm DNS is pointing to your server and ports 80/443 are open; re-run
certbot --nginx
.
Need a quick, affordable start? Spin up an instant ServerStadium dedicated server and get FileBrowser online in minutes.
Conclusion
With FileBrowser running behind HTTPS on ServerStadium, you’ve got a clean, point-and-click way to share files securely with clients and teammates. For more help or information about ServerStadium services, visit our knowledge base or the ServerStadium website.