Run streamlit and close terminal

Hey everyone,

I’ve recently run into a problem and I’m yet to find a solution that works. I want to host a streamlit reports from a linux server (CentOS to be precise), and to do it, I create an ssh connection to the server and run the report, which works flawlessly. But now, I want to be able to close the terminal, without forcing the report to close as well.

I’ve tried the standard approaches to close terminal without closing running processes, but none have worked so far, so I’m thinking if there’s something specific related to streamlit that might help me solve this limitation?

Any help would be welcome.
Thanks.

To do so, use command below:
nohup streamlit run yourscript.py
You can google more about Linux command nohup by yourself.

You should use a terminal multiplexer such as tmux. To create a session:

tmux new -s myname
streamlit run app.py
Ctrl-b ctrl-d to detach from the session 

to later attach to this session again:
tmux a -t myname

you find a cheatsheet with all relevant commands on git: https://gist.github.com/MohamedAlaa/2961058
Hope that helps

Thanks @xzrokeman and @godot63 for your replies.
I managed to get it working with nohup even though I had already tried but was probably doing something wrong in the first place. But I will read more about tmux as it looks really good.

Again, thank you both very much.