Below are a sample upstart and systemd sample startup scripts supplied by Nathanael Anderson https://github.com/boyter/searchcode-server/issues/106. They assume that searchcode has been installed to the /opt/searchcode directory and are using version 1.3.14.
Ubuntu 14.04 - Upstart searchcode.conf file
description "Search Code Server"
author "Nathanael Anderson"
start on (local-filesystems and net-device-up IFACE!=lo)
stop on shutdown
chdir /opt/searchcode
limit nofile 999999 999999
respawn
script
exec /usr/bin/java -jar searchcode-1.3.14.jar > /var/log/searchcode.log 2>&1
end script
Systemd (Ubuntu 15+) searchcode.service file
[Unit]
Description=SearchCode Server
[Service]
WorkingDirectory=/opt/searchcode
ExecStart=/usr/bin/java -jar searchcode-1.3.14.jar
Restart=always
[Install]
WantedBy=multi-user.target