Changing of port and multiple streamlit app

Hi, can I check if it’s possible to use other port besides the default 8501? If so, how do I set it? Can I also run multiple streamlit app on a VM, assuming I can set different ports?


Hi @zhun_t. Great question!

You can change the port by setting:


in your ~/.streamlit/config.toml.

Currently, you cannot set the port separately for multiple apps, but you won’t have to wait long! That feature has been implemented and is expected to land in 0.48 which will be released next week. Please follow that issue on Github for up-to-date information.

If you need a workaround right now, you could override ~/.streamlit/config.toml right before launching each server.

By the way, if you’re interested, you can see the full set of config options by running:

streamlit config show

from the command line.

1 Like

Hi there,
with Streamlit, version 0.56.0, I dont see the option for multiple servers. Neither --server.port nor --port. They both return no such option.
Thanks for ideas.

Can you show us the command you’re using to run a streamlit app? I can’t seem to reproduce your error.

> streamlit --server.port 8503 run                  
Usage: streamlit [OPTIONS] COMMAND [ARGS]...
Try "streamlit --help" for help.

Error: no such option: --server.port

just after your curiosity I tried

streamlit run --server.port 8503

and this worked. Sorry, thank you.


Yeah, the order was incorrect. Glad you managed to fix it :slight_smile:

streamlit run --server.port 443

I was trying to use port 443, but get error: Permission denied. Please help! (Running in AWS EC2: Window Server 2019 with ubuntu installed. Which means I ran ubuntu inside Windows Server)

(autosklearn) ntut@EC2AMAZ-CMJJ1M4:~$ streamlit run --server.port 443
Traceback (most recent call last):
File “/home/ntut/anaconda3/envs/autosklearn/bin/streamlit”, line 8, in
File “/home/ntut/anaconda3/envs/autosklearn/lib/python3.7/site-packages/click/”, line 829, in call
return self.main(*args, **kwargs)
File “/home/ntut/anaconda3/envs/autosklearn/lib/python3.7/site-packages/click/”, line 782, in main
rv = self.invoke(ctx)
File “/home/ntut/anaconda3/envs/autosklearn/lib/python3.7/site-packages/click/”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/ntut/anaconda3/envs/autosklearn/lib/python3.7/site-packages/click/”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/ntut/anaconda3/envs/autosklearn/lib/python3.7/site-packages/click/”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/ntut/anaconda3/envs/autosklearn/lib/python3.7/site-packages/streamlit/”, line 228, in main_run
_main_run(target, args)
File “/home/ntut/anaconda3/envs/autosklearn/lib/python3.7/site-packages/streamlit/”, line 256, in _main_run, command_line, args)
File “/home/ntut/anaconda3/envs/autosklearn/lib/python3.7/site-packages/streamlit/”, line 254, in run
File “/home/ntut/anaconda3/envs/autosklearn/lib/python3.7/site-packages/streamlit/server/”, line 301, in start
File “/home/ntut/anaconda3/envs/autosklearn/lib/python3.7/site-packages/streamlit/server/”, line 145, in start_listening
File “/home/ntut/anaconda3/envs/autosklearn/lib/python3.7/site-packages/streamlit/server/”, line 164, in start_listening_tcp_socket
http_server.listen(port, address)
File “/home/ntut/anaconda3/envs/autosklearn/lib/python3.7/site-packages/tornado/”, line 151, in listen
sockets = bind_sockets(port, address=address)
File “/home/ntut/anaconda3/envs/autosklearn/lib/python3.7/site-packages/tornado/”, line 174, in bind_sockets
PermissionError: [Errno 13] Permission denied

Here is some solutions to the Permission denied :
I found the “redir” solution the most convenient for testing :
sudo redir --laddr= --lport=80 --caddr= --cport=8501