diff --git a/docs/tutorials/installation.rst b/docs/tutorials/installation.rst index aef96d5a..ee4698bb 100644 --- a/docs/tutorials/installation.rst +++ b/docs/tutorials/installation.rst @@ -36,18 +36,18 @@ Hence the typical way to launch the container with docker runtime would be:: $ CONFIG=$HOME/.config/gphotos-sync $ STORAGE=$HOME/My_photos_backup - $ docker run --rm -v $CONFIG:/config -v $STORAGE:/storage --net=host -it ghcr.io/gilesknap/gphotos-sync /storage + $ docker run --rm -v $CONFIG:/config -v $STORAGE:/storage -p 8080:8080 -it ghcr.io/gilesknap/gphotos-sync /storage -The options --net=host -it are required for the first invocation only, so that the -browser can find authentication service. +The options ``-p 8080:8080 -it`` are required for the first invocation only, +so that the browser can find authentication service. Note that the authentication flow uses a redirect url that sends authentication token back to the process. The default redirect is localhost:8080 and you can adjust the port with ``--port``. The -flow only accepts localhost for security reasons so the first run must always +flow only allows localhost for security reasons so the first run must always be done on a machine with a browser. -Note that if you are running on a NAS or other headless server you will first +If you are running on a NAS or other headless server you will first need to run locally so that you can do initial login flow with a browser. Then copy /.gphotos.token to the server. For this first run you could use the following options so that no backup is performed: diff --git a/src/gphotos_sync/authorize.py b/src/gphotos_sync/authorize.py index 92da7150..488ad2f6 100644 --- a/src/gphotos_sync/authorize.py +++ b/src/gphotos_sync/authorize.py @@ -93,7 +93,7 @@ def authorize(self): ) # localhost and bind to 0.0.0.0 always works even in a container. flow.run_local_server( - open_browser=False, bind_host="0.0.0.0", port=self.port + open_browser=False, bind_addr="0.0.0.0", port=self.port ) self.session = flow.authorized_session()