WSL/Ubuntu and troubles with postgres

I’m using WSL Ubuntu and experiencing some troubles when trying to run “fly postgres create”, as it results in Error failed to launch VM … operation timed out. When I run fly doctor, the problem appears to be in WireGuard gateway:

Pinging WireGuard gateway (give us a sec)… FAILED
(Error: ping gateway: no response from gateway received)

I have tried enabling wireguard websockets as fly doctor suggested, but unfortunately the problem persists. I am pretty sure that there are some configuration issues, but as a beginner, can’t figure out what to try next. I would be so happy if you come up with some ideas what to do!

I just gave it a try on WSL2/Ubuntu-22.04-1 and it worked for me (w/no wireguard tunnel):

$ fly postgres create
? Choose an app name (leave blank to generate one):
? Select Organization: Sam Ruby (personal)
? Select region: Ashburn, Virginia (US) (iad)
? Select configuration: Development - Single node, 1x shared CPU, 256MB RAM, 1GB disk
Creating postgres cluster in organization personal
Creating app...
Setting secrets on app nameless-pine-7161...
Provisioning 1 of 1 machines with image flyio/postgres:14.4
Waiting for machine to start...
Machine e286e33b600986 is created
==> Monitoring health checks
  Waiting for e286e33b600986 to become healthy (started, 3/3)

Postgres cluster nameless-pine-7161 created
  Username:    postgres
  Password:    P94XJSGPaPRlxee
  Hostname:    nameless-pine-7161.internal
  Proxy port:  5432
  Postgres port:  5433
  Connection string: postgres://postgres:[[redacted]]@nameless-pine-7161.internal:5432

Save your credentials in a secure place -- you won't be able to see them again!

Connect to postgres
Any app within the Sam Ruby organization can connect to this Postgres using the following connection string:

Now that you've set up postgres, here's what you need to understand: https://fly.io/docs/reference/postgres-whats-next/

If you use just WSL (and not WSL2) then WireGuard is unlikely to work.

But WSL2 or native flyctl for Windows will do the job.

Thanks, my WSL version is 1, so probably updating the version will help.