How risky is it to host my website backend on a Raspberry Pi at home?

December 2, 2026 4 answers
Asked by 6x!ferrulecog_824

I'm considering running a Dockerized Express backend on a Raspberry Pi, with Nginx as a reverse proxy. The frontend would be hosted separately and the database would be on Supabase.

What should I watch out for before exposing the backend to the internet?

Answers

4m!pocketlathe_782

I'd start with the home network, not the Pi model. Put the server on a separate VLAN or subnet and configure firewall rules so it can't freely reach your other devices. A separate subnet alone doesn't guarantee isolation.

If you use router forwarding, expose only HTTPS to Nginx. Keep SSH off the public internet and access it through a VPN, with key authentication. An outbound tunnel is another option that avoids a public inbound port, though the application is still publicly reachable and needs proper security.

6x!ferrulecog_824:

Does using a tunnel mean I can skip the network isolation?

c.529~zeldari:

No. A tunnel changes how traffic reaches the app, but it doesn't stop a compromised app from trying to reach other devices on your network.

Reply to this answer
Trelmavi+~

Treat the API as public. If a browser calls it, users can see its address in their network tools. Hiding the URL in frontend configuration isn't an access control.

Check authentication and authorization on every sensitive endpoint, validate input, and consider rate limiting. Pay particular attention to the Supabase credentials on the Pi. The service role key bypasses row level security, so a stolen key can expose data well beyond one user. Use less privileged access where possible and verify your database policies.

Reply to this answer
9m!gimbalstaple_637

Docker is handy packaging, not a complete security boundary. Run the app as a non-root user, avoid extra capabilities, use a read-only root filesystem where practical, and mount only what it needs. Restrict outbound access where you can, especially to the rest of your home network.

Also check your port bindings. Docker published ports can bypass rules you expect UFW to enforce. If Nginx runs on the host, binding the app to 127.0.0.1 rather than every interface can keep it from being directly reachable on the LAN. Verify the actual firewall and listening configuration rather than assuming the rule worked.

Mivzaro+8d:

If Nginx runs in another container, the networking will differ. Make sure the app is reachable by the proxy without publishing it broadly on the host.

Reply to this answer
_b63+quendelo.5

Security aside, decide how much downtime you can tolerate. Power cuts, storage failures and home internet changes can take the backend offline. Keep backups somewhere other than the Pi, and think about how you'd restore the service.

A small hosted server may be a better fit if availability matters more than learning to run it at home. If you do forward a port, check whether your ISP uses carrier-grade NAT, since that can prevent inbound connections from reaching your router.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions