Not having to change the nameserver every time before viktor-cli start

Everytime I want to start mij viktor app, I need to change the ‘nameserver’ for it to work.

I do this by:
sudo nano /etc/resolv.conf
Then typing the following in the file:
nameserver ‘’
Then I save (CTRL+S) and exit.

Howevery, the next time (after shutting down my laptop) the resolv.conf is empty again. How can I fix this?

Hi Marlies,

This is a known issue in WSL2 where DNS resolution is not working. Microsoft is tracking the problem in this issue.

Your solution is indeed the way to go by configuring WSL2 to use Google’s public DNS server located at IP address However, I believe an additional step is needed where you disable the automatic generation of a new resolv.conf. You can do this by:

  1. Creating a WSL configuration file: touch /etc/wsl.conf
  2. Disable generating resolv.conf by adding to the wsl.conf:
generateResolvConf = false

Hope this helps!