Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
services:filebrowser [2024/03/22 08:50] – willy | services:filebrowser [2025/01/21 11:50] (current) – [Running] willy | ||
---|---|---|---|
Line 20: | Line 20: | ||
That's it! | That's it! | ||
+ | |||
+ | In addition you might want to create the following **.bashrc**: | ||
+ | <file - .bashrc> | ||
+ | #!/bin/bash | ||
+ | |||
+ | export UMASK=0002 | ||
+ | export PATH=$PATH: | ||
+ | </ | ||
+ | |||
+ | ==== Authentication ==== | ||
+ | |||
+ | <code bash> | ||
+ | filebrowser config set --auth.method=noauth | ||
+ | filebrowser config set --auth.method=proxy --auth.header=X-My-Header | ||
+ | </ | ||
+ | |||
+ | TBD | ||
==== Reverse Proxy ==== | ==== Reverse Proxy ==== | ||
Line 57: | Line 74: | ||
</ | </ | ||
- | The start script | + | As the starting |
- | < | + | <file filebrowser> |
- | #!/bin/bash | + | #!/sbin/openrc-run |
- | FILEBROWSER="/data/daemons/ | + | # Copyright 2024 Willy Garidol |
- | APP_PATH="/ | + | # Distributed under the terms of the GNU General Public License v3 |
- | DATA_PATH="/data/MyFiles" | + | |
- | BASE_URL="/files/myuser" | + | depend() { |
- | PORT=3005 | + | need localmount net |
- | "${FILEBROWSER}" | + | } |
- | "${FILEBROWSER}" | + | |
+ | FB_LOG_PATH="/var/log/ | ||
+ | FB_SLOT="${SVCNAME# | ||
+ | FB_USER=${USER: | ||
+ | FB_GROUP=${GROUP: | ||
+ | |||
+ | description=${DESCRIPTION: | ||
+ | pidfile="/run/${RC_SVCNAME}.pid" | ||
+ | command_background=true | ||
+ | command="/data/daemons/ | ||
+ | command_args="-r \"${FOLDER}\" -p ${PORT} | ||
+ | command_user="${FB_USER}: | ||
+ | |||
+ | start_pre() { | ||
+ | if [ "${FB_SLOT}" | ||
+ | then | ||
+ | test -e "${FB_LOG_PATH}" || mkdir "${FB_LOG_PATH}" | ||
+ | test -e "${FB_LOG_PATH}/${FB_SLOT}" | ||
+ | mkdir "${FB_LOG_PATH}/${FB_SLOT}" | ||
+ | } && chown -R ${FB_USER} | ||
+ | else | ||
+ | ebegin " | ||
+ | eend 255 | ||
+ | fi | ||
+ | } | ||
</ | </ | ||
- | And the startup script should be **/ | + | make it executable! |
- | <file - 40-filebrowser.start> | + | |
- | #!/bin/bash | + | |
- | start-stop-daemon -b -m -p / | + | |
+ | Now, create a file **/ | ||
+ | <file filebrowser.myshare> | ||
+ | BASE_URL="/ | ||
+ | DATABASE="/ | ||
+ | DESCRIPTION=" | ||
+ | FOLDER="/ | ||
+ | GROUP=" | ||
+ | PORT=3005 | ||
+ | USER=" | ||
</ | </ | ||
- | make both executable of course. | + | |
+ | And create the symlink, start it and add to autostart: | ||
+ | <code bash> | ||
+ | ln -s / | ||
+ | rc-update add filebrowser.myshare default | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | To add more shares, just create new links to the // | ||
+ | |||
+ | |||
+ | ==== Updates ==== | ||
+ | |||
+ | Download a new binary release (see link above), replace binary and restart service. | ||