cli: `supabase start` Error: Failed to connect to Docker daemon. Is Docker running?
Bug report
Describe the bug
Recently updated to supabase 0.17.0, and when running supabase start I get the following error message:
Error: Failed to connect to Docker daemon. Is Docker running?
Using the npm package (0.5.0) I have no issues running supabase start.
edit: It starts fine when running as a super user
System information
- OS: Linux
- Version of Node.js: v14.17.1
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 39 (13 by maintainers)
On MacOS, this fixes the situation for me:
export DOCKER_HOST=unix:///$HOME/.docker/run/docker.sockYou can also use the
DOCKER_HOSTenv for now (in~/.bashrc, etc.) until this is fixed upstream:@nvme0 if you’re using Mac (I believe this applies to Windows as well), you need to have Docker Desktop running.
docker -vwill run without the Desktop app but if you try to run any container or simply rundocker ps, you’ll get the following error:FYI: I just installed 4.20.1 for Mac and had to check a box in settings after installation to enable this.
This fixed it on my MacOS
I just went ahead and created the symbolic link and it worked for me. I’m upgrading to a new machine next week anyway, so this one will be wiped. 😃
ln -s /users/me/.docker/run/docker.sock /var/run/docker.sockI had to sudo it.
if you are using colima do this instead
DOCKER_HOST=unix:///$HOME/.colima/docker.sock supabase startor of course add it to your
.bashrc/.zshrcThere’s no mention in the doc that docker is prerequisite; can you add it there as I lost hours trying to generate types and the doc just mention to run the command. I thought my connection is bad
This was using latest Docker Desktop. After reading the release notes I noticed this on 4.13.0:
By default Docker will not create the /var/run/docker.sock symlink on the host and use the docker-desktop CLI context instead.https://github.com/docker/for-mac/issues/6529
It worked for me after downgrading.
If it starts fine when running as a super user, you almost certainly have the Docker daemon running. Two things you can consider
sudo usermod -aG docker $USER.Reference
Docker Engine Release Notes
@sweatybridge is Docker a prerequisite for following the Managing Environments guide? Because I’m also getting this issue and I don’t see Docker mentioned on that page. That page is linked to in a few places and skips the Local Development guide so it’s understandable that Docker might not be installed if you’ve previously only been using the supabase.com dashboard. Going to install it and hope it fixes it though. Update: installed Docker and it’s working fine now, could be good to add to that guide.
The
--db-urlflag is mostly used for self-hosted setup. For platform projects, we suggest using--project-idflag as documented.I will update the cli reference docs to make this distinction clearer.
This is a future reference to myself. On Linux, I did something like this (I use Docker Desktop):
Sorry, I probably should’ve included that in my first comment.
Just running
docker infoyields the same error:Thanks! I encountered this problem after installing Docker Desktop for macOS version 4.20.0 and I did not do anything special during the installation or deny it any requested access.
Took me longer than I care to admit to realize I needed 3
/'sYour project id is part of the url you use to access supabase.com: https://app.supabase.com/project/<project-id>
Alternatively use
supabase projects listto find it. Please open a separate issue if the error still exists. As explained before, this thread is meant for self-hosted only.Hi @sweatybridge thank you for your reply, but I still got error, though it’s different