You could try hosting on a cheap VPS and use PocketBase for your backend, or if thats too heavy handed, just use sqlite. If you're building something quick you don't wanna worry about handling a million requests per second.
Recently learned bout CapRover... Curious if you would ever consider the "bare VPS" route after having used it or if it (or something like it) has become essential.
CapRover is very interesting... I actually just use Linode + Treafik + Portainer and self host all my own stuff using Docker Compose. If I have a new app, I just use GitHub Actions to build and push a container to GitHub Packages (GHCR) and then on my server I create a docker-compose.yaml and I fire it up, the labels link it all up to Traefik.
Obviously deploying is manual right now since I have to SSH in and then pull and `docker compose up -d` but I could probably find something to bridge that gap.
Id be interested in seeing how CapRover can simplify all that for me...
So I spun up a Linode, installed CapRover, bought ultra cheap DNS from NameCheap using their guide to get cheap domain name and did a few deploys. Its really cool. Much easier than my approach.
You'll end up wanting to self-host everything in no time :) I've switched from Namecheap to Cloudflare because it's cheaper, and it's very easy to integrate with Google Search Console and Cloudflare Pages.
Because VPS is cheaper than any managed service offering out there when you start to add up the features. For example Azure App Services can host: .NET, PHP, Python, and Node WITHOUT a container, but the second you want a custom DNS name its incredibly expensive.
A $5 VPS + CapRover instantly gives you your own app host + CICD server which you fully own, none of your data is owned by AWS or Azure either.
Most people dont self host because they dont want to worry about updating the OS and Database servers and clustering and HA/DR. Which is far. But for the average dude like me spinning up fun side projects and random stuff, why wouldn't I self-host it for next to nothing?
I'm trying to decide whether to do this same thing or try and keep all of the "backend" parts in Cloudflare Workers (Pages Functions) and other "serverless" options (such as Turso for the DB).
No, I wouldn't consider. It's so much easier to Dockerize every application. And I'm running about 10 services on the single instance, so it's a lot cheaper too.
How do you prevent issues with potential traffic spikes and such (with running 10 services on a single instance) (this is probably a dumb question... most of my experience is on the frontend)?
They all support serverless and also provide auth (to avoid the user storage/query problem[1])
While SvelteKit does include backend functionality, unfortunately it doesn't have any special DX for databases. I think there are other starter templates built on top of Kit for that...
Sure, querying/storing the current logged in user is simple.
Imagine rendering a single Reddit thread that contains comments by 100's of users from a set of millions of users.
The problem is querying (and storing) the usernames, avatars, etc of other users to render the author info for all comments... and updating that information when any user updates their avatar, etc.
If you store claims when they login, and update when they update their profile you simply join users table to comments table.
That is no different than any other data in your system. You could have a view, or do the join in SQL to join Users + Comments when someone requests a page. Thats not really a problem is it?
> when you look at these auth solutions they typically will handle three things
> 1. handshakes with third party IDPs (login with google, etc)
> 2. session management
> 3. user storage
> 1+2 are boring and i’m 100% down to offload it to someone else
> the problem is #3
I think you are assuming you do #3 (user storage) yourself in your own database, which is possible.
But lots of auth providers want to store the users for you and make it look appealing (user dashboard already made, don't have to store PII, SSO: can share single account across multiple services, etc)
That is exactly what one of my clients decided after I introduced them to UserFront. But then ran into problems just rendering a list of items in the app because only the UserFront id was stored in the local DB. User names, email addresses, were all stored in UserFront.
You can choose to store username, email addresses, etc in your own database, but then you have to be careful about syncing at least the user id + email address(es) between the auth service and your own DB.
> Do you want a VPS provider that ignores copyright complaints?
Yes, familymoviedb.com. It's a side project. Have not had any copyright complaints so far. The question at hand here is completely unrelated...
Essentially just looking to have my own VPN and not have to rely on a VPN-as-a-service (e.g. ExpressVPN, SurfSharkVPN, Mullvad, etc, etc).
Thanks for the recommendations! I've added them to my list of considerations...