Set up
1
Open Integrations
In Scout or Station, click Integrations, then Custom scripts (PRE / POST).
2
Upload a script (optional)
Under Uploaded Items, upload up to 3 files. Only
.sh scripts and .txt helper files are allowed, and they must be UTF-8 text. .sh files are made executable and their Windows line endings are converted.3
Set the commands
Enter the PRE command, the POST command, or a different command for each. A command can be an uploaded script filename, such as
prepare.sh, or a shell command. Leave a command empty to skip that phase. Click Save script commands.When scripts run
Scripts finish before processing continues. HTTP notifications run in the background, so a PRE HTTP event does not make processing wait for the receiver.
Commands run with
sh -c inside the app container, from the hook scripts folder (/hook-scripts). Each command has a 5-minute timeout. A failing command is logged and does not stop the backup or upload. Command text, standard output, and standard error are omitted from app logs.
Use variables
Shell commands use environment variables, for example:{{ job_name }} syntax belongs to HTTP message and JSON templates; shell scripts do not expand it. Each app provides different job or upload context. Use its full variable table and examples:
Scout jobs can run concurrently, so scripts for different jobs can overlap. Cancel operation stops Scout’s active commands. See Scout script timing and Station script timing for details.
Secrets and permissions
Commands and uploaded scripts can be viewed through authenticated APIs. Scripts inherit the app environment and run without a sandbox. Run trusted scripts, and mount any needed secrets in separate read-only files outside/hook-scripts and selected backup jobs. See Secrets used by custom scripts.