Skip to content

Install

Using cargo

sh
cargo install epazote

Install cargo with curl https://sh.rustup.rs -sSf | sh

FreeBSD

sh
pkg install epazote

macOS

brew install epazote: the project needs to have at least 75 ⭐ in Github to submit the formula

Download the latest release

Linux

Download the latest release

Windows

Download the latest release

Systemd service setup (Linux)

Create the epazote user to ensure the service runs as a non-root user

sh
useradd -r -s /bin/false epazote

INFO

-r: Creates a system user without home directory -s /bin/false: Preventes the user from logging in

Set file permissions

Ensure that epazote can read its configuration file:

sh
sudo mkdir -p /etc/epazote
sudo chown -R epazote:epazote /etc/epazote
sudo chmod 750 /etc/epazote

Create the service file

Create the file /etc/systemd/system/epazote.service with the following content:

ini
[Unit]
Description=Epazote Service
After=network.target

[Service]
ExecStart=/usr/bin/epazote -c /etc/epazote/epazote.yml
Restart=always
User=epazote
Group=epazote
WorkingDirectory=/etc/epazote
SyslogIdentifier=epazote

[Install]
WantedBy=multi-user.target

Reload systemd and enable the service:

sh
sudo systemctl daemon-reload
sudo systemctl enable epazote
sudo systemctl start epazote

Check the service status:

sh
sudo systemctl status epazote

Configure sudo permissions

In order to allow epazote to restart services, add the following line to /etc/sudoers:

sh
epazote ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart *

This allows the epazote user to restart any service without a password prompt.

::: Warning Needs to be adapted to your needs, this is just an example :::

Test permissions

Run the following command as the epazote user:

sh
sudo -u epazote sudo systemctl restart <your_app>

if it works without asking for a password, then the permissions are correctly set up.

Released under the BSD-3-Clause License