Hosting on digitalocean

Hey y’all :raising_hand_man:

On my Ubuntu instance on digitalocean, if I run the following:

streamlit hello --browser.serverAddress --browser.serverPort 8502

I can get to the site via IP:

Here’s what it looks like:

However, if I try to load via the name provided:

I get the following:

The name ‘’ resolves to the above IP address.

Any suggestions are welcome!


OK, it looks like this has something to do with newer browsers and SSL…

If I test using Brave 1.62, the site works!

However, it doesn’t load in Brave 1.63.

Similar with Firefox. The site loads in Firefox 121:

However it times out in Firefox 122:

Here’s how I’m invoking the app:

streamlit hello --browser.serverAddress --browser.serverPort 8502

What’s a good way to run it on https?

If I run streamlit as follows:

streamlit hello \
    --browser.serverAddress \
    --browser.serverPort 8502 \
    --server.sslCertFile /etc/letsencrypt/live/ \
    --server.sslKeyFile /etc/letsencrypt/live/

It loads in a recent version of brave:

Note that I had to pass the fullchain.pem and privkey.pem files to streamlit so that http is enabled.

In order for streamlit to access the ssl files, I had to run it as root, which isn’t recommended. :sweat_smile:

See this answer for how to allow normal users access to the ssl files:

1 Like

OK, I got streamlit working with the following setup:

See this post for the configuration details:

1 Like

Hi @dharmatech I can’t give you specific help on DigitalOcean but my experience on Render has been excellent.

I have written detailed instructions on how to easily deploy on Render in another post.

It looks quite long but makes sense if you read the concepts.

1 Like

Thank you for sharing! :+1:

You’re welcome. I’m sorry I couldn’t be more specific with digital ocean.

1 Like