This project now includes a Node.js Express backend for system actions.
Install dependencies:
npm installStart frontend + backend together:
npm run dev:fullFrontend runs on port 5173 and proxies /api/* to backend on port 3001.
Build frontend assets:
npm run buildStart Express in production mode:
npm run startIn production, Express serves the built frontend from dist/ and also serves all /api/* routes from the same server.
Using docker-compose is the easiest way to run with config management:
docker-compose up -dThis will:
- Pull the image from Docker Hub (
emresanden/dart-screen) - Start the container on port 3001
- Mount
./configfolder for configuration
Edit config/config.json to customize applications. Changes will be reflected after restarting the container.
Pull the image:
docker pull emresanden/dart-screen:latestRun the container:
docker run -d \
--name dart-screen \
-p 3001:3001 \
--restart unless-stopped \
emresanden/dart-screen:latestIf you want to build from source:
docker build -t dart-screen:latest .
docker run -d \
--name dart-screen \
-p 3001:3001 \
--restart unless-stopped \
dart-screen:latestFor system commands (reboot/shutdown) to work inside containers, run with:
docker run -d \
--name dart-screen \
-p 3001:3001 \
--privileged \
--restart unless-stopped \
emresanden/dart-screen:latestThe --privileged flag allows the container to execute systemctl commands on the host. Without it, reboot/shutdown will fail.
GET /api/healthGET /api/apps— Returns list of configured applicationsGET /api/system/stats— Returns system info (hostname, CPU, memory, network)POST /api/system/rebootPOST /api/system/shutdown
All deployments use config/config.json for application configuration. Edit this file to add, remove, or modify applications displayed on the dashboard.
For local development (npm run dev:full), npm start, or Docker Compose, changes will be reflected after restarting the service.
Each app supports:
name— Display nameurl— Application URLicon— Icon name (target, barchart, monitor, etc.)description— Short descriptioncolor— Tailwind gradient color classopenMode— How to open:iframe(embedded) ornew-tab(default)
The backend calls:
sudo -n /usr/bin/systemctl rebootsudo -n /usr/bin/systemctl poweroff
-n means non-interactive mode: no password prompt is allowed. If sudoers is not configured, the API returns an error immediately.
Allow passwordless execution for only these commands:
sudo visudoAdd a line (replace <username>):
<username> ALL=(root) NOPASSWD: /usr/bin/systemctl reboot, /usr/bin/systemctl poweroff
Then verify:
sudo -n /usr/bin/systemctl reboot --help
sudo -n /usr/bin/systemctl poweroff --helpIf these commands still ask for password, sudoers is not configured correctly.