Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get password after starting / initializing the docker container #50

Open
JVT038 opened this issue Mar 9, 2022 · 2 comments
Open

Get password after starting / initializing the docker container #50

JVT038 opened this issue Mar 9, 2022 · 2 comments

Comments

@JVT038
Copy link

JVT038 commented Mar 9, 2022

Hi,
I want to add a new client to the protonmail-bridge container, however I don't know the password.
How do I get back into the protonmail-cli and fetch my account info?

@arifer612
Copy link

There are 2 ways to do this. The first is to stop the container and start an interactive container and the second is to kill the relevant processes and start afresh.

First method (recommended)

  1. Stop your protonmail-bridge container and enter the interactive shell
docker stop protonmail-bridge
docker run --rm -it -v protonmail:/root shenxn/protonmail-bridge init
  1. Once you are in the container, just wait until protonmail-bridge has initialised. You will be able to see an ASCII image of a bridge when that happens:
         Welcome to ProtonMail Bridge interactive shell
                           ___....___
 ^^                __..-:'':__:..:__:'':-..__
               _.-:__:.-:'':  :  :  :'':-.:__:-._
             .':.-:  :  :  :  :  :  :  :  :  :._:'.
          _ :.':  :  :  :  :  :  :  :  :  :  :  :'.: _
         [ ]:  :  :  :  :  :  :  :  :  :  :  :  :  :[ ]
         [ ]:  :  :  :  :  :  :  :  :  :  :  :  :  :[ ]
:::::::::[ ]:__:__:__:__:__:__:__:__:__:__:__:__:__:[ ]:::::::::::
!!!!!!!!![ ]!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!![ ]!!!!!!!!!!!
^^^^^^^^^[ ]^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[ ]^^^^^^^^^^^
         [ ]                                        [ ]
         [ ]                                        [ ]
   jgs   [ ]                                        [ ]
 ~~^_~^~/   \~^-~^~ _~^-~_^~-^~_^~~-^~_~^~-~_~-^~_^/   \~^ ~~_ ^
>>>
  1. You can now do whatever you wish to do. For example, you can get the password by running info in the interactive shell. Once done, exit the container and restart your main daemonised container.
exit
docker restart protonmail-bridge

Second method

  1. Enter the interactive shell for your protonmail-bridge container through the following:
docker exec -ti protonmail-bridge /bin/bash
  1. Kill all relevant processes and restart protonmail-bridge
ps aux | grep [b]ridge | awk '{print $2}' | xargs -I {} kill -9 {}
./entrypoint.sh init
  1. Wait until protonmail-bridge has initialised. You will be able to see an ASCII image of a bridge when that happens:
         Welcome to ProtonMail Bridge interactive shell
                           ___....___
 ^^                __..-:'':__:..:__:'':-..__
               _.-:__:.-:'':  :  :  :'':-.:__:-._
             .':.-:  :  :  :  :  :  :  :  :  :._:'.
          _ :.':  :  :  :  :  :  :  :  :  :  :  :'.: _
         [ ]:  :  :  :  :  :  :  :  :  :  :  :  :  :[ ]
         [ ]:  :  :  :  :  :  :  :  :  :  :  :  :  :[ ]
:::::::::[ ]:__:__:__:__:__:__:__:__:__:__:__:__:__:[ ]:::::::::::
!!!!!!!!![ ]!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!![ ]!!!!!!!!!!!
^^^^^^^^^[ ]^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[ ]^^^^^^^^^^^
         [ ]                                        [ ]
         [ ]                                        [ ]
   jgs   [ ]                                        [ ]
 ~~^_~^~/   \~^-~^~ _~^-~_^~-^~_^~~-^~_~^~-~_~-^~_^/   \~^ ~~_ ^
>>>
  1. You can now do whatever you wish to do. For example, you can get the password by running info in the interactive shell. Once done, exit the interactive shell and you are good to go!

@Darkdragon84
Copy link

Hi! First of all thanks for the awesome image, it's so great that the bridge generated password persists across container restarts!

I too would love to have a way to interact with the console every now and then. However, I find it a bit unhandy to having to stop the container, run it with init, stop and remove again and restart the bridge. Isn't there a way to attach to the running bridge service? I suppose the difficulty arises from the faketty?

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants