[Unit] Description=CareMeet mediasoup SFU After=network.target [Service] Type=simple User=caremeet WorkingDirectory=/opt/caremeet/sfu EnvironmentFile=/opt/caremeet/sfu/.env ExecStart=/usr/bin/node src/index.js Restart=always RestartSec=5 # Must exceed the 120s drain window in index.js, or systemd kills live calls. TimeoutStopSec=150 KillSignal=SIGTERM # mediasoup opens a lot of sockets; the default 1024 is nowhere near enough. LimitNOFILE=200000 [Install] WantedBy=multi-user.target