Streamlit run --server.port 443 => Permission denied

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 <module>
  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

Hi @Steve_Chen -

If I’m understanding this correctly, you are running Streamlit from a Windows Server, which itself is running Ubuntu from Windows Subsystem for Linux? If so, I suspect the issue here is that you aren’t able to bind to port 443 because something else is already attached to that port.

Have you tried running from other ports to debug whether you can run a Streamlit app from that configuration at all?


Thank you so much for the reply.

Yes, I am running ubuntu in Windows server 2019.

Have you tried running from other ports to debug whether you can run a Streamlit app from that configuration at all?
Yes, I have tried other ports which worked fine, except port 443 and 80.

I got the Permission denied. Could you show me how to run streamlit with sudo? Thanks a lot!

Please refer Permission denied in ec2 port 80 - #6 by Steve_Chen

The reason I gone through these was because the web site I created using Streamlit is insecure! I have launched the web site but no one was willing to test because of it (insecure). I need to use https to make it a secure web site. Am I on the right track?

Let’s take a step back, so that we can be sure we’re solving for your specific case. Some questions:

  1. Do you have to use Windows server? Meaning, did this server already exist at work, and you’re trying to work within those constraints?
  2. Does this project need authentication and/or use sensitive data?
  3. Who are the people who won’t use the website because it’s “insecure”? Are you asking people to upload sensitive data?

The reason why I ask these questions is that depending on your answers, you might 1) try Streamlit sharing, 2) use a different EC2 image, 3) not really have an issue that https solves, and any number of other considerations.

One thing I can say while I wait for your answers is that just by putting the app on port 443 doesn’t automatically make it secure, you need an SSL certificate. This functionality is usually handled by using nginx or Apache as a reverse proxy, Streamlit doesn’t specifically include this type of functionality.

How you doing, Randy?

Yes, Streamlit sharing will solve my problem! I need it at this time. And eventually, once I launch the web site, I still need AWS EC2 to host it. You guys are doing a great job. When google purchase your Streamlit, you guys can retire in your early 30.

To answer your questions:

  1. auto-sklearn ONLY supports Linux. That’s why I ran Ubuntu inside the Windows. I don’t own the server. I used AWS EC2.
    2&3 Psychological speaking, when people see the insecure web address, they might just be scared to play with it. Yes, the users will upload the training data for machine learning.

Thank you so much for providing the help. Eventually, I still have figure out how to get https work!


1 Like

If that’s the case, you’ll have a much easier time if you use a Linux image directly, instead of Linux inside Windows.

Thank you so much for the reply.

Yes, Streamlit sharing will solve my problem! I need it at this time. I have already requested an invite to start sharing now! BUT I am still in the queue! Could you have me one more time? Thanks!

I’ll send a message to our internal folks today to get you set up :slight_smile:

I got it work! Thanks!

I got it work, BUT without auto-sklearn==0.10.0

If I add auto-sklearn==0.10.0 to the requirements.txt, I got error: command ‘swig’ failed with exit status 1. Please see attached error.png.

Below is requirements.txt
auto-sklearn==0.10.0 => if I take it out, it works!

I have tested the codes ( ) both in colab and ubuntu. It all works fine including auto-sklearn. But not work in Streamlit share!

Thanks once again. You guys are doing a great job.