Sign inSign up

soldemeyer/filebrowser

By soldemeyer

•Updated 3 months ago

Image
0

10K+

soldemeyer/filebrowser repository overview

⁠soldemeyer/filebrowser

File Browser⁠ on Alpine Linux. It's a web-based file manager for browsing, uploading, editing and sharing the files in one folder. In this image its main settings are environment variables.

⁠Tags

TagWhat it is
latestThe newest build.
<File Browser version>, e.g. v2.63.23One build. A new one is made automatically when File Browser publishes a release.
  • Kept tags: only the 5 newest version tags are kept; older ones are deleted.
  • Platforms: linux/amd64, linux/arm64.

⁠What's in the image

  • Base: alpine:latest.
  • File Browser: the newest release, installed with File Browser's official get.sh script.
  • Tools the entrypoint uses: bash, curl, jq, sqlite, and shadow (for creating the user).
  • User: runs as filebrowser (UID/GID 1000).
  • Volumes:
    • /srv: the files File Browser serves.
    • /database: filebrowser.db, which holds users, shares and settings.
    • /config: settings.json.
  • Port: 80.
  • Startup: the entrypoint, /entrypoint.sh, does three things on every start:
    1. If /config/settings.json doesn't exist, it copies in the default.
    2. It writes the port, base URL, database path and root folder from the environment variables into settings.json, and sets the listen address to 0.0.0.0. Other keys in the file are left alone.
    3. It starts File Browser with those settings.

⁠Running it with Docker Compose

  1. Save the example below as docker-compose.yml.
  2. Create the three folders it mounts, and give them to UID 1000 so File Browser can write to them:
    mkdir -p files database config
    sudo chown -R 1000:1000 files database config
    
  3. Start it with docker compose up -d.
  4. Get the first login. On first start, File Browser creates the user admin with a random password and prints it in the log:
    docker compose logs filebrowser | grep -i password
    
  5. Open http://localhost:8080 and sign in. Change the password under Settings → Profile.
# Example Compose file for soldemeyer/filebrowser. Optional settings are commented
# out with their defaults.
services:
  filebrowser:
    image: soldemeyer/filebrowser:latest
    restart: unless-stopped

    # Web UI on http://localhost:8080. FILEBROWSER_BIND_IP is read by Compose, not the
    # container: set it to 0.0.0.0 in a .env file next to this file to reach File
    # Browser from your LAN. The container-side port must match FILEBROWSER_PORT.
    ports:
      - "${FILEBROWSER_BIND_IP:-127.0.0.1}:8080:80"

    environment:
      # Port File Browser listens on inside the container. Default: 80. If you change
      # it, change the ports mapping and the healthcheck URL to match.
      FILEBROWSER_PORT: "80"
      # URL prefix, for serving File Browser under a path behind a reverse proxy,
      # e.g. "/files". Default: "" (served at the root).
      FILEBROWSER_BASEURL: ""
      # Folder File Browser serves. Default: /srv. If you change it, change the files
      # mount below to match.
      # FILEBROWSER_ROOT: "/srv"
      # Database file (users, shares, settings). Default: /database/filebrowser.db.
      # FILEBROWSER_DATABASE: "/database/filebrowser.db"
      # Settings file, created from the image's default if missing.
      # Default: /config/settings.json.
      # FILEBROWSER_CONFIG: "/config/settings.json"

    volumes:
      # The files to manage. Must be writable by UID 1000 for uploads and edits.
      - ./files:/srv
      # Keep this: it holds the users and settings. Must be writable by UID 1000.
      - ./database:/database
      # settings.json. Must be writable by UID 1000, since the entrypoint updates it.
      - ./config:/config

    logging:
      driver: json-file
      options:
        max-size: 10m
        max-file: "3"

    # Only shows that the web server responds.
    healthcheck:
      test: ["CMD", "curl", "-fsS", "-o", "/dev/null", "http://127.0.0.1:80/health"]
      interval: 30s
      timeout: 5s
      start_period: 10s
      retries: 3

⁠More settings

  • Web UI: most other settings are under Settings → Global Settings. This includes users, permissions, branding, the sign-in method and command runners.
  • settings.json: in the config folder. On every start the entrypoint overwrites five keys (port, address, baseURL, database, root) from the environment variables. Other keys you add are kept. The image's default file also sets "log": "stdout".
  • Command-line configuration: File Browser's config and users commands need the server stopped, because the database is locked while it runs. Stop it and run them in a one-off container, for example:
    docker compose stop filebrowser
    docker compose run --rm --entrypoint filebrowser filebrowser users ls --database /database/filebrowser.db
    docker compose start filebrowser
    

Tag summary

Content type

Image

Digest

sha256:e5d4b1667…

Size

24.1 MB

Last updated

3 months ago

docker pull soldemeyer/filebrowser