Running File Browser in Docker 🌱

What is File Browser?

filebrowser provides a file managing interface within a specified directory and it can be used to upload, delete, preview, rename and edit your files. It allows the creation of multiple users and each user can have its own directory. It can be used as a standalone app or as a middleware. -https://github.com/filebrowser/filebrowser

Installing Docker

  1. Log into the Linux based device
  2. Run the following commands in the terminal
    # install prerequisites
    sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y
    # add docker gpg key
    curl -fsSL https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release)/gpg | sudo apt-key add -
    # add docker software repository
    sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release) $(lsb_release -cs) stable"
    # install docker
    sudo apt install docker-ce docker-compose containerd.io -y
    # enable and start docker service
    sudo systemctl enable docker && sudo systemctl start docker
    # add the current user to the docker group
    sudo usermod -aG docker $USER
    # reauthenticate for the new group membership to take effect
    su - $USER

Running File Browser

  1. Now that Docker is installed, run the following commands to setup the File Browser Docker container and run it
    # create working directories
    mkdir ~/docker/filebrowser -p
    # set owner of working directories
    sudo chown "$USER":"$USER" ~/docker -R
    # create db placeholder file
    touch ~/docker/filebrowser/filebrowser.db
    # run the file browser docker container
    # change the first volume to the path you'd like to share
    # i'll be sharing out my home directory in this example
    docker run -d --name=filebrowser -v ~/:/srv -v ~/docker/filebrowser/filebrowser.db:/database.db -e PGID=$(id -g) -e PUID=$(id -u) -p 8092:80 --restart=unless-stopped filebrowser/filebrowser
  2. Open a web browser and navigate to http://DNSorIP:8092
  3. Login with username admin and password admin
  4. Select Settings from the left navigation menu
  5. Scroll to the bottom of the page and enter and confirm a new password for the admin user > Click the Update button
  6. Select Global Settings at the top of the page
  7. Scroll down and set the theme to Dark > Click the Update button at the bottom of the page
  8. Select Logout from the left navigation menu
  9. Login with username admin and the new password set earlier
  10. Welcome to File Browser

Documentation: https://filebrowser.org/installation#docker