# Zrok self-hosted zrok-controller doesn't run

**URL:** <https://openziti.discourse.group/t/zrok-self-hosted-zrok-controller-doesnt-run/2721>\
**Category:** zrok\
**Created:** [June 14, 2024, 3:14pm UTC](https://openziti.discourse.group/t/zrok-self-hosted-zrok-controller-doesnt-run/2721 "2024-06-14T15:14:07Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![lotr88](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@lotr88](https://openziti.discourse.group/u/lotr88)\
**Post date:** [June 14, 2024, 3:14pm UTC](https://openziti.discourse.group/t/zrok-self-hosted-zrok-controller-doesnt-run/2721/1 "2024-06-14T15:14:07Z")

</div>

I installed zrok on my vps using guide here [Self-hosting guide for Docker | Zrok](https://docs.zrok.io/docs/guides/self-hosting/docker/)  
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](http://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](http://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)](http://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(...)](http://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

---

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [June 14, 2024, 3:38pm UTC](https://openziti.discourse.group/t/zrok-self-hosted-zrok-controller-doesnt-run/2721/2 "2024-06-14T15:38:06Z")

</div>

> [@lotr88](#):
>
> expecting configuration version '4', your configuration is version '3';

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

> <https://github.com/openziti/zrok/issues/653>
>
> see: https://openziti.discourse.group/t/zrok-self-hosted-zrok-controller-doesnt-…run/2721/2
> 
> with the latest zrok, the config version was moved to 4 but the docker file must be version 3

---

<div class="post-metadata">

**Author:** ![michael.quigley](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/michael.quigley/32/1123_2.png) [@michael.quigley](https://openziti.discourse.group/u/michael.quigley)\
**Post date:** [June 14, 2024, 4:40pm UTC](https://openziti.discourse.group/t/zrok-self-hosted-zrok-controller-doesnt-run/2721/3 "2024-06-14T16:40:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lotr88](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@lotr88](https://openziti.discourse.group/u/lotr88)\
**Post date:** [June 15, 2024, 12:57pm UTC](https://openziti.discourse.group/t/zrok-self-hosted-zrok-controller-doesnt-run/2721/4 "2024-06-15T12:57:57Z")

</div>

Sorry but where should I put this in?

---

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [June 15, 2024, 12:59pm UTC](https://openziti.discourse.group/t/zrok-self-hosted-zrok-controller-doesnt-run/2721/5 "2024-06-15T12:59:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lotr88](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@lotr88](https://openziti.discourse.group/u/lotr88)\
**Post date:** [June 15, 2024, 1:38pm UTC](https://openziti.discourse.group/t/zrok-self-hosted-zrok-controller-doesnt-run/2721/6 "2024-06-15T13:38:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![qrkourier](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/qrkourier/32/52_2.png) [@qrkourier](https://openziti.discourse.group/u/qrkourier)\
**Post date:** [June 15, 2024, 8:29pm UTC](https://openziti.discourse.group/t/zrok-self-hosted-zrok-controller-doesnt-run/2721/7 "2024-06-15T20:29:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![qrkourier](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/qrkourier/32/52_2.png) [@qrkourier](https://openziti.discourse.group/u/qrkourier)\
**Post date:** [June 15, 2024, 8:42pm UTC](https://openziti.discourse.group/t/zrok-self-hosted-zrok-controller-doesnt-run/2721/8 "2024-06-15T20:42:36Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![lotr88](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@lotr88](https://openziti.discourse.group/u/lotr88)\
**Post date:** [June 16, 2024, 5:39am UTC](https://openziti.discourse.group/t/zrok-self-hosted-zrok-controller-doesnt-run/2721/9 "2024-06-16T05:39:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![qrkourier](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/qrkourier/32/52_2.png) [@qrkourier](https://openziti.discourse.group/u/qrkourier)\
**Post date:** [June 17, 2024, 1:58pm UTC](https://openziti.discourse.group/t/zrok-self-hosted-zrok-controller-doesnt-run/2721/10 "2024-06-17T13:58:01Z")

</div>

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.
