lmstudio-ai / lmstudio-ai/docs
Service unit file in lmster docs doesn't account for SELinux policy
- Dominant language
- MDX
- Stars
- 172
- Forks
- 128
- Avg merge
- 8m
- Merged PRs (30d)
- 1
Description
[The docs](https://lmstudio.ai/docs/developer/core/headless_llmster) for setting up `lmster` in a headless environment with `systemd` don't account for the fact that SELinux enforced environments block the loading of executables from the `/home` directory from `systemd`.
This leads to the following error when running the service file.
```bash
> journalctl -u lmstudio.service -f
(lms)[159023]: lmstudio.service: Failed at step EXEC spawning /home/USER/.lmstudio/bin/lms: Permission denied
lmstudio.service: Failed at step EXEC spawning /home/USER/.lmstudio/bin/lms: Permission denied
```
Please add a note in the documentation to optionally override this policy for the `lms` directory thusly;
```bash
sudo chcon -R -t bin_t /home/USER/.lmstudio/bin
```
This allows the `lms` binary to run from the service file without loosening SELinux polcies system-wide.
Contributor guide
Research direction
Open the linked headless_llmster documentation and find the systemd service setup section. Add an optional SELinux note with the provided chcon command, explaining that it labels the lms directory without changing system-wide policy. Done means the page covers the shown permission error and the documented workaround.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100