
Convex Self Hosting
- 2 installs
- 627 repo stars
- Updated May 20, 2026
- waynesutton/markdown-site
Integrates Convex static self-hosting into apps using upstream instructions, covering upload APIs, HTTP routes, deploy scripts, and migration across React, Vite, and Next.js.
About
This skill sets up Convex-based static self-hosting repeatably across projects, checking the latest upstream integration guide before any change. A developer uses it when configuring upload APIs, HTTP routes, deploy scripts, migrating from external hosting, or troubleshooting static deploys.
- Mandatory upstream check against get-convex/self-hosting before changes
- Covers upload APIs, HTTP routes, and deploy scripts across frontends
Convex Self Hosting by the numbers
- 2 all-time installs (skills.sh)
- +1 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #1,139 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/waynesutton/markdown-site --skill convex-self-hostingAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 2 |
|---|---|
| repo stars | ★ 627 |
| Last updated | May 20, 2026 |
| Repository | waynesutton/markdown-site ↗ |
What it does
Integrates Convex static self-hosting into apps using upstream instructions, covering upload APIs, HTTP routes, deploy scripts, and migration across React, Vite, and Next.js.
Files
Convex self hosting skill
Use this skill to integrate Convex based static hosting in a repeatable way across projects.
Non negotiable update check
Run this check before making any code changes or giving setup advice.
Preferred command:
bash skills/convex-self-hosting/scripts/check-upstream.sh1. Read latest integration guide:
https://raw.githubusercontent.com/get-convex/self-hosting/main/INTEGRATION.md
2. Read latest README manual setup section:
https://github.com/get-convex/self-hosting?tab=readme-ov-file#manual-setup-1
3. Read Convex docs index for current guidance:
https://docs.convex.dev/llms.txt
4. Confirm package publish state:
npm view @convex-dev/self-hosting version
If upstream docs conflict with local rules, follow upstream docs and explain what changed.
Clarifying questions you must ask first
Ask these before implementing:
1. Confirm get-convex/self-hosting is the source of truth for this setup. 2. Is the target app Vite, Next.js, Expo web export, or another bundler. 3. Do they want root path hosting or a prefix like /app. 4. Do they want one shot deploy or separate backend and static deploy steps. 5. If package is unpublished, do they want:
- GitHub dependency install
- vendored local copy
- wait for npm release
Never assume unpublished package install details.
Install strategy
Path A published package
If npm package exists, use the package directly.
npm install @convex-dev/self-hostingPath B package not published yet
If package is missing on npm, use GitHub source and pin to commit or tag.
npm install github:get-convex/self-hosting#mainIf project policy requires deterministic builds, ask for a commit SHA and pin to it.
Required file changes
Use the latest upstream file patterns from INTEGRATION.md.
1) convex/convex.config.ts
import { defineApp } from "convex/server";
import selfHosting from "@convex-dev/self-hosting/convex.config";
const app = defineApp();
app.use(selfHosting);
export default app;2) convex/staticHosting.ts
import { components } from "./_generated/api";
import {
exposeUploadApi,
exposeDeploymentQuery,
} from "@convex-dev/self-hosting";
export const { generateUploadUrl, recordAsset, gcOldAssets, listAssets } =
exposeUploadApi(components.selfHosting);
export const { getCurrentDeployment } =
exposeDeploymentQuery(components.selfHosting);3) convex/http.ts
import { httpRouter } from "convex/server";
import { registerStaticRoutes } from "@convex-dev/self-hosting";
import { components } from "./_generated/api";
const http = httpRouter();
registerStaticRoutes(http, components.selfHosting);
export default http;Optional prefix mode:
registerStaticRoutes(http, components.selfHosting, {
pathPrefix: "/app",
spaFallback: true,
});4) package.json scripts
{
"scripts": {
"deploy": "npx @convex-dev/self-hosting deploy",
"deploy:static": "npx @convex-dev/self-hosting upload --build --prod"
}
}Deployment flow
First setup
npm install @convex-dev/self-hosting
npx @convex-dev/self-hosting setup
npx convex dev --once
npm run deployOngoing deploys
npm run deployTwo step deploy alternative
npx convex deploy
npx @convex-dev/self-hosting upload --build --prodAlways use the tool driven build flow. Do not run npm run build first when using upload deploy commands.
Cross app support notes
- Vite: use
--buildflow as default. - Next.js and Expo: pass through
VITE_CONVEX_URLin the app build script as documented upstream. - Existing API routes: prefer
pathPrefix: "/app"for static hosting. - Keep upload APIs internal only and never expose them as public HTTP actions.
Integration with convex agent plugins
If get-convex/convex-agent-plugins is present, follow its Convex rules with this skill:
- keep validators on all Convex functions
- keep internal functions for upload operations
- use indexed reads, avoid broad filtering in data access patterns
- preserve strict TypeScript in generated Convex and frontend code
Reference:
https://github.com/get-convex/convex-agent-plugins
Troubleshooting checklist
1. 404 for static routes:
- verify
convex/http.tsexists and exports router.
2. Cannot find module .../convex.config:
- verify package install source and import path.
3. wrong backend URL in built assets:
- redeploy with CLI
--buildflow.
4. no updates visible:
- clear cache and verify deployment ID changes.
5. HTTP actions disabled:
- run
npx convex devonce to push backend state.
Completion requirements
Before finishing, provide:
1. exact upstream docs commit date or latest retrieval timestamp 2. which package path was selected and why 3. list of changed files 4. commands the user should run next
Never claim setup is complete without showing these four outputs.
Source links
https://github.com/get-convex/self-hostinghttps://raw.githubusercontent.com/get-convex/self-hosting/main/INTEGRATION.mdhttps://github.com/get-convex/self-hosting?tab=readme-ov-file#manual-setup-1https://docs.convex.dev/llms.txthttps://github.com/get-convex/convex-agent-pluginshttps://github.com/agentskills/agentskills
interface:
display_name: Convex self hosting
short_description: Set up and update Convex static self hosting with mandatory upstream checks
default_prompt: Integrate Convex self hosting in this app using the latest upstream instructions, ask the required clarifying questions first, then implement the minimal safe setup.
#!/usr/bin/env bash
set -euo pipefail
echo "== Convex self hosting upstream check =="
echo "timestamp_utc=$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
SELF_HOSTING_REPO="https://github.com/get-convex/self-hosting"
INTEGRATION_URL="https://raw.githubusercontent.com/get-convex/self-hosting/main/INTEGRATION.md"
MANUAL_SETUP_URL="https://github.com/get-convex/self-hosting?tab=readme-ov-file#manual-setup-1"
CONVEX_LLMS_URL="https://docs.convex.dev/llms.txt"
PLUGIN_REPO_URL="https://github.com/get-convex/convex-agent-plugins"
echo
echo "sources:"
echo " repo=${SELF_HOSTING_REPO}"
echo " integration=${INTEGRATION_URL}"
echo " manual_setup=${MANUAL_SETUP_URL}"
echo " convex_llms=${CONVEX_LLMS_URL}"
echo " plugins=${PLUGIN_REPO_URL}"
echo
echo "head_commit_self_hosting=$(git ls-remote https://github.com/get-convex/self-hosting.git HEAD | awk '{print $1}')"
echo
echo "checking npm publish status..."
if npm view @convex-dev/self-hosting version >/tmp/self_hosting_version.txt 2>/tmp/self_hosting_err.txt; then
echo "npm_self_hosting_version=$(cat /tmp/self_hosting_version.txt)"
else
echo "npm_self_hosting_version=UNPUBLISHED"
fi
fetch_sha256() {
local url="$1"
local label="$2"
local tmp_file
tmp_file="$(mktemp)"
if curl -fsSL "$url" -o "$tmp_file"; then
local digest
digest="$(shasum -a 256 "$tmp_file" | awk '{print $1}')"
echo "${label}_sha256=${digest}"
else
echo "${label}_sha256=UNAVAILABLE"
fi
rm -f "$tmp_file"
}
echo
echo "quick content fingerprints..."
fetch_sha256 "$INTEGRATION_URL" "integration"
fetch_sha256 "$CONVEX_LLMS_URL" "convex_llms"
echo
echo "done"