#how to host the backend and admin??

63 messages · Page 1 of 1 (latest)

warm coyote
#

I swear it has been a nightmare in the last 3 days, I've tried netlify, vercel and render yet it just doesn't run (sometimes it says "medusa isn't recognised" and sometimes it returns an error I can't recall now)

I'm just using the nextjs starter code (didn't edit anything just edited the ui a little) and the medusa using the command create-medusa-app

please for the love of god, just tell me how to host the entire thing (the backend, the admin and I'd appreciate if you also told me how to host the storefront) cuz the documentations are terrible

#

I know this might seem like a simple question but I've been suffering for days just to deploy it

#

also I tried to host the entire thing on vercel but at this point I just don't care about the platform just get that thing deployed

#

also something thats been really confusing me is that the backend and the admin are one thing, however most tutorials I found online host both of them as a separate thing

small granite
#

I had a similar problem ended up running the backend on an Ec2 and hosting the admin and frontend on vercel

#

Pm and I can help you sort it out

warm coyote
#

never heard about ec2 before

#

you mean aws?

small granite
#

Aws virtual machine

#

Yeh

warm coyote
#

oh

#

I don't have money for this stuff

#

I'm basically hosting a free trial for somebody I know

#

also ain't the backend and admin one thing?

small granite
#

Yeh they are

tulip flare
#

Easiest way to get started is a plain, old-fashioned server. Vercel and such are fine for the storefront and (if you want to deploy is separately) the admin, but the backend should be on a server. You can also put it in docker and use ECS or whatever. Options for server instances abound. AWS ec2, Hetzner, etc.

hollow kraken
hollow kraken
tulip flare
warm coyote
#

I'm making 2 ecommerce

#

one for my cousin

#

and other for a client

warm coyote
#

so I want free hosting for a couple of days

#

my plan was to use netlify since it can host nodejs as far as I can tell

#

and I failed lol

#

so I decided to switch to render cuz it will provide a backend hosting service and free postgres hosting

#

also ain't the backend and the admin one thing??

hazy hull
#

Also a possible solution for you is to get a cheap Hetzner server, install Coolify and voila - you can host several medusa severers with ease, additionally even your frontends. This is fine for such preview purposes and once the servers get more traffic you can consider either scaling up your hetzner server, or move the medusa server to clients dedicated server

warm coyote
#

and been having problems with cors

#

I'll consider this

hazy hull
#

Be sure to install v3, not v4! If got any questions after setting it up (deploying etc) feel free to hit me up

hazy hull
#

V4 is in beta, still has a lot of issues/bugs. V3 has everything you'd need, including easily launchable services & databases

hollow kraken
tulip flare
#

Many sites (including mine) block aws and digitial ocean, etc, too. Traffic should not be originating from a data center. If it does, it is probably malicious. But that doesn't have any bearing on whether to host there.

warm coyote
#

instead I could host it on hetzer then use something like cloudflare?

tulip flare
#

No, my comment was in response to ninjaturtle. I'm saying the opposite.

warm coyote
#

he said "many site block hetzners servers"

#

which is a statement I didn't understand lol

tulip flare
#

Hosting on that server means you are receiving incoming traffic. Makes no difference whether outgoing traffic is blocked. It should be blocked. Real traffic comes from homes, from ISPs. Bad traffic comes from data centers.

warm coyote
#

I still don't get it

#

what did ninjaturtle mean exactly?

tulip flare
#

I think they meant they had heard that a lot of web site block traffic from Hetzner. Which is very true. But a lot of web sites block any traffic they think has a hight chance of being malicious, which includes any traffic that ORIGINATES from a data center. Meaning, who sends the initial request. If it's human traffic, it will be coming from a phone or residential ISP. Data center traffic will be a bot or worse. In other words, if you plan to host your data scraping app that gorges on Twitter and Yelp and Facebook data, don't bother hosting it on Hetzner (or AWS or any other data center) unless you also use a proxy service to hide where the traffic is coming from. But that has nothing to do with hosting an app where other users will originate the traffic going TO your site.

#

Also, sure, use Cloudflare if you want. I think it's great.

warm coyote
#

that make a lot of sense now

#

but that doesn't answer the question how can I host the backend and admin for free lmao

#

I managed to host the backend and admin in google cloud shell

#

but couldn't get the storefront working cuz I got a lot of cors issues

#

which is fair ig

mellow quail
#

Bro, backend for free? Try free trial, because if you want to host on cloud computing it will charge money

frozen prism
#

I think there must be some thresholds, it's not autoblocked.

warm coyote
#

I know google cloud shell is free

#

so said to my self yk what we have nothing to lose

tulip flare
#

I don't think NPM blocks anyone. Same with package repos.

frozen prism
#

I mean the storefront is being build on hetzner (nextjs build process). During the build it requests data from medusa backend hosted somewhere else. These requests are coming from Hetzner. It shouldn't be blocked.

tulip flare
#

Ah. My build doesn't work that way. I don't do SSG.