Cloudflare Pages Deployment
This page explains how to deploy the documentation site — the epusdt-docs VitePress project — to Cloudflare Pages.
If you only want Cloudflare to sit in front of a self-hosted Epusdt server, that is a different setup from Pages.
WARNING
This guide is for the documentation website only.
It does not deploy the Epusdt payment service itself. Epusdt is a server application and should be deployed with Docker, BaoTa, or a manual server setup.
What you are deploying
The epusdt-docs repository is a static VitePress site.
Repository:
Prerequisites
Before starting, make sure you have:
- a GitHub account
- a Cloudflare account
- permission to create or fork a repository
Step 1: Fork or connect the repository
Use the docs repository:
After forking, you may have a repository like:
https://github.com/your-username/epusdt-docsStep 2: Open Cloudflare Pages
- Sign in to Cloudflare
- Go to Workers & Pages
- Click Create application
- Choose Pages
- Click Connect to Git
Step 3: Connect your repository
- Authorize GitHub access if Cloudflare asks
- Select your
epusdt-docsrepository - Continue to build settings
Step 4: Configure build settings
The repository uses this script:
"docs:build": "vitepress build"Use these Cloudflare Pages settings:
| Setting | Value |
|---|---|
| Framework preset | VitePress if available, otherwise None |
| Build command | bun run docs:build |
| Build output directory | .vitepress/dist |
Base path caveat
The docs site uses the VitePress base setting from VITEPRESS_BASE, and falls back to / when that variable is not set.
That means:
- normal root deployment on a Pages domain usually works with the default config
- if you publish the site under a subpath, you must set a matching
VITEPRESS_BASE
Example:
VITEPRESS_BASE=/docs/Without a matching base path, links or static assets may break even though the build succeeds.
For a normal Cloudflare Pages project using its root domain like https://your-project.pages.dev/, leave VITEPRESS_BASE unset and keep the default /.
Step 5: Deploy
Click Save and Deploy.
Cloudflare Pages will:
- clone your repository
- install dependencies
- run the build command
- publish the generated static files
After a successful deployment, you will get a Pages URL similar to:
https://your-project.pages.devStep 6: Add a custom domain (optional)
If you want to use your own domain for the docs site:
- open your Pages project
- go to Custom domains
- click Set up a custom domain
- enter a domain such as
docs.example.com - follow Cloudflare's DNS instructions
Updating the site later
Once Pages is connected to GitHub, pushes to the tracked branch trigger a rebuild automatically.
Troubleshooting
Build fails on Cloudflare Pages
Check these values first:
- Build command:
bun run docs:build - Output directory:
.vitepress/dist
Also make sure the repository still contains the normal project files such as package.json and the VitePress source content.
The site deploys but styles or assets are missing
This usually means the deployed URL path and the VitePress base path do not match.
If you are deploying under a subpath, set VITEPRESS_BASE to the same path, including the trailing slash.
Can I deploy Epusdt itself on Cloudflare Pages?
No. Cloudflare Pages is for static sites, while Epusdt itself is a backend application with runtime configuration, storage, and payment-processing logic.
Can Cloudflare sit in front of a self-hosted Epusdt origin?
Yes, Cloudflare CDN or proxy can sit in front of your own server domain, but that is different from Cloudflare Pages. It does not make Epusdt a static app, and it does not change the fact that Epusdt itself expects root-relative routes unless your reverse proxy rewrites them.
