Install File Browser Inside Docker Container on Linux

Install File Browser Inside Docker Container on Linux

File Browser is a web-based application that provides an interface for managing files within a specified directory on a server or a local system.

This tutorial explains how to install File Browser inside a Docker container on Linux. Commands have been tested on Ubuntu.

Prepare environment

Make sure you have installed Docker in your system. If you are using Ubuntu, installation instructions can be found in the post.

Install File Browser

Before starting, create directory for data:

sudo mkdir /opt/filebrowser

Create a new empty database file:

sudo touch /opt/filebrowser/database.db
  • Host network

Run the following command to create a container for File Browser that uses host network:

docker run -d --name=filebrowser --restart=always --network=host \
    -v /:/srv \
    -v /opt/filebrowser/database.db:/database.db \
    filebrowser/filebrowser
  • User-defined bridge network

User-defined bridge network can be used for listening on different port. By default, File Browser service is listening on port 80. It can be changed with -p option.

docker network create app-net
docker run -d --name=filebrowser --restart=always --network=app-net \
    -p 8080:80 \
    -v /:/srv \
    -v /opt/filebrowser/database.db:/database.db \
    filebrowser/filebrowser

Testing File Browser

Open a web browser and go to http://<IP_ADDRESS>, where <IP_ADDRESS> is the IP address of the system. Log in to the web UI with the default username (admin) and password (admin).

File Browser Inside Docker Container on Linux

Uninstall File Browser

To completely remove File Browser, remove its container:

docker rm --force filebrowser

Remove File Browser image:

docker rmi filebrowser/filebrowser

You can also remove File Browser data:

sudo rm -rf /opt/filebrowser

If a user-defined bridge network was created, you can delete it as follows:

docker network rm app-net

Leave a Comment

Cancel reply

Your email address will not be published.