Discourse on WSL attempting to use /var/lib/docker instead of connecting to Docker Desktop on host

AI-generated summary

raadtotheraad reports an issue where their Discourse instance, running on WSL and connecting to Docker Desktop on Windows, suddenly failed during ./launcher rebuild app. The error indicated that /var/lib/docker did not exist, causing the launcher to incorrectly assume less than 5 GB of space was available and attempt to free space, which also failed. The user notes that the setup had previously worked well for experiments on a residential network.

Several community members responded with advice. Falco clarified that WSL is intended for development and suggested using the official Discourse on Ubuntu or Debian for Development guide instead of the standard install. singi2016cn shared a similar experience, noting that while they switched to using Docker within WSL for stability, they faced significant disk space issues on their C drive. NateDhaliwal recommended following the Windows dev setup guide for a more reliable WSL configuration.

Ultimately, raadtotheraad resolved the immediate issue by using the --skip-prereqs argument with ./launcher rebuild app, successfully bringing the instance back online.

Okay, so my instance has been working really well after using the tutorial where you can actually finally run Discourse on a residential network.

Im using WSL to get the Linux stuff sorted, and the instance is mostly for experiments. I connect it to my Docker Desktop app on my Windows host so I don’t have to deal with the hassle of putting docker into WSL.

It worked well at first, yet suddenly stopped working.

Trying to run ./launcher rebuild app fails and hits with an error stating that /var/lib/docker doesn’t exist.

The launcher considers that as having less than 5 GB, and attempts to free space which subsequently fails.

Any help?

WSL is for development, so you aren’t expected to run the official install, but the Install Discourse on Ubuntu or Debian for Development.

I get that, but it’s really confusing because it started to work once and was doing its job really good

But now, it’s struggling to find the file

I initially did my local development directly on Ubuntu in WSL, but the environment was unstable and crashed after about two weeks. I’ve since switched to using Docker within WSL for development, which is much more stable. However, disk space usage in WSL has become a real headache, and my C: drive is running out of space. :rofl:

Try the WSL method. I use it often with no problems. What errors do you encounter?

Follow this guide for Windows dev setup:

It seems using the --skip-prereqs argument on ./launcher rebuild app worked.

My instance is back up