Streamlit blocks on onboarding email prompt when running as Windows service (NSSM)

Hi Streamlit team,

I am running a Streamlit app on an on-prem Windows Server as a Windows service using NSSM.

Problem:
When started as a service, Streamlit always blocks on the onboarding email prompt, and the app never opens its port.

stdout shows:

Welcome to Streamlit!
If you'd like to receive helpful onboarding emails...
Email:

stderr shows:

input(): lost sys.stdin

As a result:

  • Service shows RUNNING / START_PENDING

  • netstat shows no listener

  • Browser gets “connection refused”

What I have already tried (all of these):

  • headless = true in .streamlit/config.toml

  • [browser] gatherUsageStats = false

  • Setting env vars via NSSM:

    • STREAMLIT_BROWSER_GATHER_USAGE_STATS=false

    • STREAMLIT_CONFIG_DIR=...

    • STREAMLIT_EMAIL=

  • Running with stdin detached (NUL) in NSSM

  • Running without stdin (still triggers onboarding)

Running streamlit run app.py manually works fine.
The issue only occurs when running as a Windows service (no interactive stdin).

Questions:

  1. Is there an official way to completely disable the onboarding / email prompt for non-interactive service environments?

  2. Is this a known issue on Windows services?

  3. Is upgrading Streamlit the only supported workaround?

Any guidance for production Windows service deployments would be appreciated.

Thanks!