Custom domain name

Hello everybody!

Does streamlit support custom domain name of apps? After deploying an app instead of having can I have my own domain name? Thanks!

You can deploy your app on and heroku has an option to use a custom domain in settings. To deploy an app on heroku you have to add two files to your repo on github.

mkdir -p ~/.streamlit/

echo "
headless = true\n
port = $PORT\n
enableCORS = false\n
" > ~/.streamlit/config.toml


web: sh && streamlit run

Just change the app name in the Procfile. The rest is a copy paste

1 Like

Huge thank you! You are my life-saver!
Any idea how I can setup the secrets.toml (has passwords) file from streamlit to be read in heruko without pushing it in git as it has sensitive info? I saw that in heruko there is config vars where I can setup sensitive variables but I was wondering if there is a way to directly take it secrets.toml

Hi @ngocuong0105 ,

you can you Heroku environment variables to store the secrets
Configuration and Config Vars | Heroku Dev Center

and then read them within streamlit, like this

import os
DB_PSSWD = os.environ.get('DB_PSSWD')