匿名提问箱 / Anonymous Question Box
Copy this prompt into an Agent with terminal access to your deployment host.
Read the deployment guide at https://github.com/wuhan005/NekoBox/blob/master/README.md
and deploy NekoBox on the target server. Build and start the Go API, then build and serve the Vue frontend separately.
Ask me for any missing deployment settings.
Verify that the frontend loads and GET /api/captcha/config returns HTTP 200 with JSON,
then report the site URL.
| Component | Build directory | Toolchain | Output |
|---|---|---|---|
| Go API | Repository root | Go 1.27+ | NekoBox |
| Vue frontend | web/ |
Node.js 22.12+ and pnpm 9 | web/dist/ |
git clone https://github.com/wuhan005/NekoBox.git
cd NekoBox
go build -o NekoBox ./cmd
cp conf/app.sample.ini conf/app.iniFor Linux AMD64, prefix the build command with GOOS=linux GOARCH=amd64.
Edit conf/app.ini before starting the API. See the configuration template for other settings.
[app] external_urlis the public frontend URL.- Set
[server] portto8080for the Docker example below. - Set
type(postgresormysql),host,port,user,password, andnameunder[database]. Setaddrunder[redis].
./NekoBox webCreate web/.env.production.local with your site's URL and API path.
VITE_EXTERNAL_URL=https://box.example.com
VITE_BASE_URL=/apiFor reCAPTCHA, set VITE_RECAPTCHA_SITE_KEY and the matching backend secret in [recaptcha] server_key.
cd web
pnpm install --frozen-lockfile
pnpm buildServe web/dist/ with an index.html fallback for frontend routes.
- Same origin. Use
VITE_BASE_URL=/apiand proxy/api/and/service/to the backend with their paths intact. - Separate origins. Set
VITE_BASE_URLto the full API URL (e.g.https://api.example.com/api) and add the frontend host (e.g.box.example.com) to[app] cors_allow_domains.
Images are published for each Git tag.
- API —
ghcr.io/wuhan005/nekobox:<tag> - Frontend —
ghcr.io/wuhan005/nekobox-web:<tag>(built withweb/.env.production)
Build the backend image from the root of a fresh checkout.
docker build -t nekobox-api .Prepare conf/app.ini and web/.env.production.local as above. Use database and Redis addresses reachable from the
backend container. Then run from the repository root.
docker build -t nekobox-web ./web
docker run -d --name nekobox-api -p 127.0.0.1:8080:8080 \
-v "$PWD/conf/app.ini:/home/app/conf/app.ini:ro" nekobox-api
docker run -d --name nekobox-web -p 127.0.0.1:8081:80 nekobox-webFor same-origin hosting, route /api/ and /service/ to 127.0.0.1:8080 and frontend traffic to 127.0.0.1:8081.
