v0.5.4: ship examples/lmcp.service template

Companion to lmcp-hub.service. Gives a copy-and-edit starting point for
per-host lmcp instances (foo-tools style). Handles the Arch-vs-Debian
/usr/bin/lua vs /usr/bin/lua5.4 split via a comment pointing users to
override ExecStart.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-21 20:12:43 +00:00
parent 17af91a99b
commit b81b021b5b
2 changed files with 23 additions and 1 deletions
+22
View File
@@ -0,0 +1,22 @@
[Unit]
Description=lmcp MCP Server
After=network.target
[Service]
Type=simple
User=root
# Arch ships the Lua 5.4 binary as /usr/bin/lua; Debian ships /usr/bin/lua5.4.
# Override ExecStart if your distro differs.
ExecStart=/usr/bin/lua /usr/share/lua/5.4/server.lua
# Distinct name per host: foo-tools appears in /mcp listings and logs.
Environment=LMCP_NAME=CHANGEME-tools
Environment=LMCP_PORT=8080
# Bearer token. Generate with: openssl rand -hex 24
# For untrusted networks, bind to LAN-only via firewall; the server itself
# listens on 0.0.0.0 by default.
Environment=LMCP_TOKEN=CHANGEME
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
+1 -1
View File
@@ -468,7 +468,7 @@ math.randomseed(os.time())
local server = lmcp.new(os.getenv("LMCP_NAME") or "hub-tools", {
port = tonumber(os.getenv("LMCP_PORT") or arg[1]) or 8090,
version = "0.5.3",
version = "0.5.4",
conf = os.getenv("LMCP_HUB_CONF") or "/opt/herding/etc/lmcp-hub.conf",
})