S
Supabase4w ago
Gab

Cannot upload file in self hosted storage

I can't seem to upload any kind of file in supabase self hosted storage. I tried from the console and the issue still persist
27 Replies
aantti
aantti4w ago
are you on a mac?
Gab
GabOP4w ago
No, windows. But I'm using docker for this. I saw there are similar issues, but I'm not too sure about it
inder
inder4w ago
Are you using supabase cli to run supabase locally? What version?
Gab
GabOP4w ago
I'm using docker for that, i simply follow the guide on how to host supabase using docker. How do i check the version tho?
ihm40
ihm404w ago
The versions for the different services used in the image can be found in https://github.com/supabase/supabase/blob/master/docker/docker-compose.yml since the docs suggest to clone the repo and use those files
GitHub
supabase/docker/docker-compose.yml at master · supabase/supabase
The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications. - supabase/supabase
ihm40
ihm404w ago
Do you not see any errors in logs or the UI?
Gab
GabOP4w ago
Yes, i clone the repo as the guide says in self hosted section I haven't checked the log, but on UI it's all normal. Basically it's starting in 0%, stuck there and just says upload failed
inder
inder4w ago
Can you try with a small file < 1MB? I've a hunch why this is happening
Gab
GabOP4w ago
A moment No luck
Gab
GabOP4w ago
it says like this, but failed to see the response
No description
inder
inder4w ago
And you haven't made any changes to the cloned repo?
Gab
GabOP4w ago
nothing
inder
inder4w ago
Try this https://stackoverflow.com/a/79633771/18954618 After making the change, run this command docker compose up -d --force-recreate and clear browser local storage
Gab
GabOP4w ago
a moment it works. thanks. But, may you help explain why this happened?
inder
inder4w ago
Supabase dashboard uploads files in chunks which which are greater than a certain size (Can't remember the threshold). - By default, it tries to upload these chunks to /upload/resumable path and right now the api gateway doesn't handle this route. - When this env var is added, it uploads file chunks to /storage/v1/upload/resumable which is handled by api gateway. - Have to clear the local storage because tus (library used by dashboard to chunk files and upload) stores entries for failed uploads in browser's storage with the old path This could have also been solved by adding config for handling /upload/resumable path in volumes/api/kong.yaml but this env var is the easier way.
Gab
GabOP4w ago
Ah ok, thank you for the explanation. I'll keep that in mind
inder
inder4w ago
Also, this method only works when there is no reverse proxy in front of kong gateway (what you're using right now) In the future if you decide to use nginx or caddy in front of supabase then you'll need to modify config accordingly.
Gab
GabOP4w ago
Probably not, because I'm a mobile dev and not a backend. I just want to experiment a bit with self hosted, that's all But thanks for the tips, maybe it'll be useful for me next time
inder
inder4w ago
Then I'd recommend to use supabase cli. Its better suited for dev environment. Also the image versions are more up to date
Gab
GabOP4w ago
Does supabase cli different from docker? Sorry I don't quite understand this whole docker and backend stuff
inder
inder4w ago
supabase cli also uses docker to run containers. But it allows you to manage all the config with a file config.toml cli is updated frequently so you'll be using the latest features supabase has to offer its the same thing as what you're using right now, just what you're using right now is quite behind and can be hard to manage
Gab
GabOP3w ago
Ah ok, thanks. I'll try to look it up Hi um, the problem also happened using supabase cli. But I can't seem to fix it since it's not using normal docker.yaml
inder
inder3w ago
Try this. Inside the supabase directory, there should be a .temp folder. Inside this .temp folder, create a file called studio-version(No file extension) and add this text inside file
supabase/studio:2025.08.11-sha-c538c4d
supabase/studio:2025.08.11-sha-c538c4d
Now take down the stack and restart again
Gab
GabOP3w ago
Alr, I'll give it a try. Thanks man
inder
inder2w ago
@Gab Sorry to bother you. You mentioned that you're on windows pc. Are you running edge functions locally?
Gab
GabOP2w ago
No, i haven't tried on edge function yet. still learning the basic of supabase
inder
inder2w ago
If you have some time, can you set one up right now? I just need to know about a behavior on windows

Did you find this page helpful?