Piminer4 Help

This page is the handoff manual for the Piminer4 Flask server.

Generated by the running app on 2026-08-02 23:29.

Quick Links

Media Server Budget Games Ollama Easy Diffusion Admin

What This Server Does

Addresses And Services

Local servicepiminer4-media.service
App folder/home/dave_klenda/piminer4_server
Local URLhttp://piminer4:8080/ or http://<pi-ip>:8080/
Tailscale FunnelConfigured outside Flask for port 8080. Check with tailscale funnel status.
Easy Diffusion redirecthttps://piminer4.tailf563cd.ts.net:8443/
Ollama APIhttp://127.0.0.1:11434
Minecraftpiminer4-minecraft.service on piminer4:25565, files at /mnt/pcie_nvme/minecraft/server

Safe Restart Checklist

  1. Check the service: systemctl status piminer4-media.service --no-pager
  2. Check logs if needed: journalctl -u piminer4-media.service -n 80 --no-pager
  3. Restart only the web app: sudo systemctl restart piminer4-media.service
  4. Verify it answers: curl -I http://127.0.0.1:8080/
If a media drive was unplugged, corrupted, or recently checked on a PC, confirm it is mounted before blaming Flask. Use lsblk -f, findmnt, and check that /mnt/pcie_nvme/bmps exists.

Media Server Notes

Budget Notes

Reading The Monthly Income Vs Outflow Graph

Minecraft Notes

Getting Started With Minecraft

New User Setup

Connecting From Bedrock

  1. Open /admin and unlock Admin with the shared server password.
  2. Open the Minecraft Server section and press Start Minecraft. First startup can take about 30-90 seconds while Paper loads the world.
  3. In Minecraft Bedrock, go to Play, then Servers, then Add Server.
  4. Use any server name such as Piminer4.
  5. For outside-the-house Bedrock players, use the split playit fields shown in the Admin Minecraft Server section.
  6. Current outside Server Address: doing-boolean.gl.at.ply.gg.
  7. Current outside Port: 62300.
  8. At home/LAN, use 192.168.1.67 with port 19132. Outside the house, use the playit address and port shown above after public access is stable.
  9. Because whitelist is on, new players must be added before they can join. In Admin, use Add Player To Whitelist, choose Bedrock or Java, enter the exact player name, and press Add Player.
  10. For Bedrock players, enter the Xbox gamertag without a Floodgate prefix. Floodgate handles the Bedrock whitelist with fwhitelist.
  11. For Java players, enter the exact Java username. Java names must be 3-16 letters, numbers, or underscores.
  12. When everyone is done playing, press Stop Minecraft from Admin. It is intentionally not set to auto-start so the Pi stays free for media, budget, backups, and converters.
  13. Use Backup World before experimenting with settings, plugins, or major world changes. Backups go to /mnt/pcie_nvme/minecraft/backups.

Connecting From Java Edition

  1. In Minecraft Java Edition, choose Multiplayer, then Add Server.
  2. Use piminer4:25565 on the home network, or use the Java address shown in Admin.
Tailscale Funnel is for the web server and does not expose Bedrock UDP. Outside-the-house Bedrock access uses the playit.gg tunnel, which forwards public UDP traffic to Geyser on Piminer4.

Quake Arena Notes

Backups And Recovery

Budget backup targetdave.klenda@piminer3:/home/dave.klenda/shared/Piminer4BudgetBackups
Budget backup scheduleManaged under Admin. System helper: /usr/local/sbin/piminer4-budget-schedule-helper
Server recovery backupspiminer3:/home/dave.klenda/shared/Piminer4ServerBackups
Recovery restore scriptrestore_piminer4_server.sh is copied beside the recovery archives on Piminer3.

Recovery backups contain the Flask app files, systemd service files, helper scripts, sudoers snippets, password files, and SSH key used for budget backups. They do not contain media files, Ollama models, or Easy Diffusion.

Admin Page

Do not put plain-text passwords into this Help page. Password data is stored by the app in its configured password files. The Activity Log also redacts password fields, cast tokens, secret keys, and Ollama prompt text.

Password Lockout Security

Important Files

FilePurpose
/home/dave_klenda/piminer4_server/app.pyMain Flask app, Hub, Admin, health monitor, safe command console, Ollama, Help, Easy Diffusion redirect, and backup/admin helper calls.
/home/dave_klenda/piminer4_server/config.pyCentral configuration: media root, budget workbook path, backup locations, Ollama URL, Easy Diffusion URL, and password file path.
/home/dave_klenda/piminer4_server/auth.pyPassword verification, password hash storage, and unlock/session helpers.
/home/dave_klenda/piminer4_server/server_password.jsonStored server password hash. Do not edit by hand; use Admin to change the password.
/home/dave_klenda/piminer4_server/server_access_log.jsonlJSON-lines activity log showing recent server use: client IP, browser/device, area, action, path, and status.
/home/dave_klenda/piminer4_server/password_lockouts.jsonPassword lockout state after repeated failed password attempts.
/home/dave_klenda/piminer4_server/protected_passwords.jsonProtected media folder password data, if present. The shared server password is also accepted.
/home/dave_klenda/piminer4_server/media/routes.pyMedia browse/play/cast/subtitle routes and Music Videos playlist behavior.
/home/dave_klenda/piminer4_server/media/services.pyMedia file scanning, protected folder definitions, thumbnails, and safe path handling.
/home/dave_klenda/piminer4_server/media/templates/player.htmlVideo/image player, Chromecast controls, next/previous buttons, and Music Videos autoplay/random UI.
/home/dave_klenda/piminer4_server/media/templates/media_dashboard.htmlFolder and media thumbnail browser.
/home/dave_klenda/piminer4_server/music_artist_genres.jsonSaved Music Videos artist genre choices for sorting and future genre playback.
/home/dave_klenda/piminer4_server/budget/routes.pyBudget page routes for add/edit entries, recurring rows, categories, workbook download, and password unlock.
/home/dave_klenda/piminer4_server/budget/services.pyExcel workbook reader/writer, dashboard calculations, category budgets, recurring rows, and budget entry edits.
/home/dave_klenda/piminer4_server/budget/templates/budget_home.htmlBudget web interface, mobile layout, dashboards, workbook tabs, editors, and recent-entry edit forms.
/home/dave_klenda/piminer4_server/games/routes.pyGame list and game page route.
/home/dave_klenda/piminer4_server/games/templates/games_home.htmlGames menu.
/home/dave_klenda/piminer4_server/games/templates/game_play.htmlBrowser game UI and JavaScript game logic.
/mnt/pcie_nvme/minecraft/serverPaper Minecraft server folder, including world data, server.properties, whitelist, and server jar.
/mnt/pcie_nvme/minecraft/backupsMinecraft world backups created from Admin.
/mnt/pcie_nvme/minecraft/server/plugins/Geyser-SpigotGeyser Bedrock bridge config. Bedrock listens on UDP 19132.
/mnt/pcie_nvme/minecraft/server/plugins/floodgateFloodgate config and keys so Bedrock accounts can join without owning Java Edition.
/mnt/pcie_nvme/minecraft/piminer4_geyser_floodgate.jsonPiminer4 metadata for the installed Geyser/Floodgate/ViaVersion bridge.
/etc/openarena-server/server.cfgQuake Arena / OpenArena dedicated server settings: hostname, map, gametype, frag limit, time limit, bots, and max clients.
/usr/lib/systemd/system/openarena-server.serviceSystemd service for the Quake Arena / OpenArena dedicated server on UDP 27960.
/usr/bin/jellyfinJellyfin media server executable. The service listens on port 8096.
/home/dave_klenda/piminer4_server/tools/run_disc_ripper.pyAdmin helper for optical-disc scan/rip status and background HandBrake/MakeMKV rip jobs.
/bmps/Ripped DiscsDefault output folder for DVD/Blu-ray rips created from Admin.
/home/dave_klenda/disc_ripper.logDisc ripper log showing scan, HandBrake, and MakeMKV output.
HOME_NETWORK_DEVICESOptional environment JSON list for Admin's Home Network Monitor. If unset, Piminer4 uses the built-in known-device list.
/home/dave_klenda/piminer4_server/tools/update_budget_backup_schedule.pyPrivileged helper used by Admin to edit the systemd budget backup timer.
/home/dave_klenda/piminer4_server/tools/run_pi_os_update.pyPrivileged helper used by Admin to run apt update/upgrade and report status.
/home/dave_klenda/piminer4_server/tools/run_maintenance.pyPrivileged helper used by Admin for server maintenance actions such as restarting the media service and starting budget backups.
/home/dave_klenda/piminer4_server/tools/generate_music_mobile_videos.pyAdmin-runnable converter that creates Music Videos mobile copies and full-size audio-normalized cache copies.
/mnt/pcie_nvme/mobile_cacheSeparate cache folder for Music Videos .mobile.mp4 files so the original Music Videos folder stays uncluttered.
/mnt/pcie_nvme/normalized_cacheSeparate cache folder for Music Videos full-size .normalized.mp4 files with steadier audio volume.
/etc/systemd/system/piminer4-media.serviceSystemd unit that starts Gunicorn for this Flask app on port 8080.
/etc/systemd/system/piminer4-minecraft.serviceSystemd unit for the manually controlled Paper Minecraft server. Disabled by default.
/etc/systemd/system/piminer4-budget-backup.serviceSystemd unit that creates budget workbook backups.
/etc/systemd/system/piminer4-budget-backup.timerSystemd timer for automatic budget workbook backups.
/usr/local/sbin/piminer4-budget-schedule-helperRoot-owned wrapper for changing the budget backup schedule from Admin.
/usr/local/sbin/piminer4-os-update-helperRoot-owned wrapper for starting/checking Pi OS update from Admin.
/home/dave_klenda/.ssh/piminer4_budget_backup_ed25519SSH key used by Piminer4 to reach Piminer3 for budget backups and restores.

Useful Commands

cd /home/dave_klenda/piminer4_server
systemctl status piminer4-media.service --no-pager
journalctl -u piminer4-media.service -n 80 --no-pager
sudo systemctl restart piminer4-media.service
sudo systemctl status piminer4-minecraft.service --no-pager
sudo systemctl start piminer4-minecraft.service
sudo systemctl stop piminer4-minecraft.service
tailscale funnel status
lsblk -f
findmnt
systemctl list-timers piminer4-budget-backup.timer --no-pager

When Things Break