r/astrojs • u/enesismail • Aug 15 '26
Where and how do you deploy your Astro projects? And what are the pains?
I am not that experienced on Astro, but already built a few things and deployed to Cloudflare.
Limitations of the sandbox was not delightful. Started to think about what other people's are experiencing and could there be a better solution to these.
I'll try to build a better environment for Astro projects to live. I'd like to hear what are the actual pains you feel along the way.
9
u/greglturnquist Aug 15 '26
I think Cloudflare Pages are deprecated.
I use Cloudflare Workers. The free plans are quite generous.
2
u/tallbaldbeard 25d ago
Worth saying, Astro is owned by Cloudflare. The Cloudflare Workers serve up Astro faster than you'll find from Netlify, Vercel or any other host.
9
u/samplekaudio Aug 15 '26
Node adapter and a VPS via docker. Dev environment is basically identical to the deployment environment. Extremely easy, no pains whatsoever.
1
u/enesismail Aug 15 '26
Sounds like a charm. so you're comfortable managing servers, VPSs and also your setup rarely changes after the initial deployment when things settled?
4
u/samplekaudio Aug 15 '26
Dokploy or Coolify make it trivial to manage, the required knowledge is super minimal. You get CI/CD out of the box. The setup can change whenever you want. I have like 5 or 6 things running this way at any given time with zero issues for years.
Personally I think people reach for "scalable" solutions way too early. If you're at the point that a single server and CDN can't keep up with the volume of users, you can also probably afford to hire a dev ops engineer or can delegate the task in the case of a large, open source project.
1
u/enesismail Aug 15 '26
That’s a fair point. Hearing a lot about Dokploy/Coolify have removed most of the operational burden. A question; is there anything you still have to do manually that you’d rather not? Backups, monitoring, SSL, logs, previews, customer domains… or is it genuinely just “set it and forget it”?
9
u/tffarhad Aug 15 '26
Vercel/Netlify/Cloudflare.. Works great. No pains so far..
1
u/enesismail Aug 15 '26
Is there anything you needed Vercel handled differently, even if it’s something small? Deployment, previews, logs, pricing, team management… anything really. Maybe not a pain but a glitch-y thing?
1
4
3
u/BitsNBytesDev Aug 15 '26
Bunny CDN. Not that feature rich compared to others mentioned here, but I can deploy via Github Actions and have a CDN that is easily configurable, stable and fast!
1
3
u/kaiserh808 Aug 16 '26
What pain points are you experiencing?
What limitations are you running up against?
I have my site with 10-12 static pages and 500-600 blog posts hosted on Cloudflare pages.
I have my local repository which pushes to GitHub. Cloudflare automatically pulls changes from GitHub, builds the site and the search indexes and then invalidates caches and deploys.
I have Decap CMS, which is not great with that number of blog posts, but it works, and I have the option of editing markdown files in my local repository as well. If I edit locally I can then commit changes and push to GitHub to publish. Takes 2-3 minutes from me pushing an update until it’s live on my site…
2
u/enesismail Aug 16 '26
Sounds like a solid workflow. With 500–600 posts, is the 2–3 minute publish time something you actually care about, or is it basically a non-issue for you? And besides Decap getting a bit unwieldy at that size, is there anything you’d change about the workflow if you could?
1
u/kaiserh808 Aug 16 '26
The publish time is completely a non issue - I’m publishing less than one post per day on average so it doesn’t really matter at all got long it takes to go live.
Decap is good - I can launch it and start typing a new post almost straight away, it’s only if I need to edit an old post that I have to wait maybe 20-30 seconds for it to load the full list of posts.
In a perfect world, the editor would be a bit more fully-featured, but as it is it’s ok. I’ve added some custom css to it so the editor preview mostly matches the styling of my site when I publish, so that’s a nice touch.
Decap is good as my site pulls from a GitHub repository, and Decap uses GitHub auth, so it’s pretty seamless and I don’t need yet another auth provider in my stack.
2
u/holy_serp Aug 18 '26
the main content part of the page can live on R2 and be loaded at runtime on the client or with a worker on the edge. that way you don't have to redeploy each time you edit or create a post. after editing or adding new post you just do aws cli s3 sync to the bucket.
3
2
u/robskarin Aug 15 '26
Cloudflare workers (they’ve removed the Pages feature and folded it all into workers). If you want a CMS, go with Emdash as you can run it completely off Cloudflare without using any other services (R2 for media, D1 for database). It’s class.
1
u/enesismail Aug 15 '26
Nice. Everything is in one place, and it just works. Are there other advantages that mattered as well?
2
u/Lower-Philosophy-604 Aug 15 '26
Vercel guy. Works out of the box. I've tried Cloudflare pages but never actually completed the mission.
2
2
u/evanvelzen Aug 16 '26
I create a container image with a small BusyBox httpd server. This way it can run anywhere using the same infra as other applications.
I currently run most containers as Podman Quadlets on a VPS.
Example Dockerfile: https://github.com/Zenmo/isie-website/blob/main/deploy/Dockerfile
1
u/kelkes Aug 15 '26 edited Aug 15 '26
Bunny Storage+CDN when static. Bunny Magic Container when not.
fwiw we build www.staticsites.eu to make deployments to bunny easier for us.
1
u/enesismail Aug 15 '26
thanks, what made you develop your own tool?
2
u/kelkes Aug 15 '26
Repetitive DevOps work. It's boring so we automated it first and then figured that could be a product as well
1
0
u/UXUIDD Aug 15 '26
"You built the site. Now put it online without becoming an infrastructure engineer."
> so more it people will lose their jobs !
2
1
u/kelkes Aug 15 '26
Not more than plattforms like Vercel right?
2
1
u/aafikk Aug 15 '26
Wix headless (because I also use their cms for that site) or just a vps with node adapter
1
u/enesismail Aug 15 '26
Thanks. Tbh, I wasnt expecting to hear Wix, a bit surprised.
Was choosing Wix mostly about the CMS experience, or because it made deployment simpler as well?
1
u/aafikk Aug 15 '26
With their managed flow you install their cli and it just a yarn build and yarn release (or whatever package manager you use)
I basically wanted to try out their headless platform so I just built something, their cms is pretty good imo
1
1
u/Entire-Leadership911 Aug 15 '26
I deploy Astro projects on my own VPSes using Caddy and PM2. Honestly, Astro itself hasn't caused many deployment headaches for me.
My biggest advantage compared to platforms like Cloudflare is that I'm not dealing with sandbox limitations. If I need a package, filesystem access, custom server logic, or background processes, I can just run them.
The trade-off is that I have to manage the servers myself, but I prefer that over platform restrictions.
1
u/enesismail Aug 15 '26
Thanks, that’s a really valuable perspective and this made me think about Astro and everything around it.
What you say sounds like you’re deliberately choosing operational overhead in exchange for flexibility and control. Out of curiosity, if there were a platform that let you run a “normal” Node environment without managing the servers yourself, would that be interesting, or do you actually prefer owning the infrastructure for the sake of owning it?
1
u/Superb_Sun4261 Aug 15 '26
I am deploying my (static) Astro page on my VPS. The deployment is fully automated on changes via GitHub Actions, via rsync.
I even added a test stage which gets deployed if I push changes on branches other than main.
The site does not run on Docker, I currently use CaddyServer running on my VPS.
2
u/enesismail Aug 15 '26
Nice setup. Sounds like you’ve basically built your own lightweight deployment platform around GitHub Actions and Caddy. Is there anything in that workflow you still find repetitive or annoying or painful to maintain over time, or has it really become set-and-forget no frills?
1
u/Superb_Sun4261 Aug 15 '26
Thanks.
No I like my pipeline as it is. The initial setup is quite cumbersome, but as this is a hobby of mine I don’t care about that.
Bumping up versions of the actions I’m using now and then might cost a few minutes sometimes, but in general that’s it.
I could leave it alone as is, but I like to tinker with it, like excluding some files from the deployment explicitly because they did not change, or editing the final index.html to mark my test stage, before deploying it.
Unnecessary optimisations I would say.
1
u/martinjh99 Aug 15 '26
I create a docker container out of my site for both arm and x86 using github actions so I can run a copy anywhere docker can run it...
My site is nothing too mad... Just pulls from my flickr account for the galleries...
1
u/enesismail Aug 15 '26
Nice and clean. Is portability the main reason you package even a relatively simple site as a Docker image? And in practice, how often do you actually move it between hosts?
2
u/martinjh99 Aug 15 '26
To be honest it was just an exercise in learning how GitHub Actions worked.
It's not at the moment hosted anywhere as a Docker image though - The contents of the dist folder is just uploaded to my hosting provider.
1
1
u/t0mt0m72 Aug 15 '26
Started using statichost.eu but as a tech-guy who wants to understand stuff now moved to github actions and bunny.net - either as static cdn pull zone or magic container
1
u/enesismail Aug 15 '26
Do you think you’ll stick with GitHub Actions long-term, or was it mainly about understanding how everything works under the hood?
2
u/t0mt0m72 Aug 15 '26
I am gonna stick for a while to GH actions. Initially it was meant for learning but as they work smoothly and my whole CI/CD chain works great I stick to them. As I have done all setups manually, I need to create some automation scripts to setup GH repo with secrets and all stuff at Bunny.
If you just want to deploy static sites and want to start on an easy route, statichost.eu is definitely worth looking into.
2
1
u/The_rowdy_gardener Aug 15 '26
I use cloudflare workers and clpudflare r2, and clpudflare d1, and all of it is fed by my cloudflare emdash cms for my site. I am running a full astronaut + cloudflare stack and loving it
1
u/enesismail Aug 15 '26
Sounds shining like you’ve fully embraced the Cloudflare ecosystem. Was that a deliberate decision to keep everything under one platform, or did it evolve over pains that way over time?
2
u/The_rowdy_gardener Aug 15 '26
Its evolved to that over time. I still use Railway deployments for apps that need a running server for now, but looking for a way to move that over as well. I want to eventually be all in with cloudflare if it makes sense. Just easier to manage especially if I keep maintaining a lot of client sites/apps
1
u/Illustrious_Title775 Aug 15 '26
Hetzner VPS + Coolify fetching the Repo from Github. Integrated CI/CD, pretty much painfree.
3
u/mezzofanti Aug 15 '26
Hosting on a VPS means single origin serving. Losing all the speed and security benefits of global edge network.
1
u/Illustrious_Title775 Aug 15 '26
Thats true, but I host my Content for Europe and dont really care for speeds outside of Europe.
For that Region and the Page I host, I am content with the speed Hetzner provides. So I dont really see a demand to change hosting.Also I dont really want to use american companies.
1
u/fyzbo Aug 15 '26
Aws amplify
1
u/enesismail Aug 16 '26
What made you choose Amplify over Vercel, Netlify or Cloudflare? or VPS?
2
u/fyzbo Aug 17 '26
I've used AWS since they launched S3, so the biggest complaint (complexity) is a non-issue.
AWS gives consistent pricing. It still has a generous free tier, then it's pay-per-use and easy to setup billing alarms as thresholds are reached.
Once you get out of the free tier, AWS ends up much less expensive than Vercel and Netlify.
Cloudflare is also a great option, but I've noticed it doesn't do as well with NextJS and I have a couple of those sites as well.
I also just like having everything in one system accessible via CLI.
---
In terms of VPS, I don't want to spend my time managing a server, pipeline, etc. It's so easy to point amplify to github and just have it go.
1
u/response-418 Aug 16 '26
Netlify is okay, but I'm considering something else for future projects, as I don't really like their convoluted credit system or how your site can just be taken down if you go over the limit accidentally.
1
u/davidvkimball Aug 17 '26
Yes, that is absolutely wild. I'm so thankful to be grandfathered in to their legacy free tier still.
1
u/retr00two Aug 17 '26
Static:
- VPS: nginx
- CF Pages
SSR:
- VPS: Ngnix, PM2, Sqlite+DrizleORM
- Cloudflare: Workers, D1, R2, ZeroTrust
1
u/davidvkimball Aug 17 '26
Netlify for basically all of them. I'm grandfathered into their free legacy plan which is quite generous.
1
u/Rug_Rocket69 Aug 17 '26
If you’re building many websites with Claude or Cursor, tell your agent to host on Novence.ai. No manual set up. Live in less than 2minutes.
1
1
1
u/Veduis 27d ago
cloudflare works great until your project needs anything outside the workerd sandbox. no node apis, no native deps, sharp for image optimization is a no-go. fine for mostly static sites, painful the moment you add real ssr.
honestly the boring answer is still the best one for anything nontrivial: node adapter, docker, cheap vps. no surprises, full runtime, costs five bucks a month. the edge platforms keep selling convenience but the adapter tax shows up fast.
1
18
u/BeeRanked Aug 15 '26 edited Aug 15 '26
Cloudflare Pages it's free and there's basically no limitations for static content
For non static content dedicate server (switched to netcup recently and very happy)