Prerequisites
Image Overview
Two Dockerfiles are provided in the repository root:
The frontend image is based on
nginxinc/nginx-unprivileged:1.27-alpine and serves requests as a non-root user (UID 101) at runtime.
Building Images
Run the following from the repository root:VITE_API_BASE_URL argument. If both frontend and backend are on the same domain served by a reverse proxy, this is usually unnecessary. To set it explicitly:
Running Containers
Run the API Server Alone
Run the Web Frontend Alone
Common Port Mappings
Data Persistence
The API image stores image assets under/app/storage/generated-images. You must mount a volume when running the container, or images will be lost after a rebuild:
DATABASE_URL. Make sure the PostgreSQL instance on the host or in another container is reachable by the API container, and complete migrations before the first deployment.
Optional: Qdrant Vector Service
If you need knowledge base vector retrieval, the repository provides a standalone Qdrant service definition ininfra/docker-compose.qdrant.yml:
6333 (REST) and 6334 (gRPC), with a data volume named qdrant_storage. After starting it, point QDRANT_URL in server/.env to that address and confirm RAG_ENABLED=true.
Security Recommendations
When deploying on the public internet or a shared LAN, we recommend the following adjustments inserver/.env:
For the full variable list and descriptions, see Environment Variables.
Upgrades and Backups
Upgrade Steps
- Pull the latest source or the corresponding version tag.
- Rebuild the API and Web images.
- Stop and remove the old containers (data volumes are kept).
- Start new containers from the new images, mounting the original data volumes.
- If the database schema has changed, run migrations inside the API container (usually via Prisma).
Backup Checklist
- Back up the PostgreSQL database regularly.
- Back up image assets in the persistent volume
ai-novel-storage. - Export important works to local files as an extra safeguard.
The server image already includes the Prisma CLI at build time. For manual migrations, you can enter the running API container and run
prisma migrate deploy.Next Steps
Environment Variables
View the full server and frontend configuration reference
Architecture & Source Code
Learn about the tech stack, directory structure, and common commands
Installation & Download
Desktop users can download the installer directly