# Gradio authentication with Docker powered space

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-authentication-with-docker-powered-space%2F31738%3E%5C
**Category:** 🔒 Gradio\
**Created:** [February 15, 2023, 3:48am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-authentication-with-docker-powered-space%2F31738 "2023-02-15T03:48:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamrobotbear](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/iamrobotbear/32/14097_2.png) [@iamrobotbear](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fiamrobotbear)%5C
**Post date:** [February 15, 2023, 3:48am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-authentication-with-docker-powered-space%2F31738%2F1 "2023-02-15T03:48:22Z")

</div>

Hello,

I have a cloned/duplicated copy of @camenduru’s Stable Diffusion Web UI and it’s great, running on Docker via Huggingface Spaces - thank you!

However, I’m attempting to add Gradio authentication to the app via @Omnibus’s implementation or literally any Gradio based authentication.

- [Password Protected Space - a Hugging Face Space by Omnibus](https://huggingface.co/spaces/Omnibus/Password-Space)

The space builds fine, however, it doesn’t seem to actually ask for any authentication.

Any assistance would be greatly appreciated!

Thanks!

- My Dockerfile: [Dockerfile · iamrobotbear/webui-docker at main](https://huggingface.co/spaces/iamrobotbear/webui-docker/blob/main/Dockerfile)

- Launch: [oh-no.py · iamrobotbear/webui-docker at main](https://huggingface.co/spaces/iamrobotbear/webui-docker/blob/main/oh-no.py)

---

<div class="post-metadata">

**Author:** ![iamrobotbear](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/iamrobotbear/32/14097_2.png) [@iamrobotbear](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fiamrobotbear)%5C
**Post date:** [February 15, 2023, 3:55am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-authentication-with-docker-powered-space%2F31738%2F2 "2023-02-15T03:55:13Z")

</div>

@freddyaboulton I saw you merged a fix - any idea how to make this work?

Thanks!

---

<div class="post-metadata">

**Author:** ![freddyaboulton](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/freddyaboulton/32/32732_2.png) [@freddyaboulton](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ffreddyaboulton)%5C
**Post date:** [February 15, 2023, 2:44pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-authentication-with-docker-powered-space%2F31738%2F3 "2023-02-15T14:44:36Z")

</div>

Hi @iamrobotbear ! The fix for gradio auth on Spaces got released in version 3.17.0.

What version is the stable diffusion web ui using in your space? No super familiar with how the auto1111 web ui is structured but wherever the app is launched, you should be able to do “app.launch(auth=(username,password))”

---

<div class="post-metadata">

**Author:** ![iamrobotbear](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/iamrobotbear/32/14097_2.png) [@iamrobotbear](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fiamrobotbear)%5C
**Post date:** [February 15, 2023, 5:08pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-authentication-with-docker-powered-space%2F31738%2F4 "2023-02-15T17:08:48Z")

</div>

Ooh, maybe that’s the issue is the version of Gradio is outdated @freddyaboulton.

@camenduru If I wanted to override the version of Gradio installed as it looks like the auto1111 requirements.txt file calls for version 3.16.2 can I simply add a `RUN pip install gradio==3.17.0` to my Dockerfile would this update it or do I need to do something else?

> <https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/master/requirements.txt>

---

<div class="post-metadata">

**Author:** ![camenduru](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/camenduru/32/12300_2.png) [@camenduru](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fcamenduru)%5C
**Post date:** [February 15, 2023, 5:33pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-authentication-with-docker-powered-space%2F31738%2F5 "2023-02-15T17:33:11Z")

</div>

Hi @iamrobotbear 👋 maybe this helps

> You may set up authentication for said gradio shared instance with the flag `--gradio-auth username:password` , optionally providing multiple sets of usernames and passwords separated by commas.

from [Command Line Arguments and Settings · AUTOMATIC1111/stable-diffusion-webui Wiki · GitHub](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings)
