Install Discourse for development using Docker

Does this solution work? I was unable to get beyond d/boot_dev --init.

Update:
I see, if your developer UID isn’t 1000, like the user discourse in the discourse_dev container this just falls apart it seems.

Update 2:
Yeah I created a user with UID 1000 and everything just worked. So that is definitely the problem.

I tried creating some basic steps to get this running with an alternate UID but with how this is written it wasn’t worth it boot_dev tries to create directories at different parts of the process as the host user while also running docker commands that utilize those directories that were created so you are constantly fighting new directories that are the wrong permission etc etc. I’ll look at the code and see if there is a solution worth upstreaming. It might be worth noting in the documentation this only works for UID 1000. I’ll send a PR and see what upstream says.

2026-05-22 05:48:13.857 UTC [347] FATAL:  data directory "/shared/postgres_data" has wrong ownership
2026-05-22 05:48:13.857 UTC [347] HINT:  The server must be started by the user that owns the data directory.
A bunch of problems I ran into
nastee@station ~/vendsrc/discourse > ./d/boot_dev --init
Using source in: /home/nastee/vendsrc/discourse
Using data in:   /home/nastee/vendsrc/discourse/data/postgres
release: Pulling from discourse/discourse_dev
.....
Digest: sha256:e118af085d4be0486d4d9bfa83ac1c519d9975bed9a08180d10d5ad7c508632c
Status: Downloaded newer image for discourse/discourse_dev:release
docker.io/discourse/discourse_dev:release
f517752802e70b8a9110972bb3ddc0e9343d0c430603e4a9ae3eacc5ec69a2cf
Installing gems...
There was an error while trying to write to `/src/Gemfile.lock`. It is likely that you need to grant write permissions for that path.

Thanks to: There was an error while trying to write to `/src/Gemfile.lock`. It is likely that you need to grant write permissions for that path - #2 by jacque006

I set that file to 777 (yuck), I do that, and it at least installs Gems now but the next docker exec process tries to write to the source directory and cannot since it isn’t running as my user so I get:

 EACCES  EACCES: permission denied, open '/src/_tmp_82_62be1aeb82e80c1d1054dac8bdbc5923'

Ok why not, sudo chmod 4777 . where . is the cloned source directory I am running d/

Which gets me to:

 EACCES  Error while trying to symlink "../../../node_modules/.pnpm/prettier@3.8.1/node_modules/prettier" to "/src/docs/developer-guides/node_modules/prettier". The error happened while trying to create the parent directory for the symlink target. Details: Error: EACCES: permission denied, mkdir '/src/docs/developer-guides/node_modules'

after hitting another perm problem and just giving into chmod 777 -R .

eventually culminating at:

connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory