Zrok self-hosted zrok-controller doesn't run

I installed zrok on my vps using guide here Self-hosting guide for Docker | Zrok
But when i check the zrok-controller doesn't run
Here the logs:

zrok-controller-1 | + for arg in "${@}"
zrok-controller-1 | + [[ ! zrok =~ ^- ]]
zrok-controller-1 | + [[ -s zrok ]]
zrok-controller-1 | + for arg in "${@}"
zrok-controller-1 | + [[ ! controller =~ ^- ]]
zrok-controller-1 | + [[ -s controller ]]
zrok-controller-1 | + for arg in "${@}"
zrok-controller-1 | + [[ ! /etc/zrok-controller/config.yml =~ ^- ]]
zrok-controller-1 | + [[ -s /etc/zrok-controller/config.yml ]]
zrok-controller-1 | + CONFIG=/etc/zrok-controller/config.yml
zrok-controller-1 | + break
zrok-controller-1 | + [[ -z /etc/zrok-controller/config.yml ]]
zrok-controller-1 | + zrok admin bootstrap --skip-frontend /etc/zrok-controller/config.yml
zrok-controller-1 | panic: expecting configuration version '4', your configuration is version '3'; please see zrok.io for changelog and configuration documentation
zrok-controller-1 |
zrok-controller-1 | goroutine 1 [running]:
zrok-controller-1 | main.(*adminBootstrap).run(0xc00076b860, 0xc00073fbb0?, {0xc00028c1e0?, 0x0?, 0x0?})
zrok-controller-1 | /home/runner/work/zrok/zrok/cmd/zrok/adminBootstrap.go:36 +0x106
zrok-controller-1 | github.com/spf13/cobra.(*Command).execute(0xc0007cef08, {0xc00028c1c0, 0x2, 0x2})
zrok-controller-1 | /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:987 +0xab1
zrok-controller-1 | github.com/spf13/cobra.(*Command).ExecuteC(0x4fbf080)
zrok-controller-1 | /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x3ff
zrok-controller-1 | github.com/spf13/cobra.(*Command).Execute(...)
zrok-controller-1 | /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039
zrok-controller-1 | main.main()
zrok-controller-1 | /home/runner/work/zrok/zrok/cmd/zrok/main.go:106 +0x1a

Looks like the config version has changed but the container is somehow producing an older version. The container will need to be updated before this will work. I'll file an issue for this and post back the link

You can temporarily set the environment variable ZROK_CTRL_CONFIG_VERSION=4 and you will be up and running.

Sorry but where should I put this in?

Pretty sure ou'd pass that to docker wherever you're running zrok. Probably in the .env file would work, I'd think

Thanks for the replay. The container is running, but i can't connect to the web console at http://zrok.*:18080. I allow 443,1280,3022,18080,8080,8081 ports

You can pin a zrok version before the v4 config was introduced by setting ZROK_CLI_TAG=0.4.30 in your compose environment.

It sounds like you've allowed these ports in the firewall, but perhaps you're publishing the insecure ports only to localhost (the default).

To publish the insecure ports on the public IP you can set this in your compose env.

ZROK_INSECURE_INTERFACE=0.0.0.0

Thank you very much. I got zrok running successfully and smoothly as well.

1 Like

Alright! That's fantastic. Are zrok shares working for you so far? I'm curious which share modes you tried: proxy, web, drive, socks, vpn, tcp, udp, caddy.

Also, the insecure ports aren't published by default to avoid someone snooping and impersonating your shares or stealing your zrok account and creating harmful shares through your instance. Just be sure you don't need security if you are publishing those ports, and do ask for help with TLS if you need security for your zrok instance.