Generate Your First Docs Site
You want a working docs site fast, without wiring up the stack manually first. This guide uses the built-in Docker path so you can start the app, sign in as admin, and generate documentation for a repository right away.
Prerequisites
- Docker with Compose
- A new
ADMIN_KEYwith at least 16 characters - A Git repository URL over HTTPS or SSH
- A supported AI provider that can run inside the container; the image includes
claude,gemini, andcursor
Quick Example
cp .env.example .env
mkdir -p data
ADMIN_KEY=replace-with-a-strong-secret
SECURE_COOKIES=false
docker compose up --build -d
curl http://localhost:8000/health
- Open
http://localhost:8000/login. - Sign in with username
adminand theADMIN_KEYvalue from.env. - Click
New Generation. - Enter
https://github.com/myk-org/for-testing-only. - Leave
Branchasmain. - Leave
Providerascursor. - In
Model, typegpt-5.4-xhigh-fast. - Click
Generate. - When the status becomes
Ready, clickView Documentation.
Note:
SECURE_COOKIES=falseis the right setting for plain localhttp://localhost. If you move docsfy behind HTTPS, turn it back on.Tip: The
Modelfield accepts typed values, so you can enter a model even when no suggestions are shown yet.
Step-by-Step
- Create your local config.
cp .env.example .env
ADMIN_KEY=replace-with-a-strong-secret
SECURE_COOKIES=false
ADMIN_KEY is required at startup, and the built-in admin login uses that value as its password.
Warning:
ADMIN_KEYmust be at least 16 characters long or the server will not start.Warning: Keep
ADMIN_KEYin a local.envor secret store, not in git-tracked files.
- Start docsfy with Docker Compose.
mkdir -p data
docker compose up --build -d
curl http://localhost:8000/health
A successful response means the app is up. The app listens on http://localhost:8000, and ./data keeps your database and generated sites between restarts.
-
Sign in as
admin. -
Open
http://localhost:8000/login. - Enter username
admin. - Enter the
ADMIN_KEYvalue from.env. - Click
Sign In.
After login, the dashboard opens and the New Generation flow is available immediately.
-
Generate your first site.
-
Click
New Generation. - In
Repository URL, enterhttps://github.com/myk-org/for-testing-only. - Keep
Branchasmain. - Leave
Providerascursor. - In
Model, typegpt-5.4-xhigh-fast. - Click
Generate.
If another provider is already working in the container, pick that provider instead and type the model you want to use.
Note: Repository URLs can use HTTPS or SSH. For a first run, a public HTTPS repo is the simplest path.
- Open the result.
The detail view updates in real time while the site is being built. When the status changes to Ready, click View Documentation to open the generated site in a new tab.
See Track Generation Progress for the live status view and activity log. See View, Download, and Publish Docs for downloading or publishing the output.
Advanced Usage
To keep the stack running in the background and watch logs only when you need them:docker compose logs -f
docker compose down
docker build -t docsfy .
docker run --rm \
-p 8000:8000 \
--env-file .env \
-v "$(pwd)/data:/data" \
docsfy
Troubleshooting
- The container exits immediately: check that
ADMIN_KEYis set and at least 16 characters long. - The login page loads but you cannot stay signed in on
http://localhost:8000: setSECURE_COOKIES=false, then restart the container. - A generation switches to
Errorright away: the selected provider or model is not ready in the container. Try a working provider/model pair or see Fix Setup and Generation Problems. - A branch name is rejected: use a single branch segment such as
main,dev, orrelease-1.x. Branch names with/are rejected. - A repository URL is rejected: use a Git URL over HTTPS or SSH, not a bare local path.