New user; Couple of questions

Hello. My Rpi 3 PiHole started to be unresponsive. Someone suggested to install DietPi so I did, ableit i am not sure how much lighter you can go from Raspberry Pi OS terminal.

1-My question is on updating. How do I update the OS and all the apps ? I was told I must do it from the DietPi launcher. On Raspberry Pi I used to run this script:

sudo pihole -g &&
sudo pihole -up -y &&
sudo apt-get update -y &&
sudo apt-get upgrade -y &&
sudo apt-get update -y &&
sudo reboot now

2-when I installed PiHole it was told I must access the admin from:

https://(ip-address):8489/admin

but I uploaded a backup config via teleporter and now I can access it from here (no https:)

http://(ip-address)/admin

what happened?

you can use apt update && upgrade withour issues. It will update all Debian packages manages by apt package manager

To update DietPi own scripts, you can use dietpi-update. This will include apt package updates as well. System Maintenance - DietPi.com Docs

There is no general answer as it depends on the related app. Some uses internal update functions like PiHole does. For most of the apps we described the update procedure on our online docs. DNS Servers Options - DietPi.com Docs

correct

basically you answered your own question.

This changed all settings back to what you had before on the original system

Regarding the web UI port:

  • We change it by default so hat Pi-hole does not collide with regular webservers on 80/443. But if you do not plan to install an application with a regular webserver, no issues to keep Pi-hole on those ports. I would still enable and use HTTPS, in that case on regular port 443:
    sudo pihole-FTL --config webserver.port 80,443s
    
    Then https://(ip-address)/admin works as well. I know I know, just a trusted home network. But DNS is a critical part of Internet security, and you never know who might get access to your LAN whichever way through an insecure device or bug. Is has no real downsides to just consequently encrypt all network traffic even at home within the LAN :slightly_smiling_face:.
  • To restore DietPi default ports, in case you do install a webserver at some point:
    sudo pihole-FTL --config webserver.port 8089,8489s
    

thanks everything working great

the only problem is I added dietpi-update to the script but it tells me:

6: dietpi-update: not found

here is my script in update.sh executable file:

sudo pihole -g &&

sudo pihole -up -y &&

sudo apt-get update -y &&

sudo apt-get upgrade -y &&

sudo apt-get update -y &&

dietpi-update &&

sudo reboot now

i tried : sudo dietpi-update but did not work either

if i type dietpi-update in the terminal directly it works

You would need to use full path instead of command only

If I am not mistaken, pihole -up implies a gravity update, and otherwise it is done weekly by some cron job or systemd timer. Also you do not need to run apt-get update twice. If you want to apply the dietpi-update without dialogue, in case one is available, pass 1 as argument. I.e. this would work:

sudo pihole -up -y &&
sudo apt-get update -y &&
sudo apt-get upgrade -y &&
/boot/dietpi/dietpi-update 1 &&
sudo reboot

Unlike maybe on Windows, a Linux server only really needs to be restarted after a kernel upgrade. In that case, also dietpi-update will prompt you about that with a dialogue … though only if an actual DietPi update was applied. You could do this instead to do only after a kernel upgrade via apt-get if the old kernel was removed in the same turn:

...
[ -d "/lib/modules/$(uname -r)" ] &&
sudo reboot

Sidenote: reboot does not require the now argument. Only in shutdown now it makes sense, but then one can better use poweroff.

ah, great!

many thanks!