Help running this Docker image? ( FileBrowser ) reddit / selfhosted ---------------------------------------------------------------------- Machados · 2023-10-11 04:25 I'm not sure how to run Filebrowser's docker image ([https://filebrows er.org/installation](https://filebrowser.org/installation)), I only tested it by running it on the "sudo filebrowser" command, but that doesn't persist data or even the process like running a docker image with a db inside does. I want to install it using docker mainly so it keeps running in background forever and ofc persist data, but I have no fuckin idea how to use their docker image because ([the installation doc](https://filebrowser.org/installation)) doesn't seem to explain those path arguments at all? I'm not that experienced with docker, can you recommend what should I replace those placeholder paths with? From docs linked above: `docker run \-v /path/to/root:/srv \-v /path/filebrowser.db:/database.db \-v /path/.filebrowser.json:/.filebrowser.json \-u $(id -u):$(id -g) \-p 8080:80 \filebrowser/filebrowser` `By default, we already have a configuration file with some defaults so you can just mount the root and the database. Although you can overwrite by mounting a directory with a new config file. If you don't already have a database file, make sure to create a new empty file under the path you specified. Otherwise, Docker will create an empty folder instead of an empty file, resulting in an error when mounting the database into the container.` ALSO Any other good file manager recommendations welcome! ---------------------------------------------------------------------- Machados · 2023-10-11 04:31 well isn't this just incredible? chatgpt is helping me, I'll check how well I can do with these tips. Certainly! Let's break down the Docker run command and explain what each part does and what you should replace the placeholder paths with: bash docker run \\ \-v /path/to/root:/srv \\ \-v /path/filebrowser.db:/database.db \\ \-v /path/.filebrowser.json:/.filebrowser.json \\ \-u $(id -u):$(id -g) \\ \-p 8080:80 \\ filebrowser/filebrowser \-v /path/to/root:/srv: Replace /path/to/root with the path to the directory you want to serve through Filebrowser. This is where you'll store and manage your files. \-v /path/filebrowser.db:/database.db: Replace /path/filebrowser.db with the path where you want to persist the database file. This is where Filebrowser stores its database. \-v /path/.filebrowser.json:/.filebrowser.json: Replace /path/.filebrowser.json with the path to your custom configuration file, if you have one. If you don't have a custom configuration, you can omit this part. \-u $(id -u):$(id -g): This sets the user and group under which the Filebrowser process will run. It uses the id -u and id -g commands to get your user and group IDs. You can leave this as is. \-p 8080:80: This maps port 80 in the container to port 8080 on your host machine. You can change 8080 to any available port on your host if you prefer a different port. filebrowser/filebrowser: This is the Docker image you're running, which is the official Filebrowser Docker image. Here's an example of how you might replace the placeholders with real paths: bash docker run \\ \-v /home/user/files:/srv \\ \-v /home/user/filebrowser.db:/database.db \\ \-u $(id -u):$(id -g) \\ \-p 8080:80 \\ filebrowser/filebrowser In this example: /home/user/files is the directory you want to serve through Filebrowser. /home/user/filebrowser.db is the path where you want to persist the database file. Make sure to replace /home/user/files and /home/user/filebrowser.db with your actual desired paths. ---------------------------------------------------------------------- thekrautboy · 2023-10-11 06:30 Do yourself a favor and use Docker Compose instead of Docker run commands. ---------------------------------------------------------------------- TBT_TBT · 2023-10-11 08:25 This! Convert the docker run to docker-compose with https://www.composerize.com ---------------------------------------------------------------------- thekrautboy · 2023-10-11 08:51 Better yet, actually learn it. ---------------------------------------------------------------------- thekrautboy · 2023-10-11 09:02 > I wanted to pull an older version of this image (latest has big glitches), but no idea how to do that yet though. I think it's not possible I guess Sure thats possible. But first you need to check if other versions of the image exist, and if they do, how they are tagged. So since the creators of Filebrowser use Dockers own registry, the Docker Hub, you go there and look at the available images. https://hub.docker.com/r/filebrowser/filebrowser/tags In that list you can see how old the *latest* tag is for example and you can scroll down to see older uploads. If you look at the digest of *latest* and then look for a tagged version that has the same, then you know what number *latest* actually equals to. In this case thats `v2.25.0` as the tag. So thats what youre already using. Scrolling further down you can find the older version `v2.24.0` as a available tag. In order to use that, instead of just `filebrowser/filebrowser` as image in your Docker run command, or in a compose file, you use `filebrowser/filebrowser:v2.24.0` in this case. Then Docker will recognize that you have not pulled this tag of this image yet and it will do so and use it. Be aware that this is not standardized and not all creators of images tag their images the same way, or even at all, some may only produce a `latest` tag and keep updating that all the time. But now you know how to find available tags for a image and how to use a tag. ---------------------------------------------------------------------- lilolalu · 2023-10-11 14:01 I think for "beginner" docker users it really makes sense to use portainer for these type of tasks. ---------------------------------------------------------------------- pimenteldev · 2023-10-11 18:38 I disagree. Portainer is an wonderful tool, making it clear first. Although, IMO, it's best to learn the "raw" way because Portainer won't be always available. The beginner path on running a docker container, with compose, as an example is: - create a folder and cd to it - create a `docker-compose.yml` file - reference volumes to a folder (avoiding docker volumes for the first part) - run `docker compose up` and that's all. after managing to run the first container, the user might also setup a docker logs watcher, such as Dozzle, so they can keep track what's happening in the containers. after the initial sets of skills are developed, then moving to Portainer for usability or UI friendliness make sense. I'm not an advanced user, still, I developed my skills like that and just use Portainer for starting/restarting/deleting containers while I maintain all of them through docker-compose files only. ---------------------------------------------------------------------- Spuxilet · 2023-10-11 19:15 I am not beginner but i still use portainer. Just to orginize running stacks and removing old images after manual updates. Also to use portainers API to stop all stacks to backup using rsync at midnight. ---------------------------------------------------------------------- Machados · 2023-10-11 22:01 very useful, thanks for the help! ---------------------------------------------------------------------- sk1nT7 · 2023-10-11 23:20 Use this compose example: https://github.com/Haxxnet/Compose- Examples/blob/main/examples/filebrowser/docker-compose.yml ---------------------------------------------------------------------- thekrautboy · 2023-10-11 23:38 Youre welcome. ---------------------------------------------------------------------- acid_etched · 2023-10-12 03:37 When I was setting it up on unraid it was kind of a pain in the neck, once I get my server back up (this weekend?) I can look at it and help if you haven’t figured it out by then ---------------------------------------------------------------------- Machados · 2023-10-13 02:03 epic, thanks!! ---------------------------------------------------------------------- ratudio · 2023-11-03 01:25 Anyone using this on truenas scale?