Technology Encyclopedia Home >How to Set Up a Personal File Server with Filebrowser — A Web-Based File Manager for Your VPS

How to Set Up a Personal File Server with Filebrowser — A Web-Based File Manager for Your VPS

Sometimes I need to get a file from my server without opening a terminal. Or I want to share a file with someone who doesn't have SSH access. Or I'm on a machine where I can't install anything and need to upload a document.

Filebrowser handles all of these situations with a clean browser interface: upload, download, rename, move, preview images, edit text files, and generate temporary share links. It runs as a lightweight single binary and integrates cleanly with an existing Nginx setup.

Setup is genuinely simple — probably the fastest service in this entire series to get running.

This guide deploys Filebrowser on Ubuntu 22.04 using Docker, with Nginx and HTTPS.

I run Filebrowser on Tencent Cloud Lighthouse for quick file management without needing to SSH in. It uses minimal resources — the entry-level plan handles it fine alongside other applications. Lighthouse's OrcaTerm and Filebrowser actually complement each other well: OrcaTerm gives you terminal access to the server from a browser, and Filebrowser gives you a visual file manager in a browser — between the two, you rarely need a local SSH client or SCP for routine server file operations.


Table of Contents

  1. What Filebrowser Does
  2. Prerequisites
  3. Part 1 — Server Setup
  4. Part 2 — Deploy Filebrowser with Docker
  5. Part 3 — Configure Nginx Reverse Proxy
  6. Part 4 — Enable HTTPS
  7. Part 5 — First Login and Configuration
  8. Part 6 — User Management
  9. Part 7 — Sharing Files
  10. Part 8 — Integration with Other Services
  11. The Gotcha: Scope Restricts Access to That Directory Only
  12. Security Recommendations

  • Key Takeaways
  • Use the appropriate Lighthouse application image to skip manual installation steps where available
  • Lighthouse snapshots provide one-click full-server backup before major changes
  • OrcaTerm browser terminal lets you manage the server from any device
  • CBS cloud disk expansion handles growing storage needs without server migration
  • Console-level firewall + UFW = two independent protection layers

What Filebrowser Does {#what}

Feature What you can do
File browsing Navigate directories via web browser
Upload/download Drag-and-drop upload, click to download
File editing Edit text files, config files, markdown
Image preview View images without downloading
Video preview Play videos in-browser
File sharing Generate shareable links (with optional expiry)
Multi-user Create users with different home directories
Search Search files by name
Rename/move/delete Full file management operations
Archive creation Create zip archives for download

Prerequisites {#prerequisites}

Requirement Notes
Cloud server Tencent Cloud Lighthouse Ubuntu 22.04
Docker Installed
Nginx For reverse proxy
Domain name For HTTPS

Part 1 — Server Setup {#part-1}

ssh ubuntu@YOUR_SERVER_IP
sudo apt update && sudo apt upgrade -y

curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USER
newgrp docker

sudo apt install -y nginx
sudo ufw allow ssh
sudo ufw allow 'Nginx Full'
sudo ufw enable

Part 2 — Deploy Filebrowser with Docker {#part-2}

mkdir -p ~/apps/filebrowser && cd ~/apps/filebrowser

# Create config file
touch filebrowser.db
mkdir -p config

Create docker-compose.yml:

version: '3.8'

services:
  filebrowser:
    image: filebrowser/filebrowser:latest
    container_name: filebrowser
    restart: unless-stopped
    ports:
      - "8085:80"
    volumes:
      # The directory you want to browse
      - /home/ubuntu:/srv
      # Filebrowser config and database
      - ./filebrowser.db:/database/filebrowser.db
      - ./config/settings.json:/.filebrowser.json
    user: "1000:1000"    # Match your ubuntu user UID/GID
    environment:
      - TZ=America/New_York

Create the settings file:

cat > config/settings.json << 'EOF'
{
  "port": 80,
  "baseURL": "",
  "address": "",
  "log": "stdout",
  "database": "/database/filebrowser.db",
  "root": "/srv"
}
EOF
docker compose up -d
docker compose logs -f
# Wait for: Listening on [::]:80

Part 3 — Configure Nginx Reverse Proxy {#part-3}

sudo nano /etc/nginx/sites-available/filebrowser
server {
    listen 80;
    server_name files.yourdomain.com;

    # Allow large file uploads
    client_max_body_size 1024m;

    location / {
        proxy_pass http://127.0.0.1:8085;
        proxy_http_version 1.1;

        proxy_set_header Upgrade    $http_upgrade;
        proxy_set_header Connection 'upgrade';

        proxy_set_header Host              $host;
        proxy_set_header X-Real-IP         $remote_addr;
        proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        proxy_buffering off;
        proxy_read_timeout 300s;
    }
}
sudo ln -s /etc/nginx/sites-available/filebrowser /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx

Part 4 — Enable HTTPS {#part-4}

sudo apt install -y certbot python3-certbot-nginx
sudo certbot --nginx -d files.yourdomain.com

Part 5 — First Login and Configuration {#part-5}

Visit https://files.yourdomain.com.

Default credentials:

  • Username: admin
  • Password: admin

Change the admin password immediately — Settings → User Management → admin → Change Password.

Interface overview

  • Left sidebar: directory tree navigation
  • Main area: file list with icons
  • Top toolbar: upload, new folder, new file, sort options
  • Right-click menu: rename, move, copy, delete, share, archive

Part 6 — User Management {#part-6}

Create additional users

Settings → User Management → New User

Username: alice
Password: strong_password
Scope: /home/alice       (restrict to their home directory)
Permissions: ✓ Create ✓ Rename ✓ Modify ✓ Delete ✓ Share ✓ Download

Each user can have their own root directory — they only see files within their scope.

Limit a user to a specific directory

Set the user's Scope to restrict access:

  • /srv/uploads — user can only see the uploads directory
  • /srv/shared — shared folder for all users

Admin vs regular user

Admins can see all files within the container's /srv scope (which maps to /home/ubuntu on the host). Regular users are limited to their configured scope.


Part 7 — Sharing Files {#part-7}

Filebrowser can generate shareable links for individual files or folders:

  1. Right-click any file or folder → Share
  2. Configure:
    • Password protection (optional)
    • Expiry time (optional — set to 24h for temporary shares)
  3. Copy the generated link

Recipients can download the file/folder without needing a Filebrowser account.


Part 8 — Integration with Other Services {#part-8}

As a download server

Point the Filebrowser scope to a download directory:

volumes:
  - /var/www/downloads:/srv

Upload files via Filebrowser → share links with users.

With n8n workflows

Use Filebrowser's API to automate file operations from n8n:

# Filebrowser API example: upload a file
curl -s -X POST \
  "https://files.yourdomain.com/api/resources/report.pdf" \
  -H "X-Auth: TOKEN" \
  -T /path/to/report.pdf

As a log viewer

Mount your application log directories:

volumes:
  - /var/log:/srv/logs:ro   # read-only

Now you can browse and view log files without SSH.


The Gotcha: Scope Restricts Access to That Directory Only {#gotcha}

Filebrowser's scope setting controls what the admin and regular users can access. The scope is mapped inside the Docker container.

In our setup:

  • Host: /home/ubuntu → Container: /srv
  • If scope is set to /srv, admin sees all of /home/ubuntu on the host
  • If scope is set to /srv/files, admin only sees /home/ubuntu/files

Common confusion: someone sets the scope to /home/ubuntu in the settings file, but the container maps the host to /srv. The result: Filebrowser shows an empty directory.

Rule: the scope must match the container's path (starting with /srv), not the host path.

Check your current mapping:

volumes:
  - /home/ubuntu:/srv    # Host:/home/ubuntu maps to Container:/srv

So scope /srv = host /home/ubuntu, scope /srv/projects = host /home/ubuntu/projects.


Security Recommendations {#security}

  1. Change the admin password immediately after first login
  2. Enable HTTPS — don't expose HTTP file manager to the internet
  3. Restrict access by IP if this is a personal tool:
    location / {
        allow YOUR_IP;
        deny all;
        proxy_pass http://127.0.0.1:8085;
    }
    
  4. Set scope carefully — users shouldn't have access to sensitive server directories
  5. Use HTTP Basic Auth as a second layer (optional):
    sudo htpasswd -c /etc/nginx/.htpasswd admin
    # Add to Nginx location block:
    auth_basic "Files";
    auth_basic_user_file /etc/nginx/.htpasswd;
    

Troubleshooting {#troubleshooting}

Issue Likely Cause Fix
Connection refused Service not running or wrong port Check systemctl status SERVICE and verify firewall rules
Permission denied Wrong file ownership or permissions Check file ownership with ls -la and use chown/chmod to fix
502 Bad Gateway Backend service not running Restart the backend service; check logs with journalctl -u SERVICE
SSL certificate error Certificate expired or domain mismatch Run sudo certbot renew and verify domain DNS points to server IP
Service not starting Config error or missing dependency Check logs with journalctl -u SERVICE -n 50 for specific error
Out of disk space Logs or data accumulation Run df -h to identify usage; clean logs or attach CBS storage
High memory usage Too many processes or memory leak Check with htop; consider upgrading instance plan if consistently high
Firewall blocking traffic Port not open in UFW or Lighthouse console Open port in Lighthouse console firewall AND sudo ufw allow PORT

Frequently Asked Questions {#faq}

How much disk space do I need for Filebrowser?
Start with the base system disk (40–80 GB). For media-heavy uses, attach a CBS cloud disk — Lighthouse supports expansion up to 32 TB. Add storage as your collection grows without re-provisioning the server.

How do I migrate Filebrowser data to a larger disk?
On Lighthouse, you can attach an additional CBS disk and move data to it. For the OS disk itself, take a snapshot and restore to a larger instance. The guide covers storage expansion options.

Is data on a cloud VPS truly private?
Data on your Lighthouse instance is stored in Tencent Cloud's infrastructure. For maximum privacy, enable encryption at the application layer. Lighthouse provides data center compliance but you're ultimately trusting the cloud provider's infrastructure security.

How do I handle backups for large media collections?
For Filebrowser specifically: use Lighthouse snapshots for full system recovery plus application-level exports for granular recovery. For very large collections, consider versioned backups and retention policies.

What happens to my data if I stop paying for the server?
Cloud servers are terminated after a grace period if payment lapses. Always maintain your billing and export critical data regularly to an independent location (external storage, another cloud provider).

Set up your file server today:
👉 Tencent Cloud Lighthouse — Personal cloud server
👉 View current pricing and promotions
👉 Explore all active deals and offers