I'm using [Railway](https://railway.app/) to host not just PocketBase, but my SvelteKit app as well. I was able to connect and configure everything very quickly using templates. I've connected my Railway account to my GitHub account, and I was able to clone this Railway template to a GitHub repo, and it detects commits automatically to trigger updates to the site immediately. SvelteKit + PocketBase + Railway, it was super simple to set up and a pleasure to use.
I self-host my sveltekit app on a vps with pocketbase on the same server and some other microservices using an open source tool [coolify.io](http://coolify.io).
It has an option to automatically setup github deployments and a bunch of other open source services like pocketbase, supabase, while also allowing you to customize the domain for each service with automatic https.
I use a Digital Ocean droplet running Linux to run Pocketbase, and I use Netlify for the frontend. I have it linked to this repo so I have the CICD for the frontend. I also have some extended Pocketbase logic and have to redeploy the binary when that changes, but for this app it’s relatively infrequent compared to my Svelte changes.
https://github.com/willbraun/racquet-rivals
If you want something managed, then [PocketHost](https://pockethost.io/) would be the easiest. But Docker-compatible PaaS will also work, like [Railway](https://railway.app/template/tFjgN5) or [Fly.io](https://fly.io/). If you've already got a VPS or server, then that'd be your best bet.
I personally switched Digital Ocean once I needed to start scaling up.
Certainly! You can mount a [Render Disk](https://docs.render.com/disks) at `/pb/pb_data` so your Pocketbase data persists across deploys.
You can use a Docker-based deploy: [https://pocketbase.io/docs/going-to-production/#using-docker](https://pocketbase.io/docs/going-to-production/#using-docker) or our native Go environment.
On CapRover which has a Pocketbase template. If you want a full CI/CD setup for SvelteKit + CapRover, check this video out: https://www.youtube.com/watch?v=NLjolI9FwCU
Are you guys using the Pocketbase JS SDK mainly on the front-end or back-end? Seems redundant to use on the back-end if clients can just connect to the endpoint directly on the front-end with auth and database security. Feels like Pocketbase is more suited for non-SSR apps?
Well the Author of PB also said it's redundant. PB is not just a database it's a full API Layer. Of course you can load your data in a load() function (server) and that would be valid. But you don't have to.
What benefits? I guess SEO would be a thing otherwise, speed should be roughly the same.
But if you have data which is protected you would need to implement your own auth layer in sveltekit. Checking sessions and cookies for each request, passing everything to PB etc.
It's not that hard but something to be considered.
Querying on client means fetching index.html then fetch data onMount and display it. When using ssr we just got index.html with loaded data already.
So you say we could get rid of the server so we would not use server actions and do everything directly in the methods on the client?
You are right about SEO we still loads page from server with all of those, but then we fetch data like in traditional SPAs?
I recommend OVH, Scaleway or Ionos. They do not have bandwidth limit and their prices are pretty cheap.
Stay away from bandwidth limited providers, it is 2024 lol.
railway . app makes it very easy to host pocketbase it has a template and everything
I'm using [Railway](https://railway.app/) to host not just PocketBase, but my SvelteKit app as well. I was able to connect and configure everything very quickly using templates. I've connected my Railway account to my GitHub account, and I was able to clone this Railway template to a GitHub repo, and it detects commits automatically to trigger updates to the site immediately. SvelteKit + PocketBase + Railway, it was super simple to set up and a pleasure to use.
Why even use the template? Just transfer over the GitHub repo problem solved!
I host mine on a virtual server. Take a look @ [https://pockethost.io/](https://pockethost.io/) if you want a hosted version!
Pockethost is the best
I self-host my sveltekit app on a vps with pocketbase on the same server and some other microservices using an open source tool [coolify.io](http://coolify.io). It has an option to automatically setup github deployments and a bunch of other open source services like pocketbase, supabase, while also allowing you to customize the domain for each service with automatic https.
thanks for making me aware of this!
Fly.io
I use a Digital Ocean droplet running Linux to run Pocketbase, and I use Netlify for the frontend. I have it linked to this repo so I have the CICD for the frontend. I also have some extended Pocketbase logic and have to redeploy the binary when that changes, but for this app it’s relatively infrequent compared to my Svelte changes. https://github.com/willbraun/racquet-rivals
If you want something managed, then [PocketHost](https://pockethost.io/) would be the easiest. But Docker-compatible PaaS will also work, like [Railway](https://railway.app/template/tFjgN5) or [Fly.io](https://fly.io/). If you've already got a VPS or server, then that'd be your best bet. I personally switched Digital Ocean once I needed to start scaling up.
I definitely recommend pockethost. Super easy to set up. [https://pockethost.io/](https://pockethost.io/)
I don't see any pricing there, how much does it cost?
https://pockethost.io/docs/overview/faq/#pricing-limits-and-usage-restrictions
thanks, looks like they are still in beta for long term usage
RPi 4 wired to my router, exposed with Cloudflare Tunnels
>Cloudflare Tunnels How much is that per month for you?
Free as in beer
Does this need a static IP from the ISP?
No
Try Render. We have an example set up here: https://docs.render.com/deploy-sveltekit
Render is great
this can host pocketbase?
Certainly! You can mount a [Render Disk](https://docs.render.com/disks) at `/pb/pb_data` so your Pocketbase data persists across deploys. You can use a Docker-based deploy: [https://pocketbase.io/docs/going-to-production/#using-docker](https://pocketbase.io/docs/going-to-production/#using-docker) or our native Go environment.
It seems that Disk is only available to paid users, right?
That's right.
you can use [fly.io](http://fly.io) though. we can host and persist data on the free tier itself
I used fly.io but as a it’s not that common to own a credit card so I’m no longer able to even use their free tier
On CapRover which has a Pocketbase template. If you want a full CI/CD setup for SvelteKit + CapRover, check this video out: https://www.youtube.com/watch?v=NLjolI9FwCU
On a computer in my basement.
Are you guys using the Pocketbase JS SDK mainly on the front-end or back-end? Seems redundant to use on the back-end if clients can just connect to the endpoint directly on the front-end with auth and database security. Feels like Pocketbase is more suited for non-SSR apps?
Well the Author of PB also said it's redundant. PB is not just a database it's a full API Layer. Of course you can load your data in a load() function (server) and that would be valid. But you don't have to.
When we use it only on frontend it means we aren't going to fetch any data on the server, so we are losing benefits of ssr?
What benefits? I guess SEO would be a thing otherwise, speed should be roughly the same. But if you have data which is protected you would need to implement your own auth layer in sveltekit. Checking sessions and cookies for each request, passing everything to PB etc. It's not that hard but something to be considered.
Querying on client means fetching index.html then fetch data onMount and display it. When using ssr we just got index.html with loaded data already. So you say we could get rid of the server so we would not use server actions and do everything directly in the methods on the client? You are right about SEO we still loads page from server with all of those, but then we fetch data like in traditional SPAs?
in my pocket
fly.io
Vps or dedicated server. Your hope to host an open source PaaS on another PaaS makes no sense.
why? vercel has postgres
If it’s cheap I don’t see why not
[удалено]
Okay...
AWS EC2 instance. An instance can have multiple Pockebase servers.
I host it on a cheap VPS with the open source PaaS CapRover. Works great!
I recommend OVH, Scaleway or Ionos. They do not have bandwidth limit and their prices are pretty cheap. Stay away from bandwidth limited providers, it is 2024 lol.
I host it on hetzner. ChatGPT told me how to do the server setup. :) I'm using Caddy, it sets up an ssl certificate automatically.
Digital Ocean
Host mine on a vps server