Skip to content

Self-Hosting Guide

최규민

May 20, 20262 min read

Self-Hosting Guide

Self-hosting

Code-accurate self-hosting notes

✅
The project uses Next standalone output. Static pages are generated at build time, while API routes such as /api/search, /api/revalidate, and /api/notion-image still need runtime environment variables.
  • If you set NOTION_IMAGE_SIGNING_SECRET, keep the same value available during build and runtime so pre-rendered image URLs validate later.
  • The Dockerfile accepts build-time Notion args for static generation. docker-compose passes runtime env values to the container.
  • Run npm run build with the same major Node version you plan to use in production when possible.

Notion-As-Blog can run on infrastructure you control. The project uses Next.js standalone output, which is suitable for containers and long-running Node.js servers.

Build and run

bash
npm install
npm run build
npm start

Runtime requirements

  • Provide all production environment variables to the server process.
  • Terminate TLS at a reverse proxy or load balancer.
  • Forward host and protocol headers when possible.
  • Cache static assets aggressively, but be careful with dynamic API responses.

Images and ISR

Vercel provides a managed CDN and image pipeline. In self-hosted environments, verify image optimization, cache headers, and ISR behavior in your runtime.

  • Use the same Node.js major version in build and production.
  • Verify /api/search, /feed.xml, /sitemap.xml, and one post page.
  • Monitor logs for Notion API 401, 403, 404, and 429 responses.