A simple webhook API to run system commands or scripts. Great for triggering deployments or other Linux operational tasks.


  • Auth header restriction
  • Pass a variable to command or script
  • Blocking and non-blocking command runs
  • Command output response or hidden response
  • Dynamic routing based on YAML configurations

Quick Start

Needs Go 1.16 or higher installed

make certs
./pal -c ./test/test.yml

Pal runs as by default. To configure a different listening address and port see Configurations.


# string: resource name, /v1/pal/deploy
    # string: target name, /v1/pal/deploy?target=app
    target: app
    # string: header key and value, curl -H'X-Pal-Auth: some_pass_or_token'
    auth_header: X-Pal-Auth some_pass_or_token
    # bool: return command output, default false
    rc_output: true
    # bool: block to only one request at a time, default false 
    block: true
    # string: put command or call script, you can use $ARG
    cmd: echo "helloworld" && echo "$ARG"

Example Request:

curl -sk -H'X-Pal-Auth: some_pass_or_token' ''

Request Structure

/v1/pal/{{ resource name }}?target={{ target name }}&arg={{ argument }}
  • resource name (Mandatory): name of a YAML key
  • target name (Mandatory): target value of a resource
  • argument (Optional): argument to be passed with variable ARG to command or script


Usage of ./pal:
  -c string
    	Configuration file location (default "./pal.yml")
  -l string
    	Set listening address and port (default "")

Example Run:

./pal -c /dir/file.yml -l

Example pal.yml

Create a monitor resource to get system stats. To see another example look at

    target: system
    auth_header: X-Monitor-System q1w2e3r4t5
    block: true
    rc_output: true
    cmd: |
      echo '|===/ DOCKER STATS \===|'
      command -v docker 1>/dev/null && sudo docker stats --no-stream; echo

      echo '|===/ FREE MEMORY \===|'
      free -g; echo

      echo '|===/ DISK SPACE \===|'
      df -hT; echo

      echo '|===/ TOP CPU \===|'
      ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cpu | head; echo

      echo '|===/ TOP MEMORY \===|'
      ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head; echo

      echo '|===/ TOP OPEN FILES \===|'
      lsof 2>/dev/null | cut -d" " -f1 | sort | uniq -c | sort -r -n | head; echo

      echo '|===/ UPTIME AND LOAD \===|'

Example Request:

curl -sk -H'X-Monitor-System: q1w2e3r4t5' ''


View Github