Move sync info from notes to docs

This commit is contained in:
KemoNine 2020-08-01 00:30:15 +00:00
parent 96356ed545
commit 342e3db64a
5 changed files with 87 additions and 58 deletions

View File

@ -20,3 +20,6 @@ Items marked ```REQUIRED``` are assumed to be setup and working. You've been war
* [Web Dashboard / Landing Page](landing_page.md)
* [System Monitoring (REQUIRED)](monit.md)
* [Resource Monitoring](munin.md)
* [Web File Manager (Picture Sync)](filebrowser.md)
* [SyncThing (Picture Sync)](syncthing.md)
* [rclone (Picture Sync)](rclone.md)

46
docs/filebrowser.md Normal file
View File

@ -0,0 +1,46 @@
# 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
filebrowser -c /home/feh/filebrowser/pictures.json -d /home/feh/filebrowser/pictures.db \
config init
filebrowser -c /home/feh/filebrowser/pictures.json -d /home/feh/filebrowser/pictures.db \
config set --address 0.0.0.0
filebrowser -c /home/feh/filebrowser/pictures.json -d /home/feh/filebrowser/pictures.db \
config set --port 9191
filebrowser -c /home/feh/filebrowser/pictures.json -d /home/feh/filebrowser/pictures.db \
config set --branding.name "PiFrame - Pictures"
filebrowser -c /home/feh/filebrowser/pictures.json -d /home/feh/filebrowser/pictures.db \
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
ExecStart=/usr/local/bin/filebrowser -c /home/feh/filebrowser/pictures.json -d /home/feh/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
```

9
docs/rclone.md Normal file
View File

@ -0,0 +1,9 @@
# rclone
The below will setup ```rclone``` for picture sync. This is wholly optional if you prefer another method of synchronizing photos to your PiFrame.
``` sh
curl https://rclone.org/install.sh | bash
```

29
docs/syncthing.md Normal file
View File

@ -0,0 +1,29 @@
# SyncThing
The below will setup ```syncthing``` and give some basics for setup. This is wholly optional if you prefer a different approach to synchronizing your photos to the PiFrame.
``` sh
pacman -S syncthing
touch /tank/pictures/.stfolder
chown feh: /tank/pictures/.stfolder
systemctl enable --now syncthing@feh.service # use feh user so perms are right for pics
ssh -L 8385:127.0.0.1:8384 user@piframe
http://localhost:8385
Change settings
General
Minimum free disk space : 10%
Anonymous usage reporting : Disabled
GUI
Listen address : 0.0.0.0:8384
GUI Auth user : admin
GUI Auth password : apassword
Delete default folder
Add /tank/pictures folder
Connect to upstream device w/ files you want to sync
Setup picture sync as inbound only
firewall-cmd --zone=public --permanent --add-port=8384/tcp
firewall-cmd --zone=public --permanent --add-port=22000/tcp
firewall-cmd --reload
```

View File

@ -1,61 +1,3 @@
########################################
# syncthing / rclone / web based file browser
########################################
curl https://rclone.org/install.sh | bash
pacman -S syncthing
touch /tank/pictures/.stfolder
chown feh: /tank/pictures/.stfolder
systemctl enable --now syncthing@feh.service # use feh user so perms are right for pics
ssh -L 8385:127.0.0.1:8384 user@piframe
http://localhost:8385
Change settings
General
Minimum free disk space : 10%
Anonymous usage reporting : Disabled
GUI
Listen address : 0.0.0.0:8384
GUI Auth user : admin
GUI Auth password : apassword
Delete default folder
Add /tank/pictures folder
Connect to upstream device w/ files you want to sync
Setup picture sync as inbound only
firewall-cmd --zone=public --permanent --add-port=8384/tcp
firewall-cmd --zone=public --permanent --add-port=22000/tcp
firewall-cmd --reload
curl -fsSL https://filebrowser.org/get.sh | bash
mkdir /home/feh/filebrowser
filebrowser -c /home/feh/filebrowser/pictures.json -d /home/feh/filebrowser/pictures.db \
config init
filebrowser -c /home/feh/filebrowser/pictures.json -d /home/feh/filebrowser/pictures.db \
config set --address 0.0.0.0
filebrowser -c /home/feh/filebrowser/pictures.json -d /home/feh/filebrowser/pictures.db \
config set --port 9191
filebrowser -c /home/feh/filebrowser/pictures.json -d /home/feh/filebrowser/pictures.db \
config set --branding.name "PiFrame - Pictures"
filebrowser -c /home/feh/filebrowser/pictures.json -d /home/feh/filebrowser/pictures.db \
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
ExecStart=/usr/local/bin/filebrowser -c /home/feh/filebrowser/pictures.json -d /home/feh/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
########################################
# wifi setup
########################################