Disable Grafana login screen

I have a homeasstant+grafana+influxdb setup running in docker containers, and configured with docker-compose. I have a few grafana graphs embedded as lovelace cards.

Problem: sometimes these grafana cards start asking a login/password.

I already tried number of options to suppress login screen and allow anonymous grafana access, but it still asks the password when loading those cards. Here is my grafana section of the docker-compose file

    container_name: grafana
    image: grafana/grafana:7.3.6
      - ./grafana:/var/lib/grafana
      - "3000:3000"
      - influxdb
    restart: always
    user: "grafana"

Does anybody know how to suppress the grafana login screen?

Not sure which version of Grafana you are using (we have Grafana Cloud 7.4.3), but we too were experiencing frequent logout issues. I raised the issue with Grafana support and after much trial & error (different settings, different browsers, etc.), we learned the following from Grafana support…

“I figured out what is going on: there have been some recent updates to the Grafana software to limit the number of login sessions by a single user account: specifically, a single user is limited to three concurrent sessions.”

In our case, we were using the same login on more than 3 PCs. Once we limit it to 3 PCs, we have not experienced any more logouts. Maybe that is what is affecting you.

I am using grafana 7.3.6
I indeed browse my HA page from 4 devices (2 via browser, and 2 via HA application at mobile phone). Is there a way to increase this limit?

That would be a question you need to ask Grafana. But it does indeed sound like your issue was caused by exceeding 3 login sessions with the same user ID.

I would clear the cookies. Especially if you are login to the same Grafana in that browser as you are loading iframed Grafana. In that case browser will be mixing authenticated and anonymous access. You can check also any errors in the browser console. You may have a cookie SameSite issue, when you are using Grafana in the iframe.