I am trying to create a zrok share for ssh. Downloaded the docker compose.yml for private share, and followed the steps. To allow my remote laptop using different zrok account, I set the following:
ZROK_UNIQUE_NAME: myssh
ZROK_BACKEND_MODE: tcpTunnel
ZROK_TARGET: localhost:22
ZROK_ACCESS_GRANTS: “myemail@gmail.com”
Run docker compose up works fine. In my client workstation, I ran “zrok access private myssh” but it gives me this error:
[ERROR]: unable to create private access ([POST /access][401] accessUnauthorized)
Tried to use ZROK_SHARE_OPTS: "--access-grant myemail@gmail.com" instead, and it works.
Hi
This is not a Zrok problem; rather, it's a formatting error with Docker Compose.ZROK_ACCESS_GRANTS is taken literally. Zrok creates the share with no valid grant → 401 on access because quotes, particularly smart quotes, are included.
Use it as a list or without quotes:
* `ZROK_ACCESS_GRANTS: myemail@gmail.com` * or a list in YAMLZROK_SHARE_OPTS` avoids env parsing peculiarities and follows the CLI path, which is why it works.
I tried your advice, commented out ZROK_SHARE_OPTS, uncommented and set ZROK_ACCESS_GRANTS with 1 email without qoutes (““). Purged docker containers and volume, run docker compose up. At the client side, run zrok access private myssh but got the error:
[ERROR]: unable to create private access ([POST /access][401] accessUnauthorized)