How to apply a custom theme from a .toml file for a self-hosted Streamlit app

Hey Streamlit Community! :wave:

I’ve successfully customized my Streamlit app’s theme locally using the config.toml file with settings like primaryColor, backgroundColor, and textColor. Everything looks great when running the app locally.

However, after deploying the app on my self-hosted server, the theme changes don’t seem to reflect. The app still uses the default theme settings.

Here’s what I’ve done so far:

  • Edited the ~/.streamlit/config.toml file on my server.
  • Restarted the app after making the changes.

Locally, everything works perfectly, but I’m not sure how to make the theme changes reflect on the deployed version. Has anyone else encountered this issue or know how to fix it?

Any help would be much appreciated!

Thanks in advance!

What does your file structure look like on your host? Also, can you confirm from what working directory your host executes the streamlit run command?