Selfhost your streamlit instance, now slightly easier

Hello!

I made this script on github to streamline the deployment of your streamlit projects on the local network. I tend to selfhost everything, and this is the case with streamlit as well. The script makes use of streamlit’s --server.port flag, and the rest is just basic bash scripting (note: I’m using an Ubuntu server).

How to use the script:

Edit secret.sh with your information, then just:

chmod +x secret.sh # one time thing
./secret.sh # start it like this from now

There is a suggestion for crontab in the readme as well (to make sure the different scripts run in case the server reboots).

The script does not guide you through hosting on a domain, although now that the streamlit scripts are running any guide on reverse proxying with nginx (or specifically nginx proxy manager, the easy option) will work.

2 Likes