Overview

The Cantaloupe Image Server can be run with the following command.

java-Dcantaloupe.config=cantaloupe.properties-Xmx2g-jarcantaloupe-5.0.5.jar

However, with this method, the Cantaloupe server stops when the SSH connection is lost, for example.

Here I introduce how to run it as a service.

Method

  1. Create a service file: Create a service file (e.g., cantaloupe.service) in the /etc/systemd/system/ directory with sudo privileges.
[D[U#WES[WUeSsoxuIanseePrecnnicrrlkccsttrv=eiSete]iiuantsadpcbsgaslBteueDrElyi]nitx]=otmr=imnuoe/tu=dcuSlCitsttaforainyr/t-tybuuat=isslh/n=eoeh1ruj4.pfma3teoeal/arIlugmob-eawuDtgincentagunS/tepcaraalvtnoehtursapleao.sucpoaenp-fp5ir.go0=p.cr5ainattaeloupe.properties-Xmx2g-jarcantaloupe-5.0.5.jar

In this file, the Java command to execute is specified in ExecStart. Also, User and WorkingDirectory need to be set appropriately.

  1. Reload the service: To apply the changes, reload systemd with the following command.
sudosystemctldaemon-reload
  1. Start the service: Start the service with the following command.
sudosystemctlstartcantaloupe
  1. Enable the service: To make the service start automatically at system boot, run the following command.
sudosystemctlenablecantaloupe
  1. Check the service status: To check the status of the service, use the following command.
sudosystemctlstatuscantaloupe

Note: In this example, the Java path and Cantaloupe installation path need to be modified as appropriate. Also, replace User with the user that will run Cantaloupe. For detailed service file configuration, please refer to the systemd documentation.

Summary

You can confirm that it is running as a service as shown below. I hope this serves as a useful reference.

sudcoaMnastLAiMCyaocnTeGslatamrtodiPsoCoeuevIkrPumpdeDsyUpce:::::::t.lsla3314eoc311.ssrat264y3tvdi0(.0s3aiev4l28t2tcdeiMse0ue(mm4s(ji.-/rats/ceuv:luaCtnaisnacn)4crtn/i6eatsn6blayg7ciols))anuotn/puestjepmiaaednlv/coaIseumyp-asTeDgth.ceeusamenS/2rtec0vara2ilvn3coet-eura1pl1eo-.u1cp6oen.0fs3ie:gr5=v2ci:ac2ne4t;aUleTonCua;pbel6.empdir;nopvaeegrnotdioersp-rXemsxe2tg:-ejnaarblceadn)taloupe-5.0.5.jar