Skip to content

Run LIT Platform Automatically at Startup (Windows)#

If you want LIT Platform to keep running after a reboot or power outage, install it as a Windows service.

Python Version

On Windows, use Python 3.10 or 3.11 for best compatibility. See installation notes for details.


Step 1 — Find Your Python Path#

System-wide Python install#

Check one of these locations and find python.exe:

  • C:\Program Files\PythonXX\
  • C:\Program Files (x86)\PythonXX\

Right-click python.exeCopy as path.

User-only Python install#

C:\Users\YourUserName\AppData\Local\Programs\Python\PythonXX\python.exe

Right-click python.exeCopy as path.


Option 1 — Native Windows Service (No Extra Software)#

Fastest method. Slightly trickier due to quoting.

  1. Open PowerShell as Administrator
  2. Run the command below as one line, replacing PYTHON_PATH with the path you copied:
sc.exe create "LIT Platform" binPath= "cmd.exe /c \"\"PYTHON_PATH\" -m lit serve --port 8080\"" start= auto

Note

The extra quotes are required — Windows services are strict about quoting.

If successful, the service is created. Start it immediately via Services (services.msc), or reboot to confirm it starts automatically.


Option 2 — Install Using NSSM (Easier)#

Installs two small tools but gives you a GUI and easier management.

1. Install Chocolatey#

Open PowerShell as Administrator and run:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

2. Install NSSM#

choco install nssm

3. Create the Service#

nssm install "LIT Platform"

A GUI will open. Fill in:

Field Value
Path Full path to your python.exe
Arguments -m lit serve --port 8080

Click Install Service.


LIT Platform will now start automatically with Windows. To change the port, replace 8080 with your preferred port number in either option above.