Welcome, Guest Login

Rundeck Enterprise Support Center

Enable CGI script on Jetty

Last Updated: Oct 26, 2017 09:59AM PDT

This tutorial explains how to deploy CGI scripts to the Rundeck instance. For example, this can be used to add a custom health check for a load balancer or define custom remote input options based on API calls.


These settings are valid for the rpm/deb or launcher install (for jetty container).


Edit the web.xml


In the launcher, the file web.xml is located on $RDECK_BASE/server/exp/webapp/WEB-INF. For deb/rpm installers, the web.xml is located in /var/lib/rundeck/server/exp/webapp/WEB-INF.

  • Add the following attributes before the last “security-constraint” label (the one that contains the auth-constraint attribute). This will avoid the redirect to the login page if you are not logged in rundeck.







  • After the last servlet attribute, add the following settings. A folder called WEB-INF/cgi-bin must be created (the name of the folder can be defined by the user)























  • Add the following settings after the last “servlet-mapping” attribute. The “cgi-bin” name must match with the settings defined on the servlet.






Run the Script


With this settings, any script added to $RDECK_BASE/server/exp/webapp/WEB-INF/cgi-bin, can be called as an endpoint, for example:

  1. For the URL: http://localhost:4440/cgi-bin/somescript  
  2. Will call the script  $RDECK_BASE/server/exp/webapp/WEB-INF/cgi-bin/somescript
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found