- Rust 71.2%
- TypeScript 21.3%
- Shell 6.8%
- PLpgSQL 0.4%
- Dockerfile 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
CI / the pre-push hook (push) Successful in 3s
CI / install.sh client upgrade (push) Successful in 12s
CI / cargo fmt (push) Successful in 4s
CI / cargo clippy (push) Successful in 1m21s
CI / cargo deny (push) Successful in 20s
CI / cargo deny advisories (push) Successful in 20s
CI / frontend-web (push) Successful in 1m14s
CI / repository boundary (push) Successful in 5s
CI / cargo test (push) Successful in 4m21s
CI / Notify gate failed (push) Has been skipped
CI / the pre-push hook (pull_request) Successful in 3s
CI / cargo fmt (pull_request) Successful in 3s
CI / install.sh client upgrade (pull_request) Successful in 13s
CI / cargo clippy (pull_request) Successful in 1m12s
CI / cargo deny (pull_request) Successful in 13s
CI / cargo deny advisories (pull_request) Successful in 16s
CI / repository boundary (pull_request) Successful in 5s
CI / frontend-web (pull_request) Successful in 1m12s
CI / cargo test (pull_request) Successful in 4m12s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (push) Successful in 1s
CI / CI (pull_request) Successful in 1s
|
||
| .githooks | ||
| .github/workflows | ||
| crates | ||
| docs | ||
| frontend-web | ||
| packaging | ||
| plan | ||
| scripts | ||
| .gitignore | ||
| .nvmrc | ||
| .repo-boundary | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CONTRIBUTING.md | ||
| deny.toml | ||
| install.sh | ||
| LICENSE.md | ||
| README.md | ||
| rust-toolchain.toml | ||
Grimoire of Digital Signage: Scryglass
An open-source digital signage system written in Rust. A central server manages playlists, devices, schedules and users. A pure-Rust client renders the content on each screen and keeps playing when the network is gone.
Linux first, on whatever hardware is available: Raspberry Pi, mini PC, old laptop, x86_64 or aarch64. Windows and macOS come later.
Early development. Scryglass is not ready for production use yet. What works today, and what comes next, is in the roadmap.
Features
- Server — one binary with the management panel built in. It stores its data in PostgreSQL.
- Management panel — a web interface for playlists, devices and users.
- Client — runs full screen on each display device, renders the content, and keeps playing from its own cache when the network is gone.
- Self-hosted — every address, database and credential comes from configuration. Nothing is tied to one vendor or one host.
Quick install
One command does every step below for you, on Debian, Ubuntu or Raspberry Pi OS (x86_64 or aarch64). Copy it into a terminal.
Server:
wget -qO- https://git.grimoirix.org/Grimoirix/grimoire-of-digital-signage/raw/branch/dev/install.sh | sudo bash -s -- server
wget is what a fresh install ships, on Desktop and Server alike; swap in
curl -fsSL for wget -qO- if you have curl instead.
It uses Docker when Docker is installed, and otherwise installs the server
directly on the OS with its own PostgreSQL. Add --docker or --native to
choose.
On the OS, when the host has no PostgreSQL yet, the script asks at the start
whether to install one. Answer yes and it installs PostgreSQL and creates the
database, the user and a generated password in the same run. Answer no and it
asks for the URL of the PostgreSQL you already run. --install-postgres says
yes without asking, --no-install-postgres says no.
Client, on each display device:
wget -qO- https://git.grimoirix.org/Grimoirix/grimoire-of-digital-signage/raw/branch/dev/install.sh | sudo bash -s -- client --server https://signage.example.org
Put the address of your own server after --server.
The client install also makes a screen account, scryglass, with no admin
rights and no password, and sets GDM to log in to it at boot, with no
screen lock, blanking or idle suspend. So after a power cut the screen shows
the player again with nobody at the keyboard. --kiosk-user NAME picks
another name, --kiosk-password-keep keeps the account's password (then
only the auto-login is set), and --no-kiosk leaves the login to you. The
install stops if sshd allows empty passwords. See "The screen account" in
the deployment guide.
To upgrade, put upgrade in front: ... | sudo bash -s -- upgrade server
(or upgrade client). It keeps your configuration and your data, builds only
what changed, restarts the service (for the client: the player that is
running), prints the version it installed, and stops at once when you already
have the newest version. Add --force to build and install the same version
again. A Docker install is upgraded the same way: it gets the new
source and builds a new image, because a container cannot update itself.
For Compose by hand, Kubernetes and a hand-built systemd install, see
"Upgrading" in plan/operations/deployment.md.
The first install builds from source and takes
a while: count on 10 to 30 minutes, longer on a Raspberry Pi. install.sh --help lists every option.
If the script asks a question and your answer never seems to arrive, download
it first and run it from the file:
wget -qO install.sh <the URL above> && sudo bash install.sh upgrade server.
To remove it, put uninstall in front: ... | sudo bash -s -- uninstall server.
That keeps the configuration, the database and the media; add --purge to
delete those too. reinstall server (or client) removes it and installs it
again from a fresh download and build, keeping the data.
The steps below are what the script does, for when you want to do it by hand.
Install the server
There are two ways. Both build from source, because no release is published yet.
| Way | Good for | Database |
|---|---|---|
| Docker Compose | the quickest start | bundled, or your own |
| Directly on the OS | a host that does not run containers | your own PostgreSQL |
With Docker Compose
You need Docker with the Compose plugin, git and openssl.
git clone https://git.grimoirix.org/Grimoirix/grimoire-of-digital-signage.git
cd grimoire-of-digital-signage/packaging/server
cp config.toml.example config.toml # edit it if you want other than the defaults
cp .env.example .env
sed -i "s/^POSTGRES_PASSWORD=.*/POSTGRES_PASSWORD=$(openssl rand -hex 24)/" .env
../../scripts/package-server-image.sh # writes the pinned Rust and Node versions into .env
docker compose --env-file .env up -d --build
This starts the server and a PostgreSQL that Compose manages for you. How to
use your own PostgreSQL instead, and how to upgrade, is in
packaging/server/README.md.
Directly on the OS, with systemd
You need a Linux host with systemd, PostgreSQL, the Rust toolchain
(rustup installs the version in
rust-toolchain.toml by itself) and Node.js at the
version in .nvmrc.
-
Make a database and a user for the server:
sudo -u postgres createuser --pwprompt signage sudo -u postgres createdb --owner signage signage -
Build and install the server, the panel and the systemd unit:
git clone https://git.grimoirix.org/Grimoirix/grimoire-of-digital-signage.git cd grimoire-of-digital-signage cargo build --release --locked -p server sudo install -Dm755 target/release/server /usr/local/bin/grimoirix-signage-server (cd frontend-web && npm ci && npm run build) sudo mkdir -p /usr/local/share/grimoire-signage/panel sudo cp -r frontend-web/dist/. /usr/local/share/grimoire-signage/panel/ sudo install -Dm644 packaging/server-systemd/grimoirix-signage-server.service \ /etc/systemd/system/grimoirix-signage-server.service sudo install -Dm640 packaging/server/config.toml.example /etc/grimoire-signage/config.toml -
Put the database address in
/etc/grimoire-signage/config.toml. Everything else has a default. The database has none, on purpose:[database] url = "postgres://signage:your-password@localhost/signage" -
Start it:
sudo systemctl daemon-reload sudo systemctl enable --now grimoirix-signage-server
How to upgrade and uninstall is in
packaging/server-systemd/README.md.
Check that it runs
curl -s http://localhost:8000/health
The management panel is at http://<your-host>:8000/. A browser login needs
HTTPS: the session cookie is Secure, so put a reverse proxy with TLS in
front of the server. Ready-made nginx, Caddy and Traefik configurations are in
the deployment guide.
Install the client on a display device
The client is a .deb package for Debian, Ubuntu and Raspberry Pi OS. Build it
on a machine with the same architecture as the display:
sudo apt install dpkg-dev libgtk-3-dev libwebkit2gtk-4.1-dev libgstreamer1.0-dev \
gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly \
gstreamer1.0-libav gstreamer1.0-gtk3
git clone https://git.grimoirix.org/Grimoirix/grimoire-of-digital-signage.git
cd grimoire-of-digital-signage
./scripts/package-client-deb.sh
sudo apt install --reinstall ./target/debian/grimoirix-signage-client_<version>_<arch>.deb
The script prints the file it built on its built: line. Every build has its
own version, <workspace version>+git<commit time>.<commit>, so dpkg -l grimoirix-signage-client tells which build a device runs. --reinstall makes
apt install a rebuild of the same commit too; without it apt skips a package
whose version is already installed, and says nothing.
Then tell it where the server is:
sudo mkdir -p /etc/grimoirix-signage
printf 'server = "https://signage.example.org"\n' | sudo tee /etc/grimoirix-signage/client.toml
The client starts full screen when the user logs in. A new device shows up in
the panel as a pending registration until you approve it. For a screen that
logs in by itself at boot, set up the screen account as described in
the deployment guide;
install.sh client does that for you.
Documentation
| If you want to | Read |
|---|---|
| Install, configure, back up and upgrade, step by step | plan/operations/deployment.md |
| Every configuration key and its environment variable | plan/server/configuration.md |
| Know what we are building | plan/overview/vision-and-scope.md |
| Build, test or change the code | CONTRIBUTING.md |
Licence
See LICENSE.md: AGPL-3.0 for non-commercial and open-source use,
and the Grimoirix Commercial Open Source Licence for commercial use. Whether
this stays as the project's licence is Q5.