Linux detection
Detects Debian, Ubuntu, Fedora, RHEL-like, Arch, openSUSE, Alpine, and their package managers.
This guide explains what the script does, what it installs, how it detects your server, how the Docker image is built, and how users can run it with Docker Compose.
The script automates the boring parts: OS detection, CPU architecture detection, package checking, container engine setup, File Browser download, Dockerfile generation, and image build.
Detects Debian, Ubuntu, Fedora, RHEL-like, Arch, openSUSE, Alpine, and their package managers.
Supports AMD64, ARM64, ARMv7, ARMv6, 386, s390x, and ppc64le.
Checks required packages first and installs only what is missing.
Uses Docker when available and tries to install/start it when missing.
Can fall back to Podman if Docker is not usable.
Builds my-filebrowser, then Compose runs that image.
Users only need to save the script, run it, then start Docker Compose.
Use a clean project folder for the script, compose file, files, and database.
The script scans the system, installs missing tools, and builds the image.
Docker Compose starts File Browser with persistent folders and safer defaults.
mkdir -p ~/filebrowser-autoforge
cd ~/filebrowser-autoforgeSave this as setup-filebrowser.sh. This is the actual script users should run before using Docker Compose.
chmod +x setup-filebrowser.sh
./setup-filebrowser.shSave this as docker-compose.yml after the image is built. It includes persistent storage, restart policy, healthcheck, log rotation, and security hardening.
services:
filebrowser:
image: ${FILEBROWSER_IMAGE:-my-filebrowser}
container_name: ${FILEBROWSER_CONTAINER:-filebrowser}
restart: unless-stopped
init: true
ports:
- "${FILEBROWSER_PORT:-8080}:80"
volumes:
- type: bind
source: ./files
target: /srv
- type: bind
source: ./database
target: /database
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
cap_add:
- NET_BIND_SERVICE
pids_limit: 256
stop_grace_period: 20s
healthcheck:
test: ["CMD-SHELL", "wget -q --spider http://127.0.0.1:80/ || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 20s
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
networks:
- filebrowser_net
networks:
filebrowser_net:
name: filebrowser_net
driver: bridge
mkdir -p files database
docker compose up -d
docker compose ps
docker compose logs -f filebrowserOpen File Browser from your browser after Compose starts.
Open http://SERVER-IP:8080.
Default login is usually admin / admin. Change it immediately.
sudo ufw allow 8080/tcp
sudo ufw reload
sudo ufw statusCommon problems and quick fixes.
Run ./setup-filebrowser.sh first. It builds the local image named my-filebrowser.
Check docker compose ps, logs, Linux firewall, and VPS security rules.
Create folders first with mkdir -p files database. For testing only, use chmod -R 777 files database.
Create a .env file with FILEBROWSER_PORT=8090, then restart Compose.