FileBrowser is your self-hosted Swiss Army knife for file management – a lightweight web interface that lets you upload, download, edit, and organize files directly from your browser. Whether you’re managing personal documents, sharing files with your team, or backing up photos, Docker Compose streamlines deployment by containerizing everything in one reproducible setup. Here’s how to get it running on Ubuntu in minutes.

Why Choose This Setup?

  • Privacy first: Your files stay on your hardware
  • Zero subscription fees: Free and open-source
  • Access anywhere: Browser-based access from any device
  • Docker benefits: Isolated, reproducible, and easy updates

Prerequisites

Gather these before starting:

  • Ubuntu 18.04 or newer
  • User account with sudo privileges
  • Terminal access (Ctrl+Alt+T)

Step 1: Install Docker Engine

Run these commands in sequence:

# Update repositories  
sudo apt update  

# Install required packages  
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common  

# Add Docker's official GPG key  
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg  

# Add Docker repository  
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null  

# Install Docker  
sudo apt update  
sudo apt install -y docker-ce docker-ce-cli containerd.io  

# Enable Docker at boot  
sudo systemctl enable docker --now  

# Verify installation  
sudo docker run hello-world  
Troubleshooting: 
If you see Permission denied, add your user to the docker group:
sudo usermod -aG docker $USER && newgrp docker

Step 2: Install Docker Compose

Get the standalone version:

# Download latest binary  
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose  

# Make it executable  
sudo chmod +x /usr/local/bin/docker-compose  

# Verify installation  
docker-compose --version  

Step 3: Configure FileBrowser

Create a project directory and navigate into it:

mkdir ~/filebrowser && cd ~/filebrowser  

Create the docker-compose.yml file:

nano docker-compose.yml

Paste this configuration (customize paths as needed):

version: '3.8'

services:
  filebrowser:
    image: filebrowser/filebrowser:latest
    container_name: filebrowser
    restart: unless-stopped
    ports:
      - "8080:80"  # Access at http://your-ip:8080
    volumes:
      - /path/to/your/files:/srv  # Replace with your file directory
      - ./filebrowser_config/database.db:/database/filebrowser.db
      - ./filebrowser_config/settings.json:/config/settings.json
    environment:
      - PUID=1000   # Match your user ID (run `id -u`)
      - PGID=1000   # Match your group ID (run `id -g`)

Key adjustments:

  • Replace /path/to/your/files with your actual file directory (e.g., $HOME/Documents)
  • For user/group IDs: Run id -u and id -g and update PUID/PGID
Critical: 
Pre-create the database file to avoid permission errors:
mkdir -p filebrowser_config && touch filebrowser_config/database.db

Step 4: Launch and Access

Start the container:

docker-compose up -d

Access the web UI:

  1. Open http://your-server-ip:8080 in your browser
  2. Log in with default credentials:
    • Username: admin
    • Password: admin

First-time configuration:

  • Immediately change credentials under Settings > User Management
  • Configure root directory in Settings > Global Settings

Step 5: Daily Use Tips

  • Upload files: Drag-and-drop into the browser interface
  • Share files: Generate share links under the “Share” menu
  • Edit files: Click text files to open the built-in editor
  • Mobile access: Works perfectly on smartphone browsers

Common Issues & Fixes

1. Permission Denied Errors

# Fix ownership of database file
sudo chown -R $USER:$USER ~/filebrowser/filebrowser_config

2. Container Fails to Start

Check logs:

docker-compose logs filebrowser

Common causes:

  • Database path typo → Verify volume paths
  • Port conflict → Change 8080:80 to 8081:80

3. Can’t Upload Files

If using Cloudflare:

  • Disable CDN caching temporarily
  • Ensure Cache-Control: no-cache headers are present

4. Forgot Password

Reset via terminal:

docker exec -it filebrowser filebrowser users update admin --password=newpassword

Why This Setup Rocks

  • Updates made easy: Run docker-compose pull && docker-compose up -d
  • Resource efficient: Uses <100MB RAM
  • Backup friendly: Entire setup is in ~/filebrowser
  • Portable: Move to another server by copying the directory

FileBrowser transforms any Ubuntu machine into a private cloud – no monthly fees, no data harvesting. Once you taste self-hosted freedom, you’ll wonder how you ever settled for proprietary alternatives.

PRO TIP:
Add automatic backups with cron:
0 3 * * * tar -czf ~/filebrowser_backup_$(date +\%F).tgz ~/filebrowser

You may also like

Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments