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
- Log into the Linux based device
- 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
- 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 - Open a web browser and navigate to http://DNSorIP:8092
- Login with username admin and password admin
- Select Settings from the left navigation menu
- Scroll to the bottom of the page and enter and confirm a new password for the admin user > Click the Update button
- Select Global Settings at the top of the page
- Scroll down and set the theme to Dark > Click the Update button at the bottom of the page
- Select Logout from the left navigation menu
- Login with username admin and the new password set earlier
- Welcome to File Browser
Documentation: https://filebrowser.org/installation#docker