Files
darroyo 596f194c3a
CI / test (push) Failing after 12m40s
fix: set WorkingDirectory to /opt/llamalink/data in systemd unit
The llamalink service fails to start because ProtectSystem=strict only
allows writes to ReadWritePaths=/opt/llamalink/data, but the default
DATABASE_URL=sqlite:///./llamalink.db resolves relative to WorkingDirectory.

With WorkingDirectory=/opt/llamalink, the db lands at /opt/llamalink/llamalink.db
which is not in ReadWritePaths, causing sqlite open to fail.

Setting WorkingDirectory=/opt/llamalink/data aligns with the package layout
(postinst creates /opt/llamalink/data) and makes the default ./llamalink.db
resolve to the correct writable location.
2026-07-31 15:32:31 -04:00

26 lines
496 B
Desktop File

[Unit]
Description=LlamaLink API Gateway
After=network.target
[Service]
Type=simple
User=llamalink
WorkingDirectory=/opt/llamalink/data
EnvironmentFile=/etc/llamalink/env
ExecStart=/usr/local/bin/llamalink
Restart=on-failure
RestartSec=5
StandardOutput=journal
StandardError=journal
SyslogIdentifier=llamalink
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/opt/llamalink/data
ReadOnlyPaths=/opt/llamalink/models
[Install]
WantedBy=multi-user.target