# Local Installation Autotrain Token Issue

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Flocal-installation-autotrain-token-issue%2F114441%3E%5C
**Category:** Beginners\
**Created:** [October 28, 2024, 9:45pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Flocal-installation-autotrain-token-issue%2F114441 "2024-10-28T21:45:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yupete](https://avatars.discourse-cdn.com/v4/letter/y/d78d45/32.png) [@yupete](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fyupete)%5C
**Post date:** [October 28, 2024, 9:45pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Flocal-installation-autotrain-token-issue%2F114441%2F1 "2024-10-28T21:45:28Z")

</div>

Hi Everyone,  
I am having trouble running autotrain locally. I have done all the setup detailed in [GitHub - huggingface/autotrain-advanced: 🤗 AutoTrain Advanced](https://github.com/huggingface/autotrain-advanced) but when I go to localhost:8080 i get HF\_TOKEN invalid or expired. I have exported the token in my conda session but still it doesn’t seem to work. Is there a doc that I am supposed to edit that I don’t know of? If so, where is this doc as I only see autotrain, autotrain.db, and autotrain.log in the current directory. Thank You!

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [October 29, 2024, 5:56am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Flocal-installation-autotrain-token-issue%2F114441%2F2 "2024-10-29T05:56:56Z")

</div>

I think it has to be set in an environment variable. If it still doesn’t work, it may be a bug.

> <https://github.com/huggingface/autotrain-advanced/issues/578>
>
> \### Prerequisites
> 
> \- \[X\] I have read the \[documentation\](https://hf.co/docs/au…totrain).
> \- \[X\] I have checked other issues for similar problems.
> 
> \### Backend
> 
> Local
> 
> \### Interface Used
> 
> CLI
> 
> \### CLI Command
> 
> autotrain app
> 
> \### UI Screenshots & Parameters
> 
> I have set HF\_TOKEN env variable locally (verified by doing \`echo $HF\_TOKEN\`)
> 
> \### Error Logs
> 
> \`\`\`
> (base) ➜ ~ autotrain app \[24/04/10| 2:34AM\]
> \> ERROR HF\_TOKEN not set
> Traceback (most recent call last):
> File "/Users/dhruvanand/miniforge3/bin/autotrain", line 8, in \<module\>
> sys.exit(main())
> File "/Users/dhruvanand/miniforge3/lib/python3.10/site-packages/autotrain/cli/autotrain.py", line 50, in main
> command.run()
> File "/Users/dhruvanand/miniforge3/lib/python3.10/site-packages/autotrain/cli/run\_app.py", line 51, in run
> from autotrain.app import app
> File "/Users/dhruvanand/miniforge3/lib/python3.10/site-packages/autotrain/app.py", line 38, in \<module\>
> raise ValueError("HF\_TOKEN environment variable is not set")
> ValueError: HF\_TOKEN environment variable is not set
> \`\`\`
> 
> \### Additional Information
> 
> I read through https://github.com/huggingface/autotrain-advanced/issues/279
