r/rasberrypi • • 23h ago

Raspberry pi 4 for java Web application ... Performance??

4 Upvotes

Hi

I need to install in raspberry pi 4 with:

Wireguard for VPN

Tomcat

Maria DB

I need to run a Java web application in a little office about 7 users.

I know there are few details.

Do you know if I can have performance problems? What components do you suggest me to improve performance?

Thanks


r/rasberrypi • • 1h ago

raspiBackup release 0.7.4.1 is available now

Thumbnail reddit.com
1 Upvotes

r/rasberrypi • • 11h ago

Need help with my project

Thumbnail reddit.com
1 Upvotes

Hi so I am working on a project where I am using opencv to detect bands of a resistor I'm using a webcam with a raspberry pi 3 but the thing is that the the webcam is not able to detect the color of the band doesn't matter how close I keep it, if it's too close the resistor become more blur and if it's a little far it's very to identify tbh the code works fine but I don't understand if the problem is my code, the webcam or the raspberry pi ( cause the frames are really slow) just need some opinion on what might be the thing causing the issue


r/rasberrypi • • 17h ago

I built an open-source MicroPython mini-OS and virtual display for the Raspberry Pi Pico W over USB

1 Upvotes

Hey everyone,

I wanted to share an open-source embedded project I've been working on called ArmaX. It's a lightweight MicroPython mini-OS running directly on a Raspberry Pi Pico W that uses a native C++ desktop application as a virtual display over USB.

If you've ever built graphical interfaces on a microcontroller, you know how annoying it is to constantly wire up physical screens just to test UI layouts—and how easily streaming raw frames over USB serial can bottleneck the connection. I built ArmaX to handle the entire OS logic, shell, and 1-bit framebuffer rendering locally on the Pico W, using a dirty-row framing protocol that only sends the pixel rows that actually changed.

Here is what it currently supports:

- Dirty-Row USB CDC Streaming

- Real-Time Hardware Telemetry

- On-Board Filesystem Management

- Drag-and-Drop File Transfer

- Instant Script Execution

GitHub Repository:

https://github.com/ArmanJabari/ArmaX


r/rasberrypi • • 18h ago

Pushing a single-core Pi Zero W with Pi-hole, Unbound, Caddy, Tailscale, Log2Ram & ZRAM (benchmarks + DNS fix)

Thumbnail reddit.com
1 Upvotes

Most Pi-hole builds I see run on Pi 4s or Pi 5s, so I wanted to share how a single-core Raspberry Pi Zero W Rev 1.1 holds up running a self-hosted network stack paired with a cloud exit node, SD-card wear mitigation, and a customized `tty1` PADD display.

Hardware & Display

* Board & Thermals: Pi Zero W Rev 1.1 (32-bit Raspberry Pi OS) with a passive flat heatsink holding steady around `~41.2°C`

* Dashboard & Access: Attached `tty1` LCD running customized PADD (`v4.2.0`) with status indicators, bracket formatting, and a `paddphone` helper for viewing PADD over mobile SSH; `wlan0` (`<PI_LAN_IP>`) with no router port forwarding

DNS, Proxy & Tailscale + Cloud Exit Node

* Pi-hole (`6.6` / Web `6.6.1` / FTL `6.9`) + Unbound: ~582,896 blocked domains (~52% block rate across ~28 clients) backed by a local recursive Unbound resolver (1 server configured, DNSSEC disabled on forwarder)

* Caddy: Local reverse proxy using a local root certificate (`<LOCAL_CA_CERT>`) for internal HTTPS on desktop and mobile clients, with the router admin panel kept off the reverse proxy

* Tailscale: Advertises subnet routes and exit nodes alongside an always-on cloud ARM exit node (`<EXIT_NODE_HOSTNAME>`), with Override DNS servers pointing to Pi-hole (`<PIHOLE_TAILSCALE_IP>`) and MagicDNS (`<MAGICDNS_IP>`) active

Longevity, Single-Core Tuning & Self-Healing Updates

* SD Card & Load Tuning: `Log2Ram` (~40% log usage, ~20% SD usage) + `ZRAM` compressed swap, hardware watchdog enabled, `sleep 10` in PADD preserved via `/usr/local/bin/apply-padd-custom.sh`, and disabled `fail2ban.service`, `ntfy-power.service`, and `triggerhappy.socket` while keeping `mDNS` active (single-core load can dip as low as `~0.05` when quiet)

* Updates & Alerts: Weekly update job in `/etc/default/pi-sunday-update` with a weekly overwriting backup and rollback on boot/service failure, paired with Healthchecks.io and `ntfy` email alerts for up/down status

Fixing Mobile "DNS unavailable" Warnings

Keeping Override DNS servers enabled with MagicDNS initially triggered false `DNS unavailable` health warnings on mobile clients and extra DNS retry noise. Standardizing device machine names in the Tailscale admin console (`Machines > Edit machine name`) to clean, lowercase hyphenated hostnames cleared up the warnings while keeping network-wide filtering active.

Steady-State Benchmarks (~28 Clients)

* 1-Min CPU Load: `0.36 – 0.43` (5- and 15-min averages around `~0.49–0.55`)

* CPU Temp: `~41.2°C`

* RAM Usage: `~29.8% – 31.7%` (with `Log2Ram` + `ZRAM`; ~94,100–94,800 DNS cache insertions and `0` deletions/evictions)

* Query Volume: `40 – 75 Qrs/min` normally, handling bursts up to `92–206 Qrs/min` at ~1.1%–2.6% FTL CPU before settling back to ~`60 Qrs/min`

Next up once this stays settled is testing a Nebula overlay network (indicator slot already prepared on PADD). How do you keep single-core boards, SD cards, and Tailscale DNS smooth in your setups?

Pi Zero W Build & Maintenance Write-Up (Expanded Sanitized)

Raspberry Pi Zero W Network Appliance & Cloud Exit Node — Deep-Dive Build & Operations Guide

An in-depth engineering write-up for running a single-core ARMv6 Raspberry Pi Zero W (Rev 1.1) on 32-bit Raspberry Pi OS as a network appliance—combining Pi-hole, Unbound, Caddy, and Tailscale alongside an always-on cloud ARM exit node, Log2Ram, ZRAM, hardware watchdog recovery, systemd service pruning, automated weekly updates with rollback, Healthchecks.io + ntfy alerting, and a customized tty1 PADD dashboard.

Disclaimer: This guide documents a personal homelab build and tuning process, not a universal production architecture. Choices such as keeping Tailscale Override DNS servers enabled, advertising subnet routes and exit nodes alongside a cloud exit node, and keeping mDNS active reflect specific personal preferences and trade-offs.

  1. Hardware, Thermal Envelope & Local Display (tty1)

Compute Platform: Raspberry Pi Zero W Rev 1.1 (single-core ARMv6 CPU, limited RAM, 32-bit Raspberry Pi OS) running over wlan0 (<PI_LAN_IP>) with zero router port forwarding.

Why Single-Core Tuning Matters: Without multiple cores to absorb background spikes, frequent polling loops, heavy logging, or chatty background daemons can quickly push load up or stall interactive SSH/console work.

Thermal Management: A passive flat heatsink mounted directly to the SoC keeps steady-state temperatures around ~41.2°C without fan noise or fan failure points.

LCD Status Display & Mobile Access:

Drives an attached LCD on tty1 running customized PADD (v4.2.0) with status indicators, bracket formatting, and a Nebula: - status slot staged for future overlay testing.

Refresh loop tuned to sleep 10 inside padd.sh so PADD doesn't hammer a single ARMv6 core every second.

Customizations re-applied automatically via /usr/local/bin/apply-padd-custom.sh so PADD updates don't wipe out your layout tweaks.

Paired with a paddphone command so you can check the PADD dashboard from a mobile SSH session instead of walking over to the physical LCD.

2. Core Network Stack: Pi-hole, Unbound, Caddy & Tailscale

DNS Layer: Pi-hole + Unbound

Pi-hole (v6.6 / Web 6.6.1 / FTL 6.9): Handles network-wide ad/tracker blocking (~582,896 blocked domains, ~52% block rate across ~28 clients) and local DNS resolution.

Unbound: Acts as a local recursive DNS resolver (1 server configured, DNSSEC disabled on forwarder) so queries resolve recursively rather than depending solely on third-party public DNS resolvers.

Security Boundary: No router port forwarding is used, keeping DNS and local services off the public internet edge.

Reverse Proxy Layer: Caddy

Terminates internal HTTPS for self-hosted services using a local root certificate (<LOCAL_CA_CERT>) installed on desktop and mobile clients so browsers trust internal endpoints cleanly.

The router admin panel is intentionally kept off the reverse proxy rather than proxied through Caddy.

Mesh VPN & Cloud Exit Node: Tailscale

Configured to advertise both subnet routes and exit nodes on the Pi Zero W while working alongside an always-on cloud ARM exit node (<EXIT_NODE_HOSTNAME>).

Override DNS servers is enabled pointing to Pi-hole (<PIHOLE_TAILSCALE_IP>) with MagicDNS (<MAGICDNS_IP>) active so connected devices get ad/tracker blocking and MagicDNS name resolution.

3. SD-Card Longevity, Systemd Pruning & Self-Healing Maintenance

Protecting Flash Storage & Memory

Log2Ram: Keeps volatile logs in RAM and flushes cleanly to disk (~40% log usage, ~20% SD usage), cutting constant small writes to the microSD card.

ZRAM: Provides compressed swap in RAM so memory spikes avoid slow, wear-heavy microSD swap thrashing.

Hardware Watchdog: Enabled at the system level to recover automatically if the board locks up or hangs.

Systemd Service Pruning

Disabled non-essential services (fail2ban.service, ntfy-power.service, triggerhappy.socket) to keep single-core load comfortably below 1.00 (with single-core load able to dip to ~0.05 during quiet stretches), while keeping mDNS active.

Automated Weekly Updates, Rollback & Alerts

Scheduled Updates: Configured in /etc/default/pi-sunday-update to handle weekly updates across OS packages, Pi-hole, gravity lists, PADD, Tailscale, Unbound, Caddy, and Log2Ram.

Backup & Automatic Rollback: Uses a weekly overwriting backup paired with rollback if a boot or critical service fails after an update.

Monitoring & Notifications: Uses Healthchecks.io heartbeats together with ntfy email alerts so you receive up and down notifications.

4. Real-World Debugging: Tailscale Mobile "DNS unavailable" Warnings

What Happened

With Override DNS servers (<PIHOLE_TAILSCALE_IP>) and MagicDNS active, mobile Tailscale clients showed DNS unavailable health warnings and generated extra DNS retry chatter.

How It Was Fixed

Standardized device machine names in the Tailscale admin console (Machines > Edit machine name) to clean, lowercase hyphenated names.

That resolved the false mobile health warnings and cut down DNS retry noise without turning off Override DNS servers or MagicDNS.

5. Steady-State Benchmarks (~28 Clients) & Roadmap

Observed Performance

1-Minute CPU Load: 0.36 – 0.43 (5- and 15-min averages around ~0.49–0.55)

CPU Temperature: ~41.2°C steady state

Memory Usage: ~29.8% – 31.7% (with Log2Ram + ZRAM; ~94,100–94,800 DNS cache insertions and 0 deletions/evictions)

DNS Query Volume: 40 – 75 Qrs/min typical steady state, handling bursts up to 92–206 Qrs/min at ~1.1%–2.6% FTL CPU before settling back to ~60 Qrs/min

Future Roadmap

Nebula Overlay Network: Planned once the current Pi Zero W + cloud exit node stack remains settled, with a status indicator slot already staged on PADD.