28 lines
698 B
Desktop File
28 lines
698 B
Desktop File
[Unit]
|
|
Description=OpenCode Web UI
|
|
Documentation=https://opencode.ai/docs
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
WorkingDirectory=__HOME__
|
|
ExecStart=__OPENCODE_BIN__ serve --port 3003 --hostname 127.0.0.1
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
|
|
# Environment
|
|
Environment=HOME=__HOME__
|
|
Environment=PATH=__OPENCODE_BIN_DIR__:/usr/local/bin:/usr/bin:/bin
|
|
# Do not import ODS's full .env here. OpenCode treats
|
|
# OPENCODE_SERVER_PASSWORD as a Basic Auth password when present, but this
|
|
# localhost-only web UI should be reachable without a login prompt.
|
|
UnsetEnvironment=OPENCODE_SERVER_PASSWORD
|
|
|
|
# Hardening
|
|
NoNewPrivileges=true
|
|
ReadWritePaths=__HOME__
|
|
PrivateTmp=true
|
|
|
|
[Install]
|
|
WantedBy=default.target
|