Quick Start

This page takes one path: mdnest running on your computer, with your agent connected. Every other option is in the setup guide.

Prerequisites

1. Basic setup

Run these commands in a terminal:

mkdir mdnest && cd mdnest
curl -fsSLo docker-compose.yml https://raw.githubusercontent.com/mahsanamin/mdnest/main/deploy/compose/docker-compose.yml
echo "MDNEST_PASSWORD=$(openssl rand -base64 18)"  > .env
echo "MDNEST_JWT_SECRET=$(openssl rand -hex 32)"  >> .env
docker compose up -d

Open http://localhost:3236 and sign in as admin, with the password from the MDNEST_PASSWORD line in .env (cat .env). Click + Note to create your first note. It is saved as a plain .md file in the notes folder. Every optional setting is a comment in docker-compose.yml.

Or let your coding agent do it

Paste this prompt into Claude Code, Codex or another coding agent on the same computer. Every command it runs is written in the prompt, so read it first. You create the API token and log in yourself, so the agent never sees your password or token.

Set up mdnest, a self-hosted Markdown notes server, on this computer for me.
Do these steps in order. If anything fails or looks different, stop and tell me.

1. Check that Docker is running and Compose v2 is installed (docker info, docker compose version).
2. Check that port 3236 is free. If it is not, ask me which port to use.
3. Create the folder ~/mdnest and work inside it. If it already exists, ask me first.
4. Download the compose file:
   curl -fsSLo docker-compose.yml https://raw.githubusercontent.com/mahsanamin/mdnest/main/deploy/compose/docker-compose.yml
5. Run these exact commands, so the secrets never appear in this chat. Never print or read .env.
   echo "MDNEST_PASSWORD=$(openssl rand -base64 18)"  > .env
   echo "MDNEST_JWT_SECRET=$(openssl rand -hex 32)"  >> .env
6. Run docker compose up -d, then wait up to a minute for http://localhost:3236 to return HTTP 200.
   If it does not, show me the last 50 lines of docker compose logs.
7. If mdnest is already installed, tell me its version and wait for my answer before replacing it.
   Then install the CLI:
   curl -fsSL http://localhost:3236/cli/install.sh | bash -s -- http://localhost:3236
   If it needs sudo, do not ask for my password. Give me the command to run myself.
8. Tell me to open http://localhost:3236 and sign in as admin. The password is the
   MDNEST_PASSWORD line in .env (give me the full path).
9. Ask me to create an API token in mdnest (Settings, then API Tokens) and run
   "mdnest login http://localhost:3236" myself. Never ask for the token or the
   password, and never run mdnest login yourself.

2. Connect your agent

mdnest does not include an AI agent. You connect the one you already use through the mdnest CLI. Install it from your server:

curl -fsSL http://localhost:3236/cli/install.sh | bash -s -- http://localhost:3236

Create a token in mdnest under Settings, then API Tokens, and log in. The CLI asks for the token and hides it as you paste:

mdnest login http://localhost:3236
mdnest list @mdnest/notes

The second command should list the note you created. Now ask your agent to read that note and add to it with mdnest read, mdnest append and mdnest edit. The CLI guide has every command, and the MCP guide covers agents that use MCP instead of a shell.

Next steps