---
title: Deploy Typecho with AI on Blossom
url: "/deploy/typecho/"
canonical_url: https://blossom88.com/deploy/typecho/
markdown_url: https://blossom88.com/deploy/typecho.md
summary: Publish a short article with Typecho and keep its uploaded image across Container
  updates.
categories:
- deployment
- cms
stack:
- PHP
- Apache
- SQLite
---

# Deploy Typecho with AI on Blossom

[Typecho](https://github.com/typecho/typecho) is a PHP blogging app with a
Markdown editor and a media library. Start with a short post and one image.

## Ask Your Agent

> **Ask your AI agent:** Deploy Typecho privately on Blossom and help me publish a short article with an image.
>
> Follow this guide: https://blossom88.com/deploy/typecho/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and [choose a Location in your cloud account](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#connect-your-provider).

## How It Runs

| Part | Role | Where |
|---|---|---|
| Typecho | Serve the Markdown editor, posts, and media | Persistent Service |
| Volume | Keep SQLite, configuration, and uploaded files | Blossom Persistent Capacity |

## Deploy Typecho

Keep the site private with Blossom Account access while you set it up.
Run one [Persistent Service](/docs/apps/persistent-services/) with Typecho’s
SQLite database and uploads on a Volume at `/data`.

<details class="optional-reading" markdown="1">
<summary>Notes for your agent</summary>

Build from an [official Typecho release](https://github.com/typecho/typecho/releases)
using a compatible PHP Apache image. The tested build used
[Typecho 1.3.0](https://github.com/typecho/typecho/releases/tag/v1.3.0) with
PHP 8.4 and Apache. Confirm that PDO SQLite is enabled. Set the image
digest on the Environment and let the web Service inherit it. Declare
`apache2-foreground` as the web command.

On an empty Volume, run the stock CLI installer with
`TYPECHO_DB_ADAPTER=Pdo_SQLite` and `TYPECHO_DB_FILE=/data/typecho.db`.
Supply a private `TYPECHO_USER_PASSWORD` and set `TYPECHO_SITE_URL` to the
generated HTTPS Service URL. The installer prints the password, so keep
its output out of deploy logs.

Save the generated config outside the web root and restore it before
Apache starts. If only the config or only the database exists, inspect
the Volume before retrying setup. Point uploads at `/data/uploads` and
block HTTP access to the installer.

</details>

<details class="optional-reading" markdown="1">
<summary>Commands your agent runs</summary>

    blossom app_plan:preview --data typecho-plan.yml
    blossom environment:update --id environment-100 --data typecho-source.yml
    blossom service:create --data typecho.yml
    blossom environment:deploy --id environment-100 --follow

</details>

## Save a Draft With an Image

Sign in at `/admin/`. Write a short post, upload an image from the
attachment tab, and choose **Save Draft** (**保存草稿** in the default
Chinese interface).

![Write Workshop field notes with a sample image.](/deploy/assets/images/typecho/typecho-draft.webp)

> **Ask your AI agent:** Help me start a Typecho draft, upload an image, and add it to the post.

> Follow this guide: https://blossom88.com/deploy/typecho/



## Reopen and Publish the Draft

After replacing the Container, reopen the original draft and its image.
Choose **Publish** (**发布文章**), then open the post and check that the
image loads.

![Open the published post and original image after Container replacement.](/deploy/assets/images/typecho/typecho-published.webp)


> **Ask your AI agent:** Replace the Typecho Container, reopen my draft and image, and help me publish it.

> Follow this guide: https://blossom88.com/deploy/typecho/



## What You Get

- A Typecho site with a private sign-in
- A published Markdown article with an image
- Drafts, posts, and uploads kept across Container updates

Tested on Blossom: A draft and its exact uploaded image survived Container replacement and the draft then published successfully.
