Skip to content

docs(guides): expand Windows setup with verification, troubleshooting, and quick-reference#1102

Open
notsoblack wants to merge 2 commits into
midnightntwrk:mainfrom
notsoblack:improve-windows-setup-guide
Open

docs(guides): expand Windows setup with verification, troubleshooting, and quick-reference#1102
notsoblack wants to merge 2 commits into
midnightntwrk:mainfrom
notsoblack:improve-windows-setup-guide

Conversation

@notsoblack

Copy link
Copy Markdown

Summary

Significantly improves the windows-compact-setup.mdx guide to reduce friction for Windows developers onboarding to Midnight.

What's changed

Added

  • Prerequisites table — Windows version requirements, virtualization check, disk space, and admin rights
  • Virtualization verification — PowerShell systeminfo command to confirm Intel VT-x / AMD-V is enabled before starting
  • Step-by-step verification after every major install (WSL, Docker, proof server, Compact compiler)
    • Example: wsl -l -v should show VERSION 2, docker run hello-world, curl http://localhost:6300
  • Detached mode for proof serverdocker run -d --restart unless-stopped ... so developers don't need to keep a terminal window open permanently
  • Proof server health checkcurl http://localhost:6300 to confirm connectivity before proceeding
  • Dynamic VSIX download instructions — Replaced hardcoded compact-0.2.13 link with guidance to always fetch the latest release
  • Comprehensive troubleshooting tables covering:
    • WSL: elevation errors, kernel update, virtualization disabled
    • Docker: command not found in WSL, daemon not running, port conflicts
    • Proof server: firewall blocking, container exiting immediately
    • Compact: PATH not updated, DNS failures, VSIX architecture mismatch
  • Quick-reference checklist — A printable checklist at the end so developers can verify every step before moving to the hello-world tutorial

Improved

  • Structure now follows "install → verify → troubleshoot" for each component
  • Added expected output examples so developers know when a step succeeded
  • Clarified that Compact must be installed inside WSL, not Windows natively

Why this matters

The current guide assumes everything works smoothly, but Windows + WSL + Docker is a common failure point for new developers. These additions reduce support burden and improve first-time setup success rate.

Checklist

  • Content follows the Midnight documentation style guide
  • Headings are maximum three levels deep
  • No private repository references
  • Language is precise and focused on architecture/processes

…ooting, and quick-reference checklist

- Add system prerequisites table (Windows version, virtualization, disk space)
- Add virtualization verification via systeminfo
- Add step-by-step verification commands after each install step
- Add detached mode instructions for proof server with --restart policy
- Add curl health-check for proof server connectivity
- Replace hardcoded VSIX version with dynamic 'latest release' instructions
- Add comprehensive troubleshooting tables for WSL, Docker, proof server, and Compact issues
- Add quick-reference completion checklist for developers
@notsoblack notsoblack requested review from a team as code owners June 25, 2026 17:24
@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Midnight Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@oduameh

oduameh commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

cc @pataei


**Expected output:**

```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multiple "Expected output" code blocks throughout this PR are missing language identifiers. The style guide requires every fenced code block to have a language tag.

Add text to these bare code fences:

  • Line 34 (Hyper-V output)
  • Line 99 (WSL version output)
  • Line 147 (Docker hello-world output)
  • Line 183 (proof server startup output)
  • Line 212 (docker ps output)
  • Line 272 (compact version output)

Change each opening ``` to ```text.


## Install Ubuntu

Developing DApps for the Midnight network often requires compiling and running various components (like the proof server or complex scripts) that are traditionally Linux-based. The Windows Subsystem for Linux (WSL) is a critical component that allows you to run a native Linux environment directly within Windows without the overhead of a traditional virtual machine.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brand terminology: always "Midnight Network" (both words capitalized).

Suggested change
Developing DApps for the Midnight network often requires compiling and running various components (like the proof server or complex scripts) that are traditionally Linux-based. The Windows Subsystem for Linux (WSL) is a critical component that allows you to run a native Linux environment directly within Windows without the overhead of a traditional virtual machine.
Developing DApps for the Midnight Network often requires compiling and running various components (like the proof server or complex scripts) that are traditionally Linux-based. The Windows Subsystem for Linux (WSL) is a critical component that allows you to run a native Linux environment directly within Windows without the overhead of a traditional virtual machine.

To ensure WSL is running the correct version, you can execute this command in the Windows PowerShell:
To ensure WSL is running the correct version, execute this command in Windows PowerShell:

```bash

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a Windows PowerShell command, not a bash command. Change the language tag from bash to powershell.

Same applies to line 57 (wsl --install -d ubuntu).

## Set up and run the midnight proof server

The **Midnight Proof Server** is the core component that your DApps will communicate with to execute zero-knowledge proofs and transactions. It is run via **Docker** for consistency.
The **Midnight Proof Server** is the core component that your DApps will communicate with to execute zero-knowledge proofs and transactions. It is run via **Docker** for consistency.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proof server generates proofs; it doesn't execute transactions. Transactions are submitted to the node.

Suggested change
The **Midnight Proof Server** is the core component that your DApps will communicate with to execute zero-knowledge proofs and transactions. It is run via **Docker** for consistency.
The **Midnight Proof Server** generates zero-knowledge proofs that your DApps need for shielded transactions. It runs via **Docker** for consistency.

Alternatively, pull the image directly from your Ubuntu terminal:

```bash
docker pull midnightntwrk/proof-server:latest

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pulls latest but the docker run command on line 178 uses 8.0.3. Pick one approach and be consistent within the file. The getting-started guide uses latest; the tutorials pin to 8.0.3. Either way, both references in this file should match.

Comment on lines +233 to +241
```bash
curl http://localhost:6300
```

**Expected output:**

```json
{"message":"Midnight Proof Server"}
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This endpoint and response don't match documented behavior. The documented health endpoint is /health and returns {"status":"ok"} (see docs/examples/dapps/bboard.mdx:249).

Fix the curl command to:

curl http://localhost:6300/health

And the expected output to:

{"status":"ok"}

Verify the actual response against a running proof server before committing.

sudo apt-get install gh

# Download the latest VSIX
latest_version=$(curl -s https://api.github.com/repos/midnight-ntwrk/releases/contents/artifacts/vscode-extension | grep -o '"name": "compact-[^"]*"' | tail -1 | sed 's/.*"compact-(.*)".*//')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sed command has two bugs:

  1. Missing -E flag -- without it, () are literal characters, not capture groups
  2. Missing \1 backreference -- the replacement is empty instead of the captured version

As written, this silently outputs the original string unchanged, so latest_version gets set to the full JSON field instead of the version number.

Suggested change
latest_version=$(curl -s https://api.github.com/repos/midnight-ntwrk/releases/contents/artifacts/vscode-extension | grep -o '"name": "compact-[^"]*"' | tail -1 | sed 's/.*"compact-(.*)".*//')
latest_version=$(curl -s https://api.github.com/repos/midnight-ntwrk/releases/contents/artifacts/vscode-extension | grep -o '"name": "compact-[^"]*"' | tail -1 | sed -E 's/.*"compact-(.*)".*/\1/')

|---------|-------|----------|
| `docker: command not found` inside WSL | WSL integration not enabled or Docker not running | Open Docker Desktop → Settings → Resources → WSL Integration → Enable Ubuntu. Restart Docker Desktop. |
| `Cannot connect to the Docker daemon` | Docker Desktop is not running | Launch Docker Desktop from the Start Menu and wait for the whale icon to stop animating. |
| `port is already allocated` | Port 6300 is in use by another process | Find and kill the process: `sudo lsof -i :6300` then `kill <PID>`, or use a different port with `-p 6301:6300`. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lsof is not installed by default in Ubuntu on WSL. ss is available out of the box and more reliable here.

Suggested change
| `port is already allocated` | Port 6300 is in use by another process | Find and kill the process: `sudo lsof -i :6300` then `kill <PID>`, or use a different port with `-p 6301:6300`. |
| `port is already allocated` | Port 6300 is in use by another process | Find the process: `ss -tlnp | grep 6300` then `kill <PID>`, or use a different port with `-p 6301:6300`. |


| Problem | Cause | Solution |
|---------|-------|----------|
| Proof server starts but DApp can't connect | Firewall blocking port 6300 | Add an inbound rule for port 6300 in Windows Defender Firewall, or run the proof server on port 8080 with `-p 8080:6300`. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heads up: docs/guides/run-proof-server.mdx (line 54) explicitly states the proof server port "should not be changed." Suggesting port 8080 here could lead to configuration mismatches with the wallet and DApp providers, which all default to 6300. Consider removing the port remap suggestion and focusing on the firewall fix only.

- [ ] Compact compiler is installed and `compact --version` prints a version
- [ ] Compact VS Code extension is installed and syntax highlighting works on `.compact` files

Once every box is checked, you're ready to build on Midnight!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exclamation mark reads a bit marketing-y for a technical setup guide. Keeping it neutral is more consistent with the rest of the docs.

Suggested change
Once every box is checked, you're ready to build on Midnight!
Once every item is confirmed, your environment is ready for Midnight development.

@oduameh oduameh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good expansion of this guide. The prerequisites table, verification steps, detached mode instructions, troubleshooting tables, and quick-reference checklist all reduce friction for Windows developers. A few technical issues and style gaps need attention before this merges.

Frontmatter:

  • Missing SPDX-License-Identifier and copyright fields. See docs/guides/run-proof-server.mdx for the standard format used in sibling guides.
  • Missing tags array. Add 5-10 lowercase tags like [windows, wsl, docker, compact, setup, proof-server, development-environment].
  • Consider adding toc_max_heading_level: 2 to keep the table of contents clean.

Pre-existing issues to fix while you're here:

  • Line 8: The intro mentions "the Midnight Lace wallet" but this guide never covers Lace setup. Either remove that reference or add Lace configuration steps.
  • Line 8: "We'll walk you through" uses first-person plural. The style guide prefers second person and imperative voice.

Quick reference checklist (lines 376-383):

  • The - [ ] Markdown checkboxes render as disabled HTML inputs on the Docusaurus site. Readers can't interact with them, which makes the checkboxes look broken. Consider switching to a plain bullet list or numbered list.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ oduameh
❌ Documentation Contributor


Documentation Contributor seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants