Docker With File Browser#
What Is The File Browser?#
filebrowserprovides 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.- More information
Create File Browser With Docker#
- Let's create a file name
docker-compose.yml, then add scripts as below:
| docker-compose.yaml | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | |
- Then run two commands below to create 2 empty files.
1 2 | |
- In the
environment, we have:PUID=$(id -u): Retrieves the user ID (UID) of the current user on the host system to ensure the container has the correct permissions.PGID=$(id -g): Retrieves the group ID (GID) of the current user on the host system to ensure the container has the correct group permissions.
- In the
volumes, we have:/home/duc/share/:/srv: Mounts the host directory/home/duc/share/to/srvin the container, allowing file access through the File Browser UI../filebrowser.db:/database.db: Mounts the localfilebrowser.dbfile to/database.dbin the container to persist the database between restarts../settings.json:/config/settings.json: Mounts the localsettings.jsonconfiguration file to/config/settings.jsonin the container to customize File Browser settings.
- In the
security_opt, we have:no-new-privileges:true: Prevents the container from gaining additional privileges, even if it tries to do so, enhancing security by restricting privilege escalation.
Testing#
- Now you can use command
docker-compose up -dto start yourFile Browserserver. - Then we can access browser at
localhost:7979and login to access the dashboard.
- By default the username is
adminand password isadmin. - Next, we can test by upload a file and then you should see it in the shared folder.
- If your machine has many drive, you can mount that drive to machine and use
file browserto link with it. Then if you are using VPN liketailscalethen you can access thefile browserweb page on any device and you can download and upload files from that drive.


