[HN Gopher] Show HN: Self-hosted CMS on serverless Cloudflare
       ___________________________________________________________________
        
       Show HN: Self-hosted CMS on serverless Cloudflare
        
       Author : wenbin
       Score  : 208 points
       Date   : 2022-12-27 11:42 UTC (11 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | worldmerge wrote:
       | Very cool! I like how there is a nice visual editor. I hate using
       | markdown for blogging.
        
       | orliesaurus wrote:
       | I use bearblog.dev, super minimalistic, markdown first,
       | customizable...not self hosted but.. nice overall!
        
         | [deleted]
        
       | atmosx wrote:
       | I use middleman[^1] + bulmaCSS + FontAwesome but host on github
       | using the `github.io` domain and upload podcasts to
       | "archive.org"[^2]. I choose this setup to make sure content will
       | survive as much as possible.
       | 
       | ps. You might want to consider a donation to the internet
       | archive, see [^2] - no affiliation, just a happy user.
       | 
       | [^1]: https://middlemanapp.com/
       | 
       | [^2]: https://archive.org/
        
         | [deleted]
        
       | spaniard89277 wrote:
       | I just use PicoCMS and upload my markdown files through FTP. I
       | don't think there's anything out there that can compete with the
       | simplicity of this solution, not even static site generators.
       | 
       | It uses templates with Twig, and it's very simple PHP so you can
       | host it anywhere.
       | 
       | I once hit the frontpage of a big aggregator from my country and
       | it handled like it was nothing from a very cheap shared hosting.
       | 
       | From my Linux Mint laptop, all it takes is to open my FTP on
       | Thunar (which involves a click in my sidebar), and I'm navigating
       | it like any other file system. Right click, create file, write &
       | format my post, and save the file.
       | 
       | Viola, it's published.
       | 
       | Oh, and you can mix Markdown with HTML and JS in your posts. Less
       | stuff you need to learn.
        
         | synergy20 wrote:
         | is picocms still a static site? cms like drupal,wordpress can
         | control content access with password,which is where cms stands
         | out.
        
         | gernb wrote:
         | There are different definitions of simple. I found wordpress
         | simple because I could access the UI to post from any device. I
         | could upload images, save drafts, and preview posts. My static
         | site, basically requires a desktop/laptop PC and to preview I
         | have to build the site. This is far less simple to use even if
         | it's simpler to run
        
         | stefanvdw1 wrote:
         | I would argue that using something like Nuxt/Content[0]is even
         | simpler. I create a new markdown file in my website's local
         | repo, write the content and commit if it's ready for
         | publishing. No need for the FTP step and version control is
         | build in.
         | 
         | This setup is also completely free since the content lives on
         | GitHub and my static site on render.com (but any static site
         | hosting will work).
         | 
         | And since it's Nuxt based, it automatically also supports more
         | advanced features such as tagging, advanced queries and
         | filtering.
         | 
         | Can only recommend it!
         | 
         | 0. https://content.nuxtjs.org
        
           | indigodaddy wrote:
           | Looks like free tier for render.com static sites is 100G
           | egress per month. While this is sufficient for a low traffic
           | site, I'd probably want to protect myself by putting
           | Cloudflare (or some other free CDN) in front (yes I realize
           | that render.com has their own CDN network in front, but
           | that's still wrapped inside the 100G free tier limit it looks
           | like).
        
         | revskill wrote:
         | The hardest part to me, is install PHP.
        
           | indigodaddy wrote:
           | There are tons of very cheap hosting providers who are stable
           | and have been around a long time. You could look at
           | buyshared.net which is the webhosting arm of buyvm.net.
        
         | prox wrote:
         | What is good solution for hosting a domain anonymously? I want
         | to start blogging but don't want to do a personal one just yet.
         | I mean anonymous in lightweight general sense, not political
         | activist super security.
        
           | Dma54rhs wrote:
           | WhoisGuard and similar are in this case enough for privacy.
        
           | voytec wrote:
           | WHOIS[1] masking hides your information from the world. It's
           | a service provided by some domain sellers who, obviously,
           | will know those details (given them by you), as well as your
           | financial information as you can't usually lease domains
           | using untraceable transactions.
           | 
           | [1] https://en.wikipedia.org/wiki/WHOIS
        
             | prox wrote:
             | Thank you going to look into that!
        
         | [deleted]
        
       | JonathanBeuys wrote:
       | Why mix the type of software (A CMS for certain use cases) with
       | the distribution mechanism (Cloudflare Pages etc)?
       | 
       | Shouldn't that be two seperate issues?
        
         | [deleted]
        
         | ldoughty wrote:
         | My guess would be:
         | 
         | Traditional CMS you do the setup and plumbing in the server
         | because you have full control
         | 
         | Static website hosting you prebuild a website and push it up
         | all complied and done but in a standard supported format, do it
         | easily can go to different providers.
         | 
         | There's not much in between, because you can't (easily) write
         | code that is happy to run in two different systems controlled
         | by other people with different plumbing under the hood... It's
         | certainly doable, but the more you generalize the more
         | complicated your code gets... and the less you can benefit from
         | the vendor specific stuff (e.g. removing features that one side
         | does not support ... Or adding code to use it if it's there --
         | which makes code even more complicated)...
         | 
         | Edit: and to the point of code complexity: if you did this all
         | yourself in an alpha release, you likely would make a
         | company/product like forestry (mentioned elsewhere in this
         | discussion) because you've made something some people would
         | consider somewhat or very valuable
        
       | leetrout wrote:
       | This looks fantastic. I just started a podcast and was planning
       | to test publishing with cloudflare since it seems much cheaper
       | than the alternatives (and planning to backup to storj).
       | 
       | I will try this out this week!
        
       | throwaway81523 wrote:
       | "Self hosted" and "serverless Cloudflare" each have their
       | attractions, but they are contradicting terms, unless I'm
       | confused.
        
         | [deleted]
        
         | lloydatkinson wrote:
         | Running it on cloudflare by provisioning it yourself instead of
         | using something dedicated like wordpress or contentful.
        
           | 0b01 wrote:
           | This still makes no sense at all. Self hosting means running
           | a program on your own machine instead of on a cloud platform
           | such as cloudfalre.
        
             | geek_at wrote:
             | There is an ongoing debate in the selfhosting subreddits if
             | it's self hosted if it's not on your hardware.
             | 
             | Seems yes for rented servers like hetzner but gets more
             | heated when it's about "serverless"
        
             | lloydatkinson wrote:
             | So what do you want to call it then? "Running on a lower
             | level general compute abstraction with provided networking
             | infrastructure" instead of self-hosted?
        
       | kennywinker wrote:
       | This isn't directly related to the post, but it's a CMS related
       | question: does anybody know of a simple "static file" CMS that
       | also lets you deploy server side javascript functions? It's a
       | weird use case, so I suspect there may not be. I've solved it by
       | using a static site generator and a nginx reverse proxy to a node
       | server - but it's a lot of complexity for my use case (using
       | stripe to sell stuff, but stripe checkout requires server side
       | session creation).
       | 
       | Edit: Netlify Edge functions seems to be pretty much exactly what
       | I'm describing (drop js/ts files in a directory, deploy with your
       | static site). The only problem with it for me is it's not self-
       | hosted. Serveless functions would work, tho the separate
       | deployment adds a layer of complexity, and I'd have to learn CORS
       | finally lol
        
         | surfpel wrote:
         | Not exactly what you asked for, but if you use S3 + CloudFront,
         | you can use javascript functions in CloudFront that can modify
         | the request to/from the client & to/from the S3 bucket. Does
         | things like URL redirects, header manipulation, auth... I use
         | it to redirect ~/path/to/item/ to ~/path/to/item/index.html for
         | my static site.
         | 
         | https://docs.aws.amazon.com/AmazonCloudFront/latest/Develope...
        
         | IanCal wrote:
         | Netlify? Edge functions and functions may be what you're after
         | 
         | https://www.netlify.com/products/#netlify-edge-functions
        
           | kennywinker wrote:
           | Oh very cool! Yeah, Netlify Edge functions are pretty much
           | exactly what I'm after... except I was hoping for something
           | self-hosted.
        
             | IanCal wrote:
             | Maybe don't focus so much on the static site part, and have
             | a very slightly dynamic site where the majority of your
             | content is just paths that lead to stuff in /static. So
             | rather than trying to bolt a dynamic bit to static hosting,
             | making the simplest site with something like server.js
        
         | mmcnl wrote:
         | Isn't this what serverless functions are for? Vercel, Netlify,
         | Firebase would suit your needs.
        
         | somishere wrote:
         | Cloudflare Pages works well as a serverless option for this,
         | and without the separate deployment for functions, so no CORS
         | required. Couldn't recommend more.
        
       | jacooper wrote:
       | How is it self hosted and hosted cloudflare at the same time ?
        
         | manigandham wrote:
         | You host it on your own Cloudflare account.
        
           | ocdtrekkie wrote:
           | Are you self-hosting your pictures when you upload photos to
           | your Google Photos account?
        
             | manigandham wrote:
             | No. Self-hosting refers to running a _service_ where you
             | completely own the source code. You can run this on a
             | computer in your room, or a rented VPS, or a serverless
             | hosting option like Cloudflare Pages.
             | 
             | For example, if you run a Nextcloud instance and upload
             | pictures there, then you are self-hosting your photos.
        
             | webmobdev wrote:
             | Self-hosting means the ability to host and run the code on
             | your own server (home or webhost). Since Microfeed is built
             | on the _cloud services_ offered by Clouflare, you
             | technically can 't run it _independently_ on your own
             | server as you will still have to use the Clouflare
             | services:                   microfeed uses Cloudflare Pages
             | to host and run the code, R2 to host and serve media files,
             | D1 to store metadata, and Zero Trust to provide logins to
             | the admin dashboard.
             | 
             | @jacooper is correct that the term has been wrongly used by
             | the creator.
        
             | ldoughty wrote:
             | Is this GitHub repo were looking at self hosted because
             | it's his accounts repo?
             | 
             | I think you can ask 3 people this question and get 5
             | answers to where the "self hosting" line is drawn...
             | 
             | I am not sure were I would draw this line myself :-)
        
           | jacooper wrote:
           | Thats not self hosting, is it?
        
             | manigandham wrote:
             | It's a hosting service where you host your own copy of the
             | code. It's no different than getting a VPS and doing the
             | same thing.
             | 
             | If you have no access to the code then it would qualify as
             | being hosted for you.
        
             | moooo99 wrote:
             | Most people consider self-hosting as "running service x
             | yourself", which I think i fair considering most people
             | treat self-hosting as an alternative to SaaS offers
        
               | lopkeny12ko wrote:
               | Cloudflare is a SaaS.
        
               | moooo99 wrote:
               | No, Cloudflare is a company that offers many products.
               | And the services utilized by the project (Pages, D1, R2)
               | would most likely be classified as PaaS by most.
        
         | [deleted]
        
       | ocdtrekkie wrote:
       | "Self-hosted on Cloudflare" feels like an oxymoron. I know it's
       | common for people to consider hosting on VPS and the like to be
       | self-hosting, but attached to proprietary services seems to be a
       | step further, I think something being portable between providers
       | has to be a minimum for the term.
       | 
       | I like the idea of having web content you can put up with minimal
       | configuration and cost but we have to draw a line for that
       | definition somewhere.
        
         | [deleted]
        
       | colesantiago wrote:
       | It seems there is a growing movement of headless CMSs, but I am
       | afraid of vendor lock-in with Cloudflare and the like.
       | 
       | Are there any other CMS's that people are using these days?
       | Perhaps looking forward to be using in 2023?
        
         | addandsubtract wrote:
         | Strapi[0] is great and Payload[1] also looks promising.
         | 
         | [0] https://strapi.io/
         | 
         | [1] https://payloadcms.com/
        
         | programmarchy wrote:
         | Directus (https://directus.io)
        
         | Existenceblinks wrote:
         | Any new name in town? My perception is that 2022 is pretty much
         | web2 stagnation due to a lot of things.
        
         | chedabob wrote:
         | Forestry has been on my radar for a long time but never had a
         | need to use it https://forestry.io/
         | 
         | The big draw for me is it's just Hugo/Gatsby/Jekyll underneath,
         | and the output files can be delivered anywhere that will host
         | static files (CloudFlare pages does this really well, as does
         | Netlify).
        
           | jobsdone wrote:
           | Forestry is shutting down and pushing people to Tina instead.
           | I guess it is the same company? I don't really know.
        
             | mynameisvlad wrote:
             | Considering the infobox on the Forestry site directs users
             | to Tina with:
             | 
             | > _Our team_ is working on a V2 product. See it at Tina.io
             | (in beta).
             | 
             | I'm going to go ahead and say it's the same people.
        
           | Dma54rhs wrote:
           | Forestry is a dead product. Netlifly CMS seems dead as well,
           | only the CMS part though.
        
       | nonrandomstring wrote:
       | Please don't use this unless you wish to exclude those who would
       | like to enjoy your content but also respect their privacy.
       | Cloudflare continue to block Tor traffic by default. It is
       | discriminatory against innocent users and harmful to freedom of
       | speech (because speech also requires the ability to listen).
        
         | mikeiz404 wrote:
         | Are they blocking you outright or are you required to do
         | captchas?
         | 
         | From a 2016 post CloudFlare states they don't block Tor traffic
         | and don't let their customers block the traffic either but they
         | will put restrictions such as captchas in place [1].
         | 
         | 1: https://blog.cloudflare.com/the-trouble-with-tor/
        
           | nonrandomstring wrote:
           | Sometime last year I discussed this in more detail. I use a
           | text only browser with Tor. Most websites (still > 80% maybe)
           | load well, but the overwhelming majority of those that do not
           | are served via Cloudflare.
           | 
           | To me, their 2016 post claiming not to "block Tor traffic" is
           | disingenuous, since they are exceedingly hostile to it. I
           | only ever experience Cloudflare as an obstacle and nuisance
           | online.
           | 
           | I also deeply dislike their attitude and PR stand, which is
           | essentially victim blaming and disrespectful of those who
           | make different technological choices. Their message seems to
           | be;                 "We make an effort to sound sorry to
           | those who are harmed by our       business model. But you are
           | a minority, and we make a lot of       money. If you want to
           | make an omelet, you gotta break some eggs. Now       get out
           | of the road."
        
         | [deleted]
        
       | clarkrinker wrote:
       | Nice setup! I've been following Vercel and Cloudflare trying to
       | sync up their v8 isolates runtime: CF is going to be a great
       | option for running these "Edge Style" React apps once stuff
       | stabilizes.
        
       | Yair-Dovrat wrote:
       | Super cool. Thanks for sharing, going to set this up over the
       | weekend!
        
       | F117-DK wrote:
       | Seems very nice! Looking forward to have something like Supabase
       | or Pocketbase deployed directly on Cloudflare! _fingers crossed_
        
       | dangoor wrote:
       | Given that this uses multiple Cloudflare services, is anyone very
       | familiar with their pricing? The readme lists a "generous free
       | tier", but I always have to wonder what happens once you fall
       | outside of that tier. I remember that R2 is cheap (one of its
       | distinguishing features), but wonder if any of the other services
       | suddenly become $50 a month or something.
        
         | 015a wrote:
         | Cloudflare's free tiers are hard-free; they stop working if you
         | exceed the free tier usage (at least for compute; storage is
         | different).
         | 
         | Pages is essentially totally free. R2 is within the same
         | pricing magnitude as S3. D1 is a very new product and afaik is
         | still in beta and doesn't have production pricing yet; so be
         | weary there. Zero Trust is less usage and more per-user, I
         | think $7/mo/user.
        
           | Telemakhos wrote:
           | > be weary I've seen this mistake three or four times
           | recently, and it's starting to make me wonder why I keep
           | seeing it so often now, when I didn't before. "Wary" (like
           | "beware") means "cautious"; "weary" (like to "wear" someone
           | out) means "tired."
        
           | dangoor wrote:
           | Thanks! That's very helpful and sounds unlikely to get out of
           | control (short of hosting a wildly popular video)
        
             | psytrx wrote:
             | They definitely have sensible backout mechanisms for their
             | free tiers (i.e. Pages, they still serve static assets but
             | disable compute/Functions). Also, their docs are written
             | pretty well, and openly hint at dangerous price traps.
             | 
             | We launched a big presale this year with an e-commerce app
             | hosted on Workers, and we just barely hit the 5$ threshold
             | for the paid plan. Did not use more services (other than
             | DNS/proxy) though, so YMMV.
        
       ___________________________________________________________________
       (page generated 2022-12-27 23:00 UTC)