Having issues with setting up local env
I have a cloud version of supabase, but now I want to set up a local version thats sync'd to my prod. I have installed the supabase cli and docker, and ive followed various instructions, but no matter what I do I always have issue when trying to apply the migration I have downloaded from the cloud. Heres the steps I follow below, can anyone spot what im doing wrong?
Within my project:
- supabase init
- supabase login
- supabase link
- then select my project to link to
- supabase start
- supabase db pull (which pulls in my migration)
- then either supabase db reset or supabase db start
- it always fails with the container showing as unhealthy
one of the errors I see multipul times is 'psql: error: /docker-entrypoint-initdb.d/init-scripts/99-roles.sql: No such file or directory'
Anyone got any ideas?
6 Replies
What does
supabase migration list
show?It showing the migration:
Local | Remote | Time (UTC)
----------------|----------------|--------------------- 20250705204243 | 20250705204243 | 2025-07-05 20:42:43 Would it matter if my supabase project and my local project have different names?
----------------|----------------|--------------------- 20250705204243 | 20250705204243 | 2025-07-05 20:42:43 Would it matter if my supabase project and my local project have different names?
found a fix here which has worked!
https://github.com/supabase/cli/issues/3664#issuecomment-2953029141
- stop the local instance supabase stop
- remove the postgres version file with rm supabase/.temp/postgres-version
- restart the local instance supabase start
GitHub
Supabase local start fails:
/init-scripts/99-roles.sql
not found,...Describe the bug I'm encountering a persistent failure when running npx supabase start locally. To Reproduce Steps to reproduce the behavior: Create a Supabase project via CLI. Create supabase/...
After deleteing the file above and rerunning I got the message
You are running different service versions locally than your linked project:
supabase/postgres:17.4.1.048 => 15.8.1.094
and it seemed to work, so it looks like a version mismatch!I am having the same issue, I had issues with local so I ignored it and developed on production supabase. Now that I have my app in a decent state I need to start developing locally. I legit have done everything correctly and still keeping running into issues where docker containers stop
Did you try this?