Appearance
Running as a Service
This guide explains how to run FreeTicketing as a service on Windows, Linux, and macOS.
Windows
FreeTicketing supports automated service setup on Windows, powered by NSSM.
WARNING
Make sure to open the FreeTicketing folder with Command Prompt or PowerShell as Administrator.
To install FreeTicketing as a Windows service:
- Open Command Prompt or PowerShell as Administrator.
- Navigate to the FreeTicketing folder.
- Run the following command to install the service:
powershell
FreeTicketing.exe --install
- To start the service:
powershell
FreeTicketing.exe --start
To learn more about the command line options, see reference.
Linux
To run FreeTicketing as a service on Linux, you can use systemd:
- Create a service file:
bash
sudo nano /etc/systemd/system/freeticketing.service
- Add the following content (adjust paths as needed):
ini
[Unit]
Description=FreeTicketing Service
After=network.target
[Service]
ExecStart=/path/to/freeticketing
WorkingDirectory=/path/to/freeticketing/directory
User=your_user
Restart=always
[Install]
WantedBy=multi-user.target
Save and exit the editor.
Reload systemd:
bash
sudo systemctl daemon-reload
- Enable and start the service:
bash
sudo systemctl enable freeticketing
sudo systemctl start freeticketing
macOS
To run FreeTicketing as a service on macOS, you can use launchd:
- Create a plist file:
bash
sudo nano /Library/LaunchDaemons/com.freeticketing.plist
Add the following content (adjust paths as needed):
xml<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.freeticketing</string> <key>ProgramArguments</key> <array> <string>/path/to/freeticketing</string> </array> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/> <key>WorkingDirectory</key> <string>/path/to/freeticketing/directory</string> <key>StandardOutPath</key> <string>/tmp/freeticketing.stdout</string> <key>StandardErrorPath</key> <string>/tmp/freeticketing.stderr</string> </dict> </plist>
Save and exit the editor.
Load and start the service:
bash
sudo launchctl load /Library/LaunchDaemons/com.freeticketing.plist
sudo launchctl start com.freeticketing