Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/syhily/yufan.me/llms.txt

Use this file to discover all available pages before exploring further.

yufan.me is a self-hosted blog CMS that you run on your own infrastructure. This guide walks you through cloning the repository, connecting a Postgres database and Redis instance, starting the dev server, and completing the two-stage install flow so your blog is ready to publish its first post.
1

Clone the repo and install dependencies

Clone the repository from GitHub and install its dependencies using the Vite+ (vp) package manager:
git clone https://github.com/syhily/yufan.me.git
cd yufan.me
vp install
If you don’t have vp installed yet, you can use npm install for the initial setup — but use vp add / vp remove / vp update for all subsequent package operations to avoid toolchain issues.
2

Configure your environment

Copy the example environment file and fill in your connection strings:
cp .env.example .env
Open .env and set the three required variables:
DATABASE_URL=postgres://user:pass@host:5432/db
REDIS_URL=redis://host:6379
SESSION_SECRET=<high-entropy secret>
These are the only values required to boot. The full .env.example also includes optional variables:
  • HOST and PORT — default to 0.0.0.0:4321
  • MAXMIND_DB_PATH — filesystem path to a MaxMind GeoLite2-City .mmdb file for geo-enriched analytics
  • ANALYTICS_TRACK_ADMIN — set to true to include your own visits in the analytics dashboard (defaults to false)
3

Start the dev server

Run the development server with hot module replacement:
vp dev
The server starts at http://localhost:4321. On the very first boot, every request redirects to /admin/setup — this is the install gate, and it stays active until you complete the next step.
4

Complete the install gate

The install flow is split into two stages, both at /admin/setup.Stage 1 — Create your admin accountOpen http://localhost:4321/admin/setup and fill in the form to create the first admin user. After you submit, you are automatically signed in and redirected to stage 2.Stage 2 — Configure site identity and assetsThe second form at /admin/setup/settings collects the two settings sections that require your input:
  • General (blog.general) — site name, tagline, language, timezone, and other identity fields
  • Assets (blog.assets) — your asset host URL and, optionally, S3 credentials for object storage
When you submit this form, yufan.me writes all 14 settings rows atomically: your supplied values for general and assets, plus sensible defaults for the remaining 12 sections (navigation, SEO, comments, caching, rate limits, and more). Object storage is toggled off by default — you can enable it later from /admin/settings/assets.The install gate lifts immediately after this step completes.
5

Access the admin console

Navigate to http://localhost:4321/admin to open the admin console. From here you can:
  • Create and publish posts and pages using the Tiptap editor
  • Manage categories, tags, and friends
  • Upload images and music to the media library
  • View the analytics dashboard
  • Fine-tune any of the 14 settings sections under /admin/settings
After the install gate clears, your public blog is live at / and the admin console is available at /admin. Both surfaces are served from the same process — no separate deployment is needed.

What to do next

Configure environment variables

Review all available environment variables and their defaults.

Customize site settings

Explore the 14 settings sections and what each one controls.

Deploy with Docker

Build and run yufan.me in a container using the included Dockerfile.

Write your first post

Create and publish a post using the Tiptap editor.

Build docs developers (and LLMs) love