low space

On my server (with docker) i have sometime the space of the root directory to 0%

df -h
Filesystem                    Size  Used Avail Use% Mounted on
tmpfs                          86M   11M   75M  13% /run
/dev/sda2                      20G   20G     0 100% /
tmpfs                         476M     0  476M   0% /dev/shm
tmpfs                         5,0M     0  5,0M   0% /run/lock
192.212.40.6:/6-40-SystemSvg  227G   32G  184G  15% /SystemSvg
192.212.40.6:/9-VideoClub     1,8T  774G  967G  45% /VideoClub
tmpfs                         146M  8,0K  146M   1% /run/user/1000

docker clean non essential stuff

docker system prune -a
docker volume rm $(docker volume ls -qf dangling=true)
docker system prune --all --volumes --force

empty trash

rm -rf ~/.local/share/Trash/*

or

sudo apt install trash-cli
trash-empty

system clean sweep

sudo apt-get autoremove
sudo apt-get clean
sudo apt-get autoclean

find big stuff in file system

sudo du -h --max-depth=1 | sort -h
0       ./dev
0       ./proc
0       ./sys
4,0K    ./cdrom
4,0K    ./media
4,0K    ./mnt
4,0K    ./srv
4,0K    ./VideoClub
16K     ./lost+found
16K     ./opt
52K     ./root
60K     ./home
68K     ./tmp
1,3M    ./run
6,7M    ./etc
428M    ./boot
823M    ./SystemSvg
1,7G    ./snap
4,7G    ./var
9,9G    ./usr
20G     .

limit log in container

https://forums.docker.com/t/some-way-to-clean-up-identify-contents-of-var-lib-docker-overlay/30604/53

<service_name>
	logging:
		options:
			max-size: "10m"
			max-file: "5"

https://forums.docker.com/t/some-way-to-clean-up-identify-contents-of-var-lib-docker-overlay/30604/52

/etc/docker/daemon.json

{
  "log-opts": {
    "max-size": "10m",
    "max-file": "5"
  }
}

dont forget the “,” if they have allready param in daemon.json

Add Weather Station

source

https://github.com/maliciamrg/Bresser-Weather-Station

dns

xampp install

xamp server
sudo apt update -y
sudo apt upgrade -y
wget "https://downloads.sourceforge.net/project/xampp/XAMPP%20Linux/8.2.4/xampp-linux-x64-8.2.4-0-installer.run?use_mirror=netix&download=" -O xampp-linux-x64-8.2.4-0-installer.run
sudo ./xampp-linux-x64-8.2.4-0-installer.run
sudo usermod -aG daemon david
sudo chown -R daemon:daemon /opt/lampp/htdocs
sudo chmod g+w /opt/lampp/htdocs

result :

auto start xampp server at ubuntu startup:

sudo nano /etc/systemd/system/xampp.service
[Unit]
Description=XAMPP

[Service]
ExecStart=/opt/lampp/lampp start
ExecStop=/opt/lampp/lampp stop
Type=forking

[Install]
WantedBy=multi-user.target
sudo systemctl enable xampp.service
sudo reboot

after reboot

scripting

sudo apt update
sudo apt install php-cli unzip -y
cd ~
curl -sS https://getcomposer.org/installer -o composer-setup.php
HASH=`curl -sS https://composer.github.io/installer.sig`
php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
cd /opt/lampp/htdocs
mkdir weatherstation
cd weatherstation

install php app

sudo git clone https://github.com/maliciamrg/Bresser-Weather-Station.git .
sudo composer require php-mqtt/client
sudo chown -R daemon:daemon /opt/lampp/htdocs

result

pfsense

in pfsense allow MQTT traffic from VLAN 10 and VLAN 20 to VLAN 30 on port 1883, where your Mosquitto broker lives (192.212.30.105)

✅ Steps to Add Rules in pfSense

You’ll need to add two rules — one on each VLAN interface (VLAN 10 and VLAN 20):

🔧 On VLAN 10 Interface:

  1. Go to pfSense Web UIFirewall → Rules → VLAN 10
  2. Click “Add” rule at the top
  3. Set:
    • Action: Pass
    • Interface: VLAN 10
    • Protocol: TCP
    • Source: Single host or alias → 192.212.10.200
    • Destination: Single host → 192.212.30.105
    • Destination port range: From 1883 to 1883
    • Description: Allow MQTT from VLAN 10
  4. Save and Apply Changes

🔧 On VLAN 20 Interface:

Repeat the same steps:

  1. Go to Firewall → Rules → VLAN 20
  2. Add rule with:
    • Source: 192.212.20.250
    • Destination: 192.212.30.105
    • Port: 1883
    • Description: Allow MQTT from VLAN 20
  3. Save and Apply Changes

🧪 Optional: Make It More Flexible

If you want any device on VLAN 10 or VLAN 20 to reach the MQTT broker, just change the source from single host to:

  • Source: VLAN 10 net
  • Source: VLAN 20 net

That way, all devices on those VLANs can connect.

test

http://192.212.20.250/weatherstation/updateweatherstation.php?ID=IANTON13&PASSWORD=nY2hD3eO&action=updateraww&realtime=1&rtfreq=5&dateutc=now&baromin=29.91&tempf=75.9&dewptf=60.4&humidity=59&windspeedmph=3.5&windgustmph=4.0&winddir=45&rainin=0.0&dailyrainin=0.0&indoortempf=81.1&indoorhumidity=53

controle

http://192.212.20.250/weatherstation/updateweatherstation.php