piframe/docs/filebrowser.md

47 lines
2 KiB
Markdown
Raw Normal View History

2020-08-01 00:30:15 +00:00
# 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
``` sh
curl -fsSL https://filebrowser.org/get.sh | bash
mkdir /home/feh/filebrowser
2020-08-01 23:00:55 +00:00
filebrowser -c /home/feh/filebrowser/pictures.config \
2020-08-01 00:30:15 +00:00
config init
2020-08-01 23:00:55 +00:00
filebrowser -c /home/feh/filebrowser/pictures.config \
2020-08-01 00:30:15 +00:00
config set --address 0.0.0.0
2020-08-01 23:00:55 +00:00
filebrowser -c /home/feh/filebrowser/pictures.config \
2020-08-01 00:30:15 +00:00
config set --port 9191
2020-08-01 23:00:55 +00:00
filebrowser -c /home/feh/filebrowser/pictures.config \
2020-08-01 00:30:15 +00:00
config set --branding.name "PiFrame - Pictures"
2020-08-01 23:00:55 +00:00
filebrowser -c /home/feh/filebrowser/pictures.config \
2020-08-01 00:30:15 +00:00
users add admin apassword
chown feh: -R /home/feh/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=feh
PrivateTmp=true
2020-08-01 23:00:55 +00:00
ExecStart=/usr/local/bin/filebrowser -c /home/feh/filebrowser/pictures.config -d /home/feh/filebrowser/pictures.db -r /tank/pictures --img-processors 1 --disable-thumbnails
2020-08-01 00:30:15 +00:00
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now filebrowser-pictures
```