brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: set timestamps and a time range in the portainer log view instead of scrolling

Portainer
~/tips/tip-portainer-container-logs-timestamps-lines

docker logs --timestamps --tail 1000 --since 30m mycontainer

Uses the display options of the container log page to find a specific time or message.

The log page of a container has a few options that I tend to forget, and they save a lot of scrolling.

docker logs --timestamps --tail 1000 --since 30m mycontainer

In the Logs tab, Timestamp prefixes each line with a time, Lines limits how many lines are fetched (1000 by default) and the date picker selects a period. Search with Filter search results shows only the matching lines, and Download logs downloads the log.

The docker command above is the terminal equivalent. A raised Lines value on a chatty container can make the page slow, so narrow the time range first.

Further reading: Portainer docs: View container logs

More Portainer tips Choose Polling in a Portainer GitOps update when your Git host can't reach Portainer Put Portainer environments in groups and give users access to a whole group Portainer's Edge Agent checks in every 5 seconds, and you can change that docker run -d -p 9001:9001 --name portainer_agent --restart=always \ Deploy the container → Replace All Portainer tips (28) All topics

Link