Skip to main content
Hooks run a shell command at two points while Station stores an upload. Use them to trigger an offsite sync, write to a log, or ping a monitoring service.
  • Pre command: after the upload passes its checksum, before Station stores it. Station waits for it to finish.
  • Post command: after storing, with THREETOONEGO_STATUS set to ok or error. Retrying an upload that already finished doesn’t rerun hooks.

Set up

1

Open Custom Scripts

In Station, click Custom Scripts.
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 Windows line endings are converted.
3

Set the commands

Enter a Pre Command and/or Post Command. Either:
  • the name of an uploaded script, such as after-upload.sh, or
  • any shell command, such as curl -fsS https://hc-ping.com/your-id.
Commands run with sh -c inside the Station container, from the hook scripts folder (/hook-scripts). Each command has a 5-minute timeout. Output and non-zero exit codes are written to Station’s logs. A failing hook doesn’t stop the upload.

Environment variables

Every hook gets these variables: The post command also gets:

Example: log each stored snapshot

after-upload.sh
Set Post Command to after-upload.sh.
The Station image is a minimal Alpine image with sh and curl. Tools like rclone aren’t included. Run those on the host or in another container that reads the same backup folder.