Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
services:cloudcommander [2025/01/21 11:55] – willy | services:cloudcommander [2025/01/21 12:58] (current) – willy | ||
---|---|---|---|
Line 41: | Line 41: | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | proxy_set_header X-Forwarded-Proto $scheme; | ||
- | # | ||
} | } | ||
Line 51: | Line 50: | ||
===== Running ===== | ===== Running ===== | ||
+ | You can run it by hand with the following example line: | ||
+ | <code bash> | ||
cloudcmd --packer zip --root / | cloudcmd --packer zip --root / | ||
+ | </ | ||
- | + | Or you can automate it... | |
- | + | ||
- | ==== Running ==== | + | |
I assume you want to run it as user **myuser**. | I assume you want to run it as user **myuser**. | ||
- | As a general startup rule, the first time you need to run it once to create the needed configuration files and database, then you want to start it with a script and have it start automatically at boot. | + | As the starting script, since i use OpenRC, i have written the following init script wihch needs to be dropped to **/ |
- | + | < | |
- | For initial configuration: | + | |
- | <code bash> | + | |
- | su - myuser | + | |
- | / | + | |
- | </ | + | |
- | + | ||
- | As the starting script, since i use OpenRC, i have written the following init script wihch needs to be dropped to **/ | + | |
- | < | + | |
# | # | ||
# Copyright 2024 Willy Garidol | # Copyright 2024 Willy Garidol | ||
Line 77: | Line 69: | ||
} | } | ||
- | FB_LOG_PATH="/ | + | CC_SLOT=" |
- | FB_SLOT=" | + | CC_USER=${USER:-${CC_SLOT}} |
- | FB_USER=${USER:-${FB_SLOT}} | + | CC_GROUP=${GROUP: |
- | FB_GROUP=${GROUP: | + | CC_PACKER=${PACKER: |
- | description=${DESCRIPTION: | + | description=${DESCRIPTION: |
pidfile="/ | pidfile="/ | ||
command_background=true | command_background=true | ||
- | command="/ | + | command="/ |
- | command_args=" | + | command_args=" |
- | command_user=" | + | command_user=" |
start_pre() { | start_pre() { | ||
- | if [ "${FB_SLOT}" | + | if [ "${CC_SLOT}" = "cloudcmd" ] |
then | then | ||
- | test -e " | ||
- | test -e " | ||
- | mkdir " | ||
- | } && chown -R ${FB_USER} " | ||
- | else | ||
ebegin " | ebegin " | ||
eend 255 | eend 255 | ||
Line 105: | Line 92: | ||
make it executable! | make it executable! | ||
- | Now, create a file **/ | + | Now, create a file **/ |
<file filebrowser.myshare> | <file filebrowser.myshare> | ||
BASE_URL="/ | BASE_URL="/ | ||
- | DATABASE="/ | ||
DESCRIPTION=" | DESCRIPTION=" | ||
FOLDER="/ | FOLDER="/ | ||
Line 114: | Line 100: | ||
PORT=3005 | PORT=3005 | ||
USER=" | USER=" | ||
+ | PACKER=" | ||
</ | </ | ||
And create the symlink, start it and add to autostart: | And create the symlink, start it and add to autostart: | ||
<code bash> | <code bash> | ||
- | ln -s / | + | ln -s / |
- | rc-update add filebrowser.myshare default | + | rc-update add cloudcmd.myshare default |
- | / | + | / |
</ | </ | ||
- | To add more shares, just create new links to the //filebrowser// init script and create the associated config file. | + | To add more shares, just create new links to the //cloudcmd// init script and create the associated config file. |
==== Updates ==== | ==== Updates ==== | ||
- | Download a new binary release (see link above), replace binary and restart service. | + | <code bash> |
+ | npm u cloudcmd | ||
+ | </ | ||