Skip to main content

Using a different listening address with lima

·1 min

Append the following to the lima.yaml file of the guest under portForwards, i.e. ~/.lima/docker/lima.yaml

- guestIP: "127.0.0.1"
    guestPortRange: [1, 65535]
    hostIP: "127.0.0.2"

Restart lima host

  limactl stop docker
  limactl start docker

Setting the forwarding address at creation of VM, append these arguments to the command:

  --set .portForwards +=[{ "guestIP": "127.0.0.1", hostIP: "127.0.0.2"}]