# How to find token for Pluto running on a remote server?

**URL:** <https://discourse.julialang.org/t/how-to-find-token-for-pluto-running-on-a-remote-server/62056>\
**Category:** General Usage\
**Tags:** jupyter, security, pluto, remote\
**Created:** [May 29, 2021, 7:01pm UTC](https://discourse.julialang.org/t/how-to-find-token-for-pluto-running-on-a-remote-server/62056 "2021-05-29T19:01:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![yingqiuz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yingqiuz/32/25165_2.png) [@yingqiuz](https://discourse.julialang.org/u/yingqiuz)\
**Post date:** [May 29, 2021, 7:01pm UTC](https://discourse.julialang.org/t/how-to-find-token-for-pluto-running-on-a-remote-server/62056/1 "2021-05-29T19:01:04Z")

</div>

Hi

I am trying to run `Pluto.run(port=1235)` on a remote server. And the output showed

```julia
Go to http://localhost:1235/?secret=gMCHSxJl in your browser to start writing ~ have fun!

```

After I built the tunnel and tried to connect to the notebook, it always asked me for a Token, which was not the string after `?secret=`

Could anyone give me suggestions on how to find the token? I set `c.NotebookApp.token = ''` in `~/.jupyter/jupyter_notebook_config.py` but it didn’t work.

Thank you very much!

---

<div class="post-metadata">

**Author:** ![lungben](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lungben/32/12314_2.png) [@lungben](https://discourse.julialang.org/u/lungben)\
**Post date:** [May 29, 2021, 7:23pm UTC](https://discourse.julialang.org/t/how-to-find-token-for-pluto-running-on-a-remote-server/62056/2 "2021-05-29T19:23:08Z")

</div>

> [@yingqiuz](#):
>
> Could anyone give me suggestions on how to find the token? I set `c.NotebookApp.token = ''` in `~/.jupyter/jupyter_notebook_config.py` but it didn’t work.

Pluto is not related to Jupyter, therefore this cannot work.

It is possible to deactivate tokens completely, which makes sense when e.g. the Pluto server runs in a Docker container:

```julia
using Pluto
security_options = Pluto.Configuration.SecurityOptions(; require_secret_for_access=false)
Pluto.run(Pluto.Configuration.Options(; server=server_options, security=security_options))

```

---

<div class="post-metadata">

**Author:** ![yingqiuz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yingqiuz/32/25165_2.png) [@yingqiuz](https://discourse.julialang.org/u/yingqiuz)\
**Post date:** [May 29, 2021, 7:37pm UTC](https://discourse.julialang.org/t/how-to-find-token-for-pluto-running-on-a-remote-server/62056/3 "2021-05-29T19:37:43Z")

</div>

Thank you so much for your help. I thus run Pluto in this way

```julia
julia> Pluto.run(Pluto.Configuration.Options(;server=server_options, security=security_options))

Go to http://localhost:1235/ in your browser to start writing ~ have fun!

Press Ctrl+C in this terminal to stop Pluto

```

However, the webpage still shows `Token authentication is enabled`, and keeps telling “invalid credentials” when I typed in something.

How to solve this?  
Thanks again!

---

<div class="post-metadata">

**Author:** ![Satvik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/satvik/32/20486_2.png) [@Satvik](https://discourse.julialang.org/u/Satvik)\
**Post date:** [May 29, 2021, 7:38pm UTC](https://discourse.julialang.org/t/how-to-find-token-for-pluto-running-on-a-remote-server/62056/4 "2021-05-29T19:38:35Z")

</div>

This is not a direct answer, but if you don’t need the security token, you can do `using Pluto; Pluto.run(;require_secret_for_open_links=false, require_secret_for_access=false)`

---

<div class="post-metadata">

**Author:** ![yingqiuz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yingqiuz/32/25165_2.png) [@yingqiuz](https://discourse.julialang.org/u/yingqiuz)\
**Post date:** [May 29, 2021, 7:40pm UTC](https://discourse.julialang.org/t/how-to-find-token-for-pluto-running-on-a-remote-server/62056/5 "2021-05-29T19:40:04Z")

</div>

Thank you for your answer, but I’ve tried this and the browser still told me token authentication is enabled… Spent the whole afternoon on this and it’s driven me a bit mad…

---

<div class="post-metadata">

**Author:** ![yingqiuz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yingqiuz/32/25165_2.png) [@yingqiuz](https://discourse.julialang.org/u/yingqiuz)\
**Post date:** [May 30, 2021, 7:19pm UTC](https://discourse.julialang.org/t/how-to-find-token-for-pluto-running-on-a-remote-server/62056/6 "2021-05-30T19:19:30Z")

</div>

Finally I found out the cause: I forwarded the port twice to a specific node, while the second got broken and I didn’t notice it.
