Files
zrok/website/docs/how-tos/agent/setup-linux-service.mdx
2026-03-14 01:15:19 +00:00

47 lines
967 B
Plaintext

---
sidebar_label: Set up the Linux agent service
sidebar_position: 40
---
import LinuxAgentInstall from '../_linux-agent-install.mdx'
# Set up the Linux agent service
Run the zrok agent as a `systemd --user` service under your Linux user account.
## Install the package
The `zrok2` package provides the `zrok2` executable. The `zrok2-agent` package provides the `zrok2-agent.service` systemd user service unit.
<LinuxAgentInstall />
## Enable your account
This creates a `~/.zrok2` directory enabled for your zrok account.
```bash
zrok2 enable <your_account_token>
```
## Start the service
Enable and start the `zrok2-agent` service so it runs automatically on login:
```bash
systemctl --user enable --now zrok2-agent.service
```
## Troubleshooting
### Check the user service log
Use `journalctl` to view the live service log:
```bash
journalctl --user -lfu zrok2-agent.service
```
## See also
- [Manage shares with the agent](./manage-shares.mdx)