# /etc/conf.d/lemonade # Configuration for the lemonade (lemond) OpenRC service. # REQUIRED. Local user the daemon runs as. Must own the lemonade cache # (~/.cache/lemonade) and be able to reach any NPU/GPU backends lemond # drives. The service refuses to start if this is unset. LEMONADE_USER="" # Listener address, passed via --host (which OVERRIDES config.json). # 127.0.0.1 (default) is localhost-only. Use 0.0.0.0 for all interfaces # ONLY if you also require API-key auth (see LEMONADE_API_KEY below) or # reach the host over SSH / WireGuard. lemond ships no transport # encryption; the bind is the security boundary for the HTTP API. (Note: # lemond also emits a UDP presence broadcast on LAN interfaces at startup, # on by default and independent of this bind; turn it off by setting # no_broadcast to true in ~/.cache/lemonade/config.json.) #LEMONADE_HOST="127.0.0.1" # Port. Leave empty to use lemond's default (13305) / the config.json value. #LEMONADE_PORT="" # Cache dir (lemond's positional argument, holds config.json + models). # Leave empty to auto-derive from LEMONADE_USER's home: # ${HOME}/.cache/lemonade #LEMONADE_CACHE="" # Log file for the daemon's stdout/stderr. supervise-daemon opens this redirect # itself, as the dropped user (LEMONADE_USER) not as root, so the init script # pre-creates it (mode 0640, owned by LEMONADE_USER) before starting -- the # default /var/log is root-owned, so otherwise the open fails and the daemon # dies before writing a line. A custom path must live in a directory that # already exists. #LEMONADE_LOG="/var/log/lemonade.log" # Extra CLI args appended before the cache-dir positional. #LEMONADE_EXTRA_OPTS="" # Writable runtime directory, exported to lemond as XDG_RUNTIME_DIR. lemond # needs one for its control socket / runtime state and refuses to start without # it. supervise-daemon starts with a clean environment that has no # XDG_RUNTIME_DIR -- elogind's /run/user/ only exists after an interactive # login, which a boot-time service can't rely on -- so the init script creates # this path (mode 0700, owned by LEMONADE_USER) and exports it. This mirrors the # upstream systemd unit's RuntimeDirectory=lemonade (/run/lemonade). /run is # tmpfs and cleared each boot, which is correct for a runtime dir. Set empty # only if you arrange XDG_RUNTIME_DIR for the service some other way. #LEMONADE_RUNTIME_DIR="/run/lemonade" # ROCm runtime root, exported to lemond as ROCM_PATH. Without it, lemond's # bundled ROCm image/audio backends (sd-cpp, acestep, thinksound) download # AMD's multi-GB "TheRock" ROCm runtime into the cache at first use; pointing # ROCM_PATH at the system ROCm makes lemond reuse it and skip that download. # Gentoo installs ROCm under /usr (hipconfig --path) -- the default the init # script applies. Takes effect only if a ROCm backend is selected AND ROCm is # present here; harmless otherwise and ignored by the Vulkan/CPU backends # (USE=system-sdcpp routes sd-cpp to the Vulkan /usr/bin/sd-server instead). # Do NOT drop a ROCm "version" file under this path: lemond trusts an # explicitly-selected ROCm blindly, but a version file makes it gate on an # exact major.minor match, fail it (Gentoo's ROCm differs from the bundled # TheRock pin), and download TheRock anyway. verified 2026-07-14. Set empty # to disable and leave lemond's own ROCm resolution in place. #LEMONADE_ROCM_PATH="/usr" # To require API-key auth on all routes, export LEMONADE_API_KEY into # lemond's environment. Note this file is world-readable (mode 0644), so a # key here is exposed to any local user; `chmod 600 /etc/conf.d/lemonade` # or keep the key in a root-only drop-in instead. Example: #export LEMONADE_API_KEY="change-me"