[Unit] Description=LightRAG XYJ Service After=network.target [Service] Type=simple User=netman # Memory settings MemoryHigh=8G MemoryMax=12G # Using virtual enviroment created by miniconda Environment="PATH=/home/netman/miniconda3/bin:/home/netman/lightrag-xyj/venv/bin" WorkingDirectory=/home/netman/lightrag-xyj # ExecStart=/home/netman/lightrag-xyj/venv/bin/lightrag-server ExecStart=/home/netman/lightrag-xyj/venv/bin/lightrag-gunicorn # Kill mode require ExecStart must be gunicorn or unvicorn main process KillMode=process ExecStop=/bin/kill -s TERM $MAINPID TimeoutStopSec=60 Restart=always RestartSec=30 [Install] WantedBy=multi-user.target