Binary deployment
Get the program
Download a release
Download the package for your operating system and architecture from GitHub Releases.
The following commands are for Linux AMD64. Replace vX.Y.Z with the actual version.
sh
SAYRUD_VERSION=vX.Y.Z
SAYRUD_ARCH=amd64
SAYRUD_ARCHIVE="sayrud_${SAYRUD_VERSION#v}_linux_${SAYRUD_ARCH}.tar.gz"
curl -fLO "https://github.com/sayrud/sayrud/releases/download/${SAYRUD_VERSION}/${SAYRUD_ARCHIVE}"
curl -fLO "https://github.com/sayrud/sayrud/releases/download/${SAYRUD_VERSION}/checksums.txt"
sha256sum --ignore-missing -c checksums.txt
tar -xzf "$SAYRUD_ARCHIVE"Build from source
To build from source, you need Go 1.27, Node.js 22, and pnpm 10 or later:
sh
git clone https://github.com/sayrud/sayrud.git
cd sayrud
pnpm --dir frontend install --frozen-lockfile
pnpm --dir frontend build
CGO_ENABLED=0 go build -mod=readonly -trimpath -o sayrud-server ./cmd/sayrud-serverManage with systemd
Create a service user and install the program in /opt/sayrud:
sh
sudo useradd --system --user-group --home-dir /opt/sayrud --shell /usr/sbin/nologin sayrud
sudo install -d -m 0755 /opt/sayrud
sudo install -d -o sayrud -g sayrud -m 0750 /opt/sayrud/config /opt/sayrud/data
sudo install -m 0755 ./sayrud-server /opt/sayrud/sayrud-serverSave the following as /etc/systemd/system/sayrud.service:
ini
[Unit]
Description=Sayrud
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=sayrud
Group=sayrud
WorkingDirectory=/opt/sayrud
ExecStart=/opt/sayrud/sayrud-server web --port 2830 --config /opt/sayrud/config/sayrud.yaml
Restart=on-failure
RestartSec=5s
TimeoutStopSec=45s
UMask=0027
[Install]
WantedBy=multi-user.targetStart the service and find the installation token:
sh
sudo systemctl daemon-reload
sudo systemctl enable --now sayrud
sudo systemctl status sayrud
sudo journalctl -u sayrud -n 100 --no-pagerOpen http://server-address:2830/setup and use the token from the logs to complete the web installation.
Upgrade
Back up the database, config/, and data/, then stop the service and replace the binary:
sh
sudo systemctl stop sayrud
sudo install -m 0755 ./sayrud-server /opt/sayrud/sayrud-server
sudo systemctl start sayrud
sudo journalctl -u sayrud -n 100 --no-pager
curl -fsS http://127.0.0.1:2830/-/readyz