FREE: Self-Host Supabase On Coolify!!โก Firebase Open Source Alternative๐ฅ Complete Setup & Bug Fix๐
Links from the video
Transcript
4,074 wordsWhat's going on everybody Josh pook here and in today's video I'm going to show you how you can set up and self-host super base a opsource Firebase alternative and you can do this all on coolify all right also too guys there have been a lot of bugs when doing this and this took me about five six even 7 hours of playing with it troubleshooting in order to actually do this I'm going to literally hand over this fix over you and show
You exactly how to do it on a silver platter if you've been able to if you've been experiencing any issues this video should solve it so let's dive right into [Music] it all right guys so you're not familiar with super ba super base or kify I did a video yesterday showing you how to install kify it basically is supposed to self-hosting with superpowers an alternative to things like Heroku n netlify and verell um it is open source and free and it's
Very simple to set up I'll quickly show you how to do it uh here are the coolify docks a link them in the description down below but basically you literally just run this Command right here on your VPS and you're good to go very very simple all right so that is how to host coolify now if you're not familiar with a super base or even fire base um basically um tldr uh it's you know a tool to you know database tool
And authentification tool and whatnot manage different apps on these C Frameworks you can also use it for you know AI tools such like even for example here in n8n you can use uh super base right here for Vector store and uh memory and stuff like that and so yeah that is a brief you know background on super Bas there's a lot you can do with it of course now the VPS that we're going to be using today just the ones that
I use you can use really any VPS it doesn't matter I'm just using the ones from katabo just because um I like the pricing and specs on it I find it's kind of like a low-key one people don't really know and the specs on it are pretty you know good I mean they're better than anyone else I've seen so that's just why I'm using them and so that's the VPS we'll use like I said you can use any we'll also link
The super base documentation down below you won't necessarily really even maybe need this to do this to install this but you may need it later down the line especially the reason I'm saying that is because we're going to be using doing everything on coolify all right so kify is supposed to do it out of the box now um coolify right now I'm on version 4.0 beta all right so if you're watching this maybe couple months or a month maybe or whoever
Knows down the line when they've rolled out more updates maybe you won't even be facing any issues it could just work straight out of box all right but as of now and I've seen this in the Git You Know in the the support Community as well as the GitHub uh many different people are reporting issues or you know having trouble installing superbase there's a bit of extra configurations or whatever problems that they're running into so I'm going to show you how
You can actually work around this now um I'll show you how you can work around if you're experiencing the issue I was experiencing which was with the super base analytics um container so if you if that's something that you're experiencing I'm going to show you to fix it if you haven't even tried this yet then don't worry you're going to get it right from the first time if you follow these instructions step by step so once you actually install coolify like
I said you just run that command if you need extra help check out my video I did yesterday but once you run that command you're in your VPS here and you're going to want to well actually no you'll have coolify already installed so we're going to do this in coolify so you're going to go to projects you can add a new project create a new project whatever the case may be your environments we're going to go in here and I'm going
To add I have a super base right here but we are going to create a new one just for the purposes of this video so going to create new and here you'll see all the different options you have applications databases Services if you're not if you're not familiar with qualifi definitely check it out um it's and I mean you're checking it out right now but I would definitely you know it's pretty a pretty cool tool you don't need Coolified to install
Super base of course you can do it just like right on um there are I guess maybe some downsides with coolify you need uh BPS that I believe coolify uses requires at least 2 GB of RAM and some other specs um so you know if you don't have a VPS capable of that and you're trying to run a bunch of applications on top of that then it probably won't be the best bet you can also though manage other servers so you
Could have coolify just on one server and managing multiple servers and like um a hierarchical you know type structure and you can even you know have it manage just one server with all your stuff on it or manage multiple servers with different stuff on it Etc so um but we're just going to create a project of super base all right so um we're just going to put it on our Standalone um server right here our host uh server and um yeah
All this credential stuff and whatever this is like going to be this is just for the I'm going to delete this after this video but I'm just going to show you exactly how to do it now typically the best situation would be for us to just be able to go ahead and press deploy and for it to ideally work out of the box now I'm going to show you an issue I'm going to literally just show you the issue and then
I'm going to fix it so if we just press deploy here we're going to service start up and we are going it's going to be Docker creating all pulling the stuff and guys if you're following with me along for the first time don't do this I'm just going to show you the issue because if you're already in the issue I'm going to show you what to do to get out of it but if you haven't gotten into the issue just I'll
Just don't do this don't deploy it right away um just wait about a minute or two once we get the issue here I'm going to show you how to resolve it and then you can just follow along at that point okay so you're going to see everything's pulling you know it's pulling this you know container and this and you'll see here analytics it's it's started it's waiting it's waiting H this is healthy right here but in about 20 seconds we'll see
We should see that we're going to encounter an issue with the analytics and while that's happening I'm just going to show you that here is and I'll link this GitHub thread in the description below too if you want to read it or if you have issues with what I'm going to show you to fix it this is basically just all these other people experiencing the same issue and I I'll give credit to uh this gentleman right here moral life because he
Was the one who actually uh got the or came up with the fix that I am using in this video so credit to this guy right here um and all I simply did just you know cuz there were some other people going back and forth and whatnot and you know people giving their two cents and you know some iteration upon it so all I did was I I read it a bit but then I just went like this to copy the
Whole thread like so I went over into Claude you can do this in GPT or I mean you could just read the the whole thread but just to save me some time of course I went into I created a project called coolify super base install and I I actually uploaded um because I was trying to troubleshoot this like I'm not joking I've been trying to troubleshoot this since yesterday and it's been like 24 hours and it's one of the main it
Was like super I I even went to bed dream like thinking about how I can fix this issue because it was really annoying I was super excited when I got coolify and I was really wanting cooli specifically even for one of the main apps being superbase so I was really pissed off when it wasn't installing um and I asked the Discord I was asking the community I posted a g uh issue on the GitHub trying to figure it out and finally
Um you know figured this fix out but yeah so here's my logs that I put in here and the docker file uh compos file and the environment variables and then I even just uploaded as you can see here this is literally the whole GitHub fix thread so if I go into this chat here this is the chat that I use to basically cure all my problems and I just said please do an end up analysis on the GitHub fix and everything
In it and give me detailed instructions on how to fix the error now I'll show you what the error is as you can see here container super analytics error error error dependency failed container super analytics is unhealthy right so if you're experiencing this issue you may have went through some if if you're anywhere like on the spectrum of where I was and and you know feeling stressed out over this issue then I'm about to save you a lot of stress right
Here um because yeah once I fixed this I was I was super surprised and happy and just like amazed that finally I got it fixed cuz it was really really challenging um to go through it um so I was check so if we look at logs here just to show you uh I can go here refresh so this is where we can get the specific logs for the container and I would I even paced this whole thing in the CLA I
Was talking to Claude trying to ask Claude and GPT and perplexity how to fix it he was doing research and all this stuff and it wasn't until I did it this specific way where I got the fix but you can see here basically just to summarize what uh So based on the details and the GitHub issue discussed here's epth analysis and step-by-step instructions to fix the superbase authentification error root cause the main issue appears to be the related uh related to
The postgress Host environment variable fify is sending the variable even though it is hardcoded uh in it has hardcoded value in the dock or compose file this causes the postgress database to initialize incorrectly preventing the super base admin user from being created properly so here's a step-by-step fix so we're literally going to do this step-by-step fix um right now so um stop all superbase services use coolify interface or SSH into your server and run Docker compos down okay so I'm just
Going to literally show you uh what I did so first off first things first I'm going to remove so since we already deployed it if you didn't deploy it then you're not going to have to obviously remove the um compos the docker file container um because you didn't deploy it that's why I said don't do it if you haven't done it yet but if you did do it I'm going to show you how to remove that in just a second but
First off what you're going to actually do is we're going to go to oops not our dashboard we'll go back to here and we are going to go into environment variables so we're going to go to developer View and I I'll literally put these in the description down below so you don't I'm going to put I'm going to put um Docker compose file is kind of long so I may just [Music] um I may just give you like a link to
It or something U maybe a GitHub link but I'll put this down below whether it's you know the whole text or in a file you can just copy over um but and I'll put the environment variables too let me just grab those so they are right in here um let's just double check I scroll up here is the here's the okay so here's the composed file and basically all I did you could change this too is you're just replacing um here
Let me just copy this first I'm going to copy this and Link for this Docker compos file will be in the description down below and first I'll change the docker file so to do that you just click edit Docker compose and we're going to paste that in save and then once we save success okay we can save again um we're actually going to need to change these environment variables though so let me just go back here grab my environment variables and
Everything any like you know password or credentials Within These environment variables is uh not any like this is just for the purpose of this video this is obviously going to be removed I'm going to remove this instance afterwards but we're going to paste this in and save now what this is doing just so you know is all that actually changed you could actually just really you don't even need to really paste in the environment variables all I did this was what
The environment variable was before CU this is the issue post grass post grassor poost equals super base we need to make that post name all right I mean it really could be something else but we'll just make it host name all right and essentially we're removing the post rest host we don't want that we just want host name so that's what we did in the environment variable but like I said I'll just link it down below just so it's even easier
Okay and then so that's one thing second thing actually well okay whatever um there we go we'll just leave that second thing is the docker compos file so every single place where it says where it said post grass host it now just says post grass host name so I literally just copied the docker composed file into a into a uh notepad here and then I just went like this and did find all postore host just in match whole word only and
Replace with postore host name and then replace all that's all I did very very simple once you do that okay um so we did that let me just go oops not documentation and we saved it okay you can't just uh run okay you can't just restart so because if you it's you're going to we're going to have to remove the uh containers and then um and then we're going to have to redeploy it okay so the way we do that I'll
Show you so how do I remove the thing okay so what we do is we are in our you need to go to your command line and let me just see LS okay okay so actually go CD dot dot CD dot dot CD dot dot CD dot dot okay and so um not found so checked our current directory we can search for it so we're going to search for our Docker um here now we found this and once you've located the
File name change that direct change to that directory so we need to find the root so let me just honestly okay so I'll put these this these um commands that I'm doing in the description down below um but I I just did find name Docker compos file and then honestly just to save time I'm just going to um like this and say what is the new super base Locker file not uh not not this one I don't want it to be
My old one see what it says seems that the new one super base file is not immediately visible first let's check the coolify directory okay so actually no I do have to go back to that same one um which would be yeah no sorry I do have to go back to here so this is my coolify you basically just have to change directory to your coolify services and now we're going to stop running services so we're just going to Docker compose
Down so basically all I did was I just did this find name Docker compos yml and then you can I honestly just copied this and said hey what into Claud or GPT what is the uh root folder for for uh coolify just so I can figure out where the docker files are loading and then I'm just composing these down all right you can see here these are being composed down DD Services LS okay so it's this one I just I composed
Down the wrong one my bad we're going to CD into here here okay um so yeah I would have to I'm going to have to redo my other one but anyways now we're just going to Docker compose down I had two super bases so this is the file path if you're um I'm on a Ubuntu it's data coolify services and then you'll be able to LS and see your services and you're just going to compose down so we're removing those okay
We're stopping them and then here compose down and then we're going to use this Docker PS and fcker oh wait is it Docker yeah Docker LS here and then we want to stop this one right here CU you see how I have oh sorry this one this is the the new one I just created I'm going to delete both these after this video but this is the one that we just created so we're going to want to use this command and
Keep in mind guys this is only if you already are encountering this issue of course you could like um one sec so here and we want this okay I'm just going to remove this volume right here you need to remove the super base- db- dat you can leave the config you just need to remove that all right once you remove that you can redeploy okay so now that we removed that right we can just redeploy after we change the uh the
The uh environment variable and the docker compose we actually have to um we actually have to uh remove or um remove the containers so now we're actually going to have to you're going to see it's going to start pulling the containers again okay so great as you can see already we have that analytics and it's saying healthy I don't know if I didn't notice anything here I don't know if it already started it may have yeah it's running okay so now
It is currently running you can see here we got the uh um super base analytics running um and if we actually go to the link right here like I said all this will be deleted afterwards but um let's go here this is the user so it's as just ask me for the login logged in here like I said this will all be deleted afterwards so but as you can see here we just set up a new super base instance um we
Can go to the table editor create new table you know do anything we want SQL editor databases authentification storage real time logs API docs you name it um really awesome tool guys I just wanted to show you guys this because you don't know how much of a headache this was actually giving me it was really really annoying and you know thank you for the great help in the in the community as well as the GitHub um you know resource that I'm
Going to link down below for helping me with this I wanted to one show you how to install super base and two if you're encountering this issue like I am with the new the newest version of super base if you're watching this in a couple months you may not be experiencing this with the new newer updates it could just be a oneclick up install but for the time being if you're going if you want to install superbase and you're encountering that
Uh analytics issue is a Surefire fix it should be just follow this step by step and you should be good to go so I hope this helps you guys out there I hope this help hopes this helps someone and hopefully I saved you a lot of stress a lot of time and hopefully you got some value from this if you did um cuz yeah I haven't seen anybody on YouTube no one no video on YouTube I saw was talking about this
Specific issue it really took me a long time to actually figure it out so yeah if you stumble on this video and it helped you solve this issue then and you got some value then I definitely appreciate um uh you know subscript or subscribe um to this YouTube channel we upload videos every single day so if you're new here uploading videos on you know self-hosting different things open source tools AI automation um setting up AI bots in your business if you're
A business entrepreneur we go talk about marketing marketing strategy Etc so a lot of cool stuff on here you can check out all the videos we have about 300 400 videos almost so we upload every day and um other than that guys um if you're new here too and you haven't already joined our free stride Community we have a Facebook group and Discord Channel with about 700 50 to 800 members in there um so it's 100% free you can check that
Out for some extra resources and then also too guys if you haven't already picked up my book client acquisition code definitely check it out it is extremely value packed about 500 600 pages of value packed info um definitely check that out and then also too guys if you want help if you want to book a call with myself and see how we can Implement AI into your business uh AI appointment CS AI quote callers AI infrastructure into your business book a
Call at executiv stride. slapp you will speak to myself and my team we can see if we can help that's executiv stride. comom slapp your coach consultant business owner B2B SAS service based business whatever the case may be other than that guys I will see you in tomorrow's video if you have any questions let me know in the comments Down Below guys and keep hustling keep grinding and of course guys accelerate your stride take care