The numbers on the Portainer home page are not live. They come from snapshots, and the default is every five minutes.
You can change it in Settings under Snapshot interval, or when you start the container with a flag:
--snapshot-interval 1m
The value is a duration string like 30s, 5m or 1h, anything Go’s time.ParseDuration accepts. The snapshot feeds the home page data and basic environment info, so a short interval makes it look fresher.
The caveat is the cost. Every snapshot talks to each environment you connected. With a couple of local containers that is nothing, but with many remote environments I would lower the interval carefully, and I would not go to seconds.
The default of five minutes is fine for most people. I would only change it if you stare at the home page and wonder why the counts are behind. The same value can also be set in the UI, so you do not have to touch the run command if the container is already running.
A longer interval does the opposite. If you have several remote environments, --snapshot-interval 15m means fewer requests going out, and the home page is a little less current. That is a fair trade for a quiet setup.
Further reading: CLI configuration, General settings, On this site: hide the containers you never want to see in Portainer with –hide-label, On this site: browse and upload files inside a Docker volume from Portainer