Web dashboard for a vertically mounted Vilros Magic Mirror V4. Assumes the Pi is already wired (HDMI + power) and Node.js is installed.
Display after rotation: 1080×1920 (portrait). Set orientation: "portrait" in config.js (default).
On the Pi, rotate the framebuffer so the tall mirror fills the screen:
Raspberry Pi OS Bookworm — edit /boot/firmware/config.txt:
# Portrait, clockwise (try 3 if the image is upside-down)
display_hdmi_rotate=1Older Pi OS — same file may use:
display_rotate=1Reboot: sudo reboot
From your Windows PC (adjust host/user/path):
scp -r c:\Users\YOUR_USER\code\magic_mirror pi@YOUR_PI_HOST:~/magic_mirrorOn the Pi:
cd ~/magic_mirror
npm startOpen http://YOUR_PI_IP:8080 from another device to verify, or on the Pi:
chromium-browser http://127.0.0.1:8080sudo cp ~/magic_mirror/scripts/mirror.service /etc/systemd/system/magic-mirror.service
sudo nano /etc/systemd/system/magic-mirror.service
# Set User= and WorkingDirectory= to your actual user/folder
sudo systemctl daemon-reload
sudo systemctl enable --now magic-mirror.service
sudo systemctl status magic-mirror.servicemkdir -p ~/.config/autostart
cp ~/magic_mirror/scripts/autostart-magic-mirror.desktop ~/.config/autostart/
nano ~/.config/autostart/autostart-magic-mirror.desktop
# Fix the path in Exec= if not /home/pi/magic_mirror
chmod +x ~/magic_mirror/scripts/start-kiosk.shReboot. The server starts first; kiosk opens after a short delay.
cd ~/magic_mirror
pm2 start server.js --name magic-mirror
pm2 saveEdit ~/magic_mirror/config.js on the Pi:
| Setting | Notes |
|---|---|
orientation |
"portrait" (vertical) or "landscape" |
timezone |
e.g. America/Chicago |
weather |
Houston defaults; no API key |
greeting.name |
Optional |
calendar.events |
Until you add a calendar API |
After edits: sudo systemctl restart magic-mirror (or refresh the browser).
┌──────────────┐
│ TIME ☀️ ° │
│ DATE │
│ Good morning │
│ │
│ reflection │
│ │
│ calendar │
│ compliment │
└──────────────┘
Use the mirror’s brightness buttons so white text shows through the glass.
cd c:\Users\adolp\code\magic_mirror
npm startPreview portrait: open http://localhost:8080, narrow the window or use DevTools device mode with 1080×1920.
This is a small custom UI (HTML + config.js), not the MagicMirror² project. If you were on MM² before, you can either keep using this stack or reinstall MM² separately — this repo does not conflict with Node on the Pi.
| File | Purpose |
|---|---|
server.js |
Node static server (port 8080) |
config.js |
Mirror settings |
scripts/start-kiosk.sh |
Fullscreen Chromium |
scripts/mirror.service |
systemd template |