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

Hi

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

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!

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:

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

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

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!

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)

2 Likes

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…

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.