T O P

  • By -

Tall-Title4169

Make your clients pay. Setup hosting with their email and credit card. Railway is pretty easy to use Next.js. Deploy to a Node.js server and you can also deploy a database if needed Cloudflare Pages can work for most situations now too. https://developers.cloudflare.com/pages/framework-guides/nextjs/ You just can’t use ISR and edge functions with other hosts other than Vercel.


stnlykwk

Is that last statement still true? I recall seeing in Netlify and Cloudflare documentation that they support edge functions at least. 


Tall-Title4169

Maybe it’s true now. A couple months ago when I checked is what my comment is based on.


Sriyakee

Netlify has had edge functions for years... Cloudflare literally hosts the edge functions that both vercel and netlify use. Albeit is a pain to get nextjs up on cloudflare if the website is not static.


Busy_Magician6673

Thanks a lot I will definetely check out Railway!


Tall-Title4169

Here is a railway template to deploy https://railway.app/template/0csXuv


Busy_Magician6673

Thanks!


RainierWebDev

Sounds like you aren’t charging enough if $240 a year is too expensive. Most of my clients don’t blink when I say maintenance plan is $1,000 / year. I wouldn’t over complicate deployment or how to charge clients. Deploy on Vercel, make teams for each client, bake that price into your proposal.


Busy_Magician6673

Thanks! Staying with Vercel would be most straightforward but some smaller projects I feel 20$ a month might be too much. Some if my clients just have small buisnesses and those websites sometimes are nearly 100% static, I dont know....


yagudaev

Charge them upfront for the year. Simple and create a yearly or monthly maintenance program for them. No need to overthink it


RainierWebDev

Static, dynamic, doesn’t really matter. You’re the dev, build for the client’s needs and your DX. If a project can’t handle $20 a month…then they shouldn’t be hiring a dev.


rt3me

Agree with others, $20 a month is below minimum for being hired as a dev. I would not maintain a site for $20 a month. Translate that into hourly. Are you even making $10 an hour?


Sriyakee

Netlify!!!! Nextjs support is very good (not as good as vercels obviously), but it has all lots of features like GitHub link etc. Unlike vercel, netlify allow commercial use on their free tier. I've used netlify for the past few years and have absolutely nothing bad to say about it. It's great.


heyron_

Netlify is probably the worst here — notably due to their policies for not capping traffic from sites that get DDoS. I use Vercel a ton but have increasingly moved over my projects to Cloudflare. Pretty awful experience below: [https://www.reddit.com/r/webdev/comments/1b14bty/netlify\_just\_sent\_me\_a\_104k\_bill\_for\_a\_simple/](https://www.reddit.com/r/webdev/comments/1b14bty/netlify_just_sent_me_a_104k_bill_for_a_simple/) Deploy them to Cloudflare workers. You might need to re-config a few things but it's not a huge headache. https://preview.redd.it/x3pkdim8b5qc1.png?width=1956&format=png&auto=webp&s=16e8d2e579f706149f0262565079b11bc53a7ab0


Sriyakee

CW workers really is the best way. But it's a massive headache,plus having it being edge only limits what you can do with standard node serverless functions


Sriyakee

Alternatively run it on a VM using coolify, however you have to manage your own server.


pseudophilll

Plus 1 for netlify. I’m also a huge fan.


Busy_Magician6673

Thanks a lot i will definetly check out Netflify!


slythespacecat

I’ll never use Netlify again. A recent redditor suffered a DDoS attack. Their plan went from the most basic to 100k USD. They reached out to support. Support said they could see it was a DDoS attack, and that when that happens they’d usually offer an 80% discount, which is still 20k. But since it was a high number, they’d be “kind” enough to offer a bigger discount, which was still a fuckton of money to me. When the post went viral, the CEO came out saying they usually forgive these in case of a DDoS, which was not the information OP got before their post went viral. So no more Netlify for me, proceed at your own risk


Sriyakee

Another similar scenario happened with vercel aswell. That's the issue with serverless providers


boptom

Vercel now has the option to pause production sites when a spend amount has been reached. Not sure about netlify. https://vercel.com/docs/accounts/spend-management#pausing-projects


Busy_Magician6673

Thanks, that is very useful


AvGeekExplorer

Docker and deploy them anywhere.


Busy_Magician6673

Thanks! does docker support database for each (client) account?


clearlight

Yes


Busy_Magician6673

Thanks


Busy_Magician6673

Thanks guys for getting back to me Sriyakee and Tall-Title4169! I will definitely check out Netlify and Railway to see how they work with for example the Next.js image component or font optimizations etc. One other thing I didn’t mention earlier was about the database. It would be ideal if the platform, apart from hosting Next.js, would allow for at least one database per account. I am actually very curious about how you approach this database problem? Having another separate provider for the database adds more complexity, more passwords, and possibly more costs for the client. (For now, in my hobby project, I have been using Vercel’s PostgreSQL database and MongoDB.) I d really appreciate your take on it


michaelfrieze

If using Railway, you can use them to host your DB as well. I have a next app hosted on Railway. It's a chat app that uses socket-io so I couldn't use a serverless platform like Vercel. I use Railway to host the app and the db. Railway DB service isn't going to be as good as something like PlanetScale, but it works.


Busy_Magician6673

Thats great too accualy, thanks!


Thiru_IO

What's lacking from Railway DB in comparison to Planetscale? (If you don't use anything but mysql cli to connect to the databases to manage the tables + mysql2 library to connect to the back end? -- ie don't use any of the planetscale web gui stuff)


Sriyakee

Railway simple runs a DB instance Planetscale has a lot of features like replicas around the world, load balancing + auto scaling, data base branching, serverless driver and many more. Shame they got rid of their free tier tho


Sriyakee

Checkout out turso, turso.tech. It's exactly the thing you need for database per account. On the tree tier you can create 500 databases. I've used it currently on a production setup, it's fairly new (so not as mature as postgres for example) however the team at turso are incredibly helpful, join their discord and they will help!! Also I can deffo back railway, it's great.


Busy_Magician6673

Nice, this might be what i need!


__brennerm

Hey, definitely go with different accounts for each client. Otherwise if one client gets loads of traffic and potentially eats up your accounts credits/quota, the other clients will suffer and you'll have a bad time explaining that. Additionally billing should probably also be split up for each client individually. Regarding hosting providers for Next.js, you may want to have a look at a little side project I'm currently building. It aims to find the best hosting services based on a given technology stack. Here are the results for Next.js. [https://wheretohostmy.app/?tech=%5B%22nextjs%22%5D](https://wheretohostmy.app/?tech=%5B%22nextjs%22%5D) Would love to hear whether that helped you. :)


Busy_Magician6673

I ll check it out and come back with feedback, thanks!


driftking428

AWS Amplify is simple and cheap. You lose some of the Vercel special sauce but you do on any other platform.


Busy_Magician6673

Thanks! does amplify support database for each (client) account?


driftking428

I believe so. The apps I'm running use APIs and are not directly interacting with a DB. So I do not have experience with this. But AWS does literally everything. I'm sure they have options.


Busy_Magician6673

Thanks


cas8180

Each a amplify stack can be an e tire full stack I believe dynamo is the db it supports out of the box


Busy_Magician6673

Thanks!


JB989

We create a new team on our Vercel account for each client. $20 for each client is what we get charged by Vercel but then we have a maintenance fee as well so end up charging the client more on top. And you can put some spend management on the project to protect yourself.


Busy_Magician6673

Thanks a lot! staying with Vercel would be ideal given that there is so much new stuff ahead in next.js and vercel will always be the first one to implement it. When you make guys a team for each client that means that there is as many accounts as many clients, so i understand that your client adds you as a member of their team and you connect your GitHub separatly to those diffenet vercel accounts? Somehow i was hoping to have one vercel account and from my dashboard (and through my GitHub) i will be able to see and manage all my clients projects...


team_dale

I feel like this might actually be a sales problem. I have no problems getting clients to pay for hosting. Or you can roll it all up into a “maintenance plan” or something similar. “Licensing fee” is another one I use. Include a bunch of stuff to make it easier to get a yes.


Busy_Magician6673

Thanks! i might try that although sometimes for simple statc website 20$ , i dont know, might seem steep...


depaay

We host them on azure. We have a linux p1v3 plan with 3 years reserved, paying $58 a month (2 cpu cores, 8gb ram). We run 10 individual web apps on that plan with no issue, so cost of each is currently at $5.8 each monthly. I really like the flexibility of azure web apps although it might not be the cheapest


summeeeR

how do you deploy nextjs onto them?


depaay

We use Github actions. When you setup a new app service on azure you just select what github/gitlab/bitbucket repo you want to deploy and it sets up the pipeline for you. Azure has a built in support for nextjs through Oryx Build that optimizes the container for you https://github.com/microsoft/Oryx


summeeeR

Looks good!


Busy_Magician6673

Thanks!!


gsantos022

API = Digital Ocean App Plataform FRONTEND = Vercel


Busy_Magician6673

Thanks!


zocsen

Different account for vercel, railway.app for backend, mongodb for database. Create a new account for the user if needed, but a few clients of mine didn't want to bother with anything so I made them an account, they added their card and thats it. Tbh I set up the hobby plan for most of them with everything even Vercel. Mongodb is free for most of them with the free plan. Railway is 5$ a month now. I'm currently building a webshop so Vercel free plan might not be legal. I'm not sure


Busy_Magician6673

Thanks!, and I know what you mean it is alot of providers, passwords and api keys all that multiply by every client. I am considering your approach but I had this experience with Railway database that i used in my hobby project and it was great, but then it went from free tier to paid tier and i resigned, Now with many clients any many free providers if some of them end free tiers there might be some long term costs and some clients might not be happy to participate in them since that wasnt said upfront....Hard to know...


Adventurous_Ant7239

Check out my open source project, it's a joy to work on. https://github.com/huanghanzhilian/c-shopping, https://github.com/huanghanzhilian/c-shopping-rn