til/applied-sciences/engineering/free-static-site-hosting
free-static-site-hosting.mdupdated 2026-07-203833 words
ダブルクリックで英日反転
Applied Sciences · Engineering

Why a personal site runs completely free — Cloudflare Pages + GitHub Actions

EN

This site (nikinakamura.com) is a static export deployed to Cloudflare Pages, rebuilt automatically by GitHub Actions on every push to main. Both have free tiers a personal site never exhausts — so the running cost stays at $0.

The free pieces

  • Cloudflare Pages (the host) serves your static files from Cloudflare's global network; the free plan allows 500 deploys per month (Cloudflare docs).
  • GitHub Actions (the build robot) is free for public repositories on standard runners (GitHub docs) — it runs the build and uploads the result on every push.
  • Cloudflare D1 (a small database for editable notes and comments) is free up to 5 GB storage, 5M row-reads/day, and 100k row-writes/day (Cloudflare docs) — far above a personal site's traffic.

Why hosting is free at all

  • Serving static files is cheap: Cloudflare already runs a worldwide CDN (content delivery network = cache servers near users), so adding your files is near-zero marginal cost.
  • The free tier is a funnel — it gets you onto the platform so you might later pay for scale, custom features, or a business plan (the freemium model).
  • A static site has no always-on server to rent; there's nothing running between visits to pay for.

The jargon you saw

  • tier = a plan level (free / paid). The free tier is the no-cost band with usage quotas.
  • config = a settings file that tells a tool how to behave (e.g. next.config.mjs, wrangler.toml).
  • wrangler = Cloudflare's command-line tool for deploying and managing Pages, Workers, and D1.
  • .mjs = a JavaScript file written as an ES Module (the modern import/export style); the m marks it as a module.
Static files + a CDN's free tier + free CI for public repos = a real site at $0. You only start paying when traffic or features outgrow the free quotas — which a personal notes site won't.
応用科学 · エンジニアリング

個人サイトを​完全無料で​運用できる​理由 — Cloudflare Pages と​ GitHub Actions

JP

この​サイト​(nikinakamura.com)は​静的書き出し​(=完成済みファイルと​して​出力した​もの)を​ Cloudflare Pages に​置き、​main への​ push​(=変更の​反映)の​たびに​ GitHub Actions が​自動で​作り直している。​どちらも​個人サイトでは​使い​切れない​無料枠が​あり、​運用費は​$0のまま。

無料で​成り​立っている​部品

  • Cloudflare Pages​(=クラウドフレア・ページズ、​ホスティング=サイトを​世界に​公開する​置き場)が​静的ファイルを​Cloudflareの​世界中の​ネットワークから​配信する。​無料プランは​月500デプロイ​(=公開反映)まで​(Cloudflare 公式)。
  • GitHub Actions​(=ギットハブ・アクションズ、​自動作業ロボット)は​公開リポジトリ​(=誰でも​見られる​コード置き場)​+標準ランナーなら​無料​(GitHub 公式)​——push の​たびに​ビルド(=公開用に​組み立てる​処理)を​実行し結果を​送り込む。
  • Cloudflare D1​(=編集可能な​ノートや​コメント用の​小さな​データベース)は、​保存5GB・​読み込み500万行/日・​書き込み10万行/日まで​無料​(Cloudflare 公式)​——個人サイトの​通信量を​はるかに​上回る​余裕。

そも​そも、​なぜ​公開が​無料なのか

  • 静的ファイルの​配信は​安い​:Cloudflare は​すでに​世界規模の​CDN​(=Content Delivery Network、​利用者の​近くに​ファイルを​置いて​速く​届ける​キャッシュ用サーバー群)を​運用しているので、​あなたのファイルを​載せる​追加コストは​ほぼゼロ。
  • 無料枠は​「入口​(funnel)」​——まず​使って​もらい、​規模拡大や​上位機能・法人プランで​後から​課金して​もらう​狙い​(フリーミアム=基本無料+一部​有料の​商売の​型)。
  • 静的サイトには​常時動かすサーバーが​要らない​——アクセスと​アクセスの​間に​動き続けて​課金される​対象が​そもそも​無い。

出てきた​専門語の​整理

  • ティア​(tier)​=プランの​段階​(無料/有料)。​無料ティアは、​使用量の​上限つきで​費用ゼロの帯。
  • config​(コンフィグ)​=ツールの​動き方を​指定する​設定ファイル​(例:next.config.mjs、​wrangler.toml)。
  • wrangler​(ラングラー)​=Cloudflareの​コマンドライン道具​(=文字で​命令する​操作ツール)。​Pages・Workers・D1 の​公開や​管理に​使う。
  • .mjs = ES Module​(=今​どきの​ import/export と​いう​コード部品の​出し入れ方​式)で​書いた​JavaScriptファイル。​先頭の​ m が​「モジュール​(部​品)」である​ことを​示す。
静的ファイル+CDNの​無料枠+公開リポジトリ向けの​無料CI​(=自動ビルド)​= 本物の​サイトが​$0。​課金が​始まるのは​通信量や​機能が​無料枠を​超えた​ときだけ——個人の​ノートサイトでは​まず​超えない。
148 notestil