Windows Service install
This option is to install OliveTin as a Windows service, which allows it to run in the background and start automatically when the system boots up. This is useful for servers or systems that need to run OliveTin without user intervention. If you want to run OliveTin as a regular application, you can follow the Windows install instructions instead.
Download and extract;
| There is no .msi installer for OliveTin yet, so you will need to download the .zip file and extract it in the desired location. |
You can download the latest version of OliveTin here: OliveTin-windows-amd64.zip
-
Create c:/Program Files/OliveTin/
-
Copy OliveTin.exe into this directory.
-
Copy the webui directory into this directory.
-
-
Create c:/ProgramData/OliveTin/
-
Copy the config.yaml file into this directory.
-
Process log directory
On Windows, OliveTin writes its process logs (startup messages, configuration load, errors, and internal diagnostics) to a log file on disk. By default these files are stored under %ProgramData%\OliveTin\logs\ as OliveTin-service-<timestamp>.log.
This is separate from action execution logs (saveLogs), which persist command output from individual actions.
Portable or self-contained installs often keep OliveTin, its configuration, and its logs together in one folder. Without a custom path, process logs always go to %ProgramData%, even when you run OliveTin from another location.
Add a serviceLogs block to your config.yaml:
serviceLogs:
directory: ./logs/service/
OliveTin creates the directory if it does not exist and writes a new timestamped log file there on each startup.
If serviceLogs.directory is omitted, OliveTin uses the default location: %ProgramData%\OliveTin\logs\.
Relative paths (for example ./logs/service/) are resolved from the directory containing OliveTin.exe. This keeps portable installs self-contained when you colocate logs with the application.
|
|
Test OliveTin startup
Open a command prompt and make suer you are in the c:/Program Files/OliveTin/ directory, then run:
./OliveTin.exe
If everything is set up correctly, you should see the OliveTin service starting up and listening on port 1337.
Switch startup mode to a Windows service
Windows services require executables to run a "service host" thread, which is not started by default for OliveTin on windows. To run OliveTin as a service, you will need to set this in your configuration file;
config.yamlserviceHostMode: "winsvc-standard"
logLevel: info
actions:
...
Register the service
Open a command prompt as Administrator and run the following command;
Make sure to run sc.exe and not just sc, as the latter is a PowerShell alias for Set-Content and does not display any output, which can be very confusing.
sc.exe create OliveTin binPath= "C:\Program Files\OliveTin\OliveTin.exe" start= auto
Start the service
Start the service from the Microsoft Management Console (MMC) or by running the following command;
sc.exe start OliveTin
Post installation
You will need to write a basic configuration file before OliveTin will startup.
Edit the basic config file at config.yaml with the following contents;
config.yaml file.actions:
- title: "Hello world!"
shell: echo 'Hello World!'
Start OliveTin, preferably via a terminal. On Unix based systems (eg MacOS, BSD, Linux, etc) you can just run ./OliveTin. On Windows you would run OliveTin.exe in windows terminal.
You should be able to browse to http://yourserver:1337 (or similar) to get to the web interface.
If you see the OliveTin page popup in your browser, you are good to go! Here are some helpful next steps;
-
configuration section for a list of all configuration options.
Troubleshooting installations
If you are having problems, OliveTin will log it’s status on startup. Check the log messages in the terminal.
For tips on capturing and sharing that output, see Service logs (troubleshooting).
If you cannot understand the logs, or otherwise need help, see the support page.