I am curious what general recommendations are. I would like to set up the following application, ideally on one device (RPi4, 4GB):

  • InfluxDB and Grafana
  • PiHole
  • PiVPN and SSH
  • nginx (simple) webhosting
  • JupyterHub (eventually later)

Most application shall be reachable from outside. I use let's-encrypt for certificates (same device). I will be using fail2ban and UFW to secure the server.

Will this be too complex to set up? I managed to do all of them individually, but never together. e.g. complications like: PiHole wants to install lighttpd, but I have nginx installed already. I guess there are more.

Are there concerns about the security of the server?

Will there be performance issues with only a few users (<5)?


The number of server processes it is possible to have running in parallel is not a meaningful constraint, unless some of those processes require unusual amounts of memory even when doing nothing, which generally speaking server processes do not.

The constraint is how much those servers can do in parallel; you could overwhelm the Pi with only one given enough load.

So you have to determine what the typical load is going to be, find out by experimentation what this requires in terms of memory, processor use, and bandwidth. The last one is probably what will add up the fastest, ie., you won't be maxing out your RAM or processor because the servers will be limited by how much I/O they can do.

If this is for more or less personal use (<5 users), most likely you can run a quite a lot of things.

A while ago I wrote this for assessing the behavior of long running processes, primarily memory wise. It does not track I/O but there are such tools around which should be easy to find and use, eg.:

These popped up by searching "linux per process network usage". The brand of hardware isn't really relevant here so including "Raspberry Pi" in your searches will only limit then usually in odd ways.

complications like: PiHole wants to install lighttpd, but I have nginx installed already

This is sort of inevitable with port 80. Port conflicts are usually easily solved by just configuring something to use an arbitrarily different port. Eg., many people do not use port 22 for ssh because of all the bogus traffic this attracts (not an issue if you're just running it inside a LAN). All it means is anyone who wants to use ssh has to specify a different port than normal, something that can done via a command line switch or in a client configuration.

In the case of port 80, commonly used alternatives are 8080 and 8181. It doesn't matter much if this is just for in house access -- you can use any port and include it in the url after a colon: http://raspberrypi.local:1234. You could instead use https exclusively, which defaults to port 443. You will then need an X509 certificate; a "self-signed" one which should be fine for in house stuff can be generated on the pi with openssl or gnutls.

That alternate port approach seems like it could apply in the context of your nginx use if it is more awkward to set pihole to a different port. It may also be possible to integrate pihole with nginx. If not, you should be able to proxy it with nginx depending on what url paths are in use.

Questions about nginx use are more appropriate to our larger sibling sites, Unix & Linux and ServerFault, or possibly Stack Overflow, as the brand of hardware is again irrelevant and these are much larger communities.

| improve this answer | |
  • Thank you for the extensive reply. As for PiHole, I think it is less a proxy, more a DNS Server/Block, so that shouldn't be a problem. Can you elaborate on the complexity to set up multiple services on one device? – Markus May 9 at 15:24
  • Complexity of what? Running more than one server is totally normal, there's not any special added complexity beyond the obvious. Put another way, the total complexity of running three server processes on one machine is the sum of whatever you consider them to be individually, complexity wise. – goldilocks May 9 at 15:54
  • Excuse me, maybe I haven't expressed myself properly. I am currently struggling with getting PiHole and Nginx/Grafana to run in parallel. PiHole wants to use lighttp (port:80) and Nginx by default uses 80 too. For a beginner or the average Raspberry Pi user I think that counts as an additional layer of complexity. – Markus May 10 at 8:40
  • 1
    All apologies, that did not really jump out at me reading the question. I've edited some stuff in above. When you run across specific issues, you might as well hone in on those and ask specifically about them. We don't have a "discussion style" format where inviting people to brainstorm freely around a general topic is appropriate (if you have not yet take the tour to understand better how the site works). Put another way, your chances of getting a direct answer to a specific question are better if you ask it directly in the first place ;) – goldilocks May 11 at 14:39
  • Thank you! And sorry for the late reply. It was exactly what I was looking for. I had issues following the nginx-pihole integration. Instead I put nginx port to 8080 and chose a different source folder. From there on I put a reverse proxy to point to grafana (which is well documented online). I agree, these sub-topics can be deep, and are better suited for the sibling sites. Kind regards :) – Markus May 15 at 13:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.