piframe/docs/filebrowser.md

2.0 KiB

Web File Manager

The below will setup filebrowser as a file manager for your photos on the PiFrame. This is a web based application and works really well for adding and removing pictures from a PiFrame. It's a lot more accessible than some of the other options we have documented.

Important Notes

  • The setup below tunes filebrowser to be more resource efficient. Specifically we disable picture thumbnails and set the picture processing threads to 1.
  • filebrowser can use upwards of 512Mb of memory and 4 cores of the Raspberry Pi (that's all of them) when generating image thumbnails and rendering images. This is why we have made adjustments below. Please keep this in mind if you make adjustments.
  • filebrowser always re-generates thumbnails when the pictures folder is loaded. This is not ideal and another reason we have made adjustments below. Please keep this in mind if you make ajustments.

Setup


curl -fsSL https://filebrowser.org/get.sh | bash
mkdir /home/fim/filebrowser
filebrowser -d /home/fim/filebrowser/pictures.db \
    config init
filebrowser -d /home/fim/filebrowser/pictures.db \
    config set --address 0.0.0.0
filebrowser -d /home/fim/filebrowser/pictures.db \
    config set --port 9191
filebrowser -d /home/fim/filebrowser/pictures.db \
    config set --branding.name "PiFrame - Pictures"
filebrowser -d /home/fim/filebrowser/pictures.db \
    users add admin apassword
chown fim: -R /home/fim/filebrowser
firewall-cmd --zone=public --permanent --add-port=9191/tcp
firewall-cmd --reload
cat > /etc/systemd/system/filebrowser-pictures.service <<EOF
[Unit]
Description=Filebrowser - Pictures
After=network.target

[Service]
User=fim
PrivateTmp=true
ExecStart=/usr/local/bin/filebrowser -d /home/fim/filebrowser/pictures.db -r /tank/pictures --img-processors 1 --disable-thumbnails

[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now filebrowser-pictures