Installing DAAF is easy and straightforward by design:
No prior experience with terminal, Docker, or Claude Code required. There are detailed explanations throughout this guide so you have a strong intuition for what’s going on under the hood -- but besides the reading, the whole process shouldn’t take more than 10 minutes start-to-finish.
Prefer to watch first?
Claude Code for Social Scientists: Get Started with DAAF in 30 Minutes
A full install walkthrough plus a tour of the everyday essentials -- the browser file editor, the session log viewer, and keeping your install updated. Watch on YouTube ↗
What you need
Computer with internet
You’ll need internet access to download project files and interact with Claude (the AI that powers DAAF). All data analysis runs on your own hardware, so your computer should be generally capable of intermediate-level data analysis. Don’t worry about Python or R packages, libraries, or dependencies -- that’s all handled for you behind the scenes. It’s also worth setting aside a little room on your drive: plan for roughly 15--20 GB of free storage space -- enough for the Docker image (the full data-science stack) plus comfortable room for your research data as projects accumulate. That’s a one-time footprint for most users, and nothing to stress about on a typical modern laptop. Your dataset files stay on your machine inside the Docker container (but note that analytical outputs like sample rows, statistics, summaries, are sent to your AI provider’s servers as part of the Claude Code conversation -- see the Support FAQ for the full picture on data privacy).
AI provider account
Claude Code is the AI assistant platform that powers DAAF, and it needs to connect to an AI provider account for billing and usage. Anthropic (the maker of Claude) is the default and most thoroughly tested provider, but DAAF now also runs on OpenRouter, OpenAI’s GPT models (via an API key or a ChatGPT subscription), and organizational cloud platforms like Bedrock and Vertex AI. Because DAAF relies on cutting-edge frontier models and asks them to do a lot of thorough work (deep-diving into data, writing and reviewing code, producing intensive plans), you’ll generally want a high-usage account with whichever provider you choose. The price of access has historically been the highest barrier to entry, but with these new provider routes that is changing. Here are your main options:
Not sure which to pick? Start with the lower Max subscription ($100/mo plan) to test things out and get a sense of how you might want to use DAAF. Then adjust methods or subscription levels as need arises.
Terminal access
You’ll interact with DAAF through a command-line terminal -- a text-based interface where you can type commands to navigate from folder-to-folder, run software, or open files more manually. It might feel a bit unfamiliar at first, but once Claude Code is running, it’s essentially like any other AI chatbot window. You’ll mostly be typing or pasting single commands.
macOS: Open the Terminal app (search for it in Spotlight with Cmd + Space).
Windows: Open PowerShell from the Start menu (strongly recommended over Command Prompt, which often lacks proper permissions).
Linux: Open your terminal emulator (usually Ctrl + Alt + T).
Here are the basic commands you'll probably want to keep handy:
| What you want to do | Command |
|---|---|
| See where you are | pwd |
| List files here | ls |
| Move into a folder | cd foldername |
| Go up one folder level | cd .. |
| Clear the screen | clear |
| Cancel a running command | Ctrl + C |
| Recall previous commands | Up arrow |
| Auto-complete file/folder names | Tab |
| See past output that scrolled off screen | Scroll or Shift + Page Up |
Copy and paste in terminal: On macOS, use Cmd + C / Cmd + V. In Windows PowerShell, use Ctrl + Shift + C / Ctrl + V (or right-click). Note: Ctrl + C in the terminal cancels a running command -- it does not copy text.
Password entry: Note that many terminal interfaces “hide” any password entry you’re asked to do -- if you don’t see your typing “working,” it is working but hiding it from view for your privacy.
Windows tip: If you experience graphical glitches in PowerShell, the free version of Warp ↗ provides a cleaner, more reliable terminal experience (you can skip creating an account and skip its AI features).
Docker Desktop
Docker is a program trusted across the software development industry that allows users to create a self-contained, isolated environment (called a “container”) on your computer that is strictly separated from everything else (protecting your personal files and software). Think of it like a lightweight virtual computer running inside your computer, created via a very specific and reproducible recipe every single time.
Download the appropriate Docker Desktop installer from docker.com/products/docker-desktop ↗ (available for Mac, Windows, and Linux). Install it and make sure it’s running before you proceed. If you run into any Docker-related errors during install, you may need to restart your computer to let the installation fully register.
How the pieces fit together
Before you run the installer, here’s what it does. The whole thing runs automatically in one line of code, but it’s valuable to understand what’s happening behind the scenes for future reference.
The installer downloads configuration files and uses Docker Desktop to build an isolated container where DAAF and Claude Code will run. This container serves three critical purposes:
- Security isolation -- The container runs as a non-admin user with all system capabilities removed (
cap_drop: ALL) and privilege escalation explicitly blocked (no-new-privileges). Claude Code cannot access or modify anything outside the DAAF workspace. Even if something goes catastrophically wrong, you can spin up a fresh environment in minutes with zero risk to your system. - Reproducibility -- Docker ensures that Python 3.12, R 4.5.3, all their data science libraries (50+ Python packages, 60+ pinned R packages), and Claude Code are installed in exactly the same configuration every time, on every machine. Everything runs out-of-the-box -- no version compatibility issues.
- Consistency -- The predictable environment means we can set up all of DAAF’s reference materials, workflow processes, and helper features in equally predictable ways. DAAF works better when it knows exactly how everything is configured.
The diagram below charts out how everything fits together. Claude Code gets installed inside the Docker container, “wrapped” by DAAF’s instructions, workflows, and guardrails. It can only access files within the container and execute code using the bundled Python environment. Hover over any element to learn more.
If you’re worried about what gets installed, you can see exactly what is in the container by reading the Dockerfile in the repository -- feel free to ask your favorite LLM to help you interpret and inspect it.
Personal Files 🔒 Isolated
Python & R Environment
Claude Code
Filesystem
One command to install everything
Alright, now time to actually kick this off. Make sure Docker Desktop is running in the background, then open your terminal, navigate to the folder where you want DAAF installed, and paste the appropriate command for your operating system from the install code below. The installer will create a folder named daaf-docker/ in whatever directory your terminal is currently in (remember you can type pwd to see where you are, ls to list the files/folders where you are, and cd foldername to enter a folder in the current directory. Note that you may need to surround a folder name in double quotation marks if it has spaces in it, e.g., cd “foldername”).
# Install DAAF with one command
curl -fsSL https://raw.githubusercontent.com/DAAF-Contribution-Community/daaf/main/scripts/host/install.sh | bash
# Install DAAF with one command
irm https://raw.githubusercontent.com/DAAF-Contribution-Community/daaf/main/scripts/host/install.ps1 | iex
What you should see
The installer works through four numbered stages ([1/4] through [4/4]). Don’t worry about the large volume of scrolling output between them -- that’s normal Docker build activity. The first run takes 5--15 minutes. Here are the key milestones to watch for:
==========================================
DAAF Installer
==========================================
Branch: v3.0.0
[1/4] Creating initial directory for installation files ...
[2/4] Downloading installation files ...
[3/4] Building Docker image
(this may take a few minutes on first run since
there are a lot of Python and R libraries to install)...
...lots of Docker build output scrolls by here
as it installs Python, R, dozens of data
science packages, and Claude Code...
✔ Claude Code successfully installed!
daaf-docker Built
Starting container...
Container daaf-daaf-docker-1 Created
Container daaf-daaf-docker-1 Started
[4/4] Cloning DAAF repository files into the
Docker container ...
==========================================
Installation complete!
==========================================
To start using DAAF:
1. Navigate to the install directory
and open the DAAF Control Panel:
cd daaf-docker
bash daaf.sh
If the build seems to hang during [3/4], give it a little extra time since installing the 50+ packages including geospatial libraries can take a minute here and there. As long as the output occasionally moves and updates every few minutes, let it finish. If anything goes wrong, you can close the terminal, delete the daaf-docker folder, and run the installer again; nothing is permanently changed on your computer.
Start your first research session
Now that the installation is complete, we can run DAAF and Claude Code right away! In the same terminal window, navigate into the folder the install script created (cd daaf-docker) and open the DAAF Control Panel -- an interactive menu that puts every DAAF operation in one place:
# Navigate into your DAAF folder and open the Control Panel
cd daaf-docker
bash daaf.sh
# Navigate into your DAAF folder and open the Control Panel
cd daaf-docker
.\daaf.ps1
The Control Panel opens a numbered menu with a live status dashboard -- it shows at a glance which of DAAF’s browser services (notebooks, log viewer, code editor) are actually running. You should see something like this:
========================================== DAAF Control Panel ========================================== Container: * Running Version: v3.0.0 (2026-07-17) Branch: main (up to date) Last backup: never Services: o Notebooks (not running) o Log Viewer (not running) o VS Code (not running) LAUNCH 1) Start Claude Code 2) Browse Files (VS Code) 3) View Session Logs 4) View Marimo Notebooks (Python) 5) View Quarto Notebooks (R) 6) Open Terminal in Container MANAGE 7) Create Backup 8) Restore from Backup 9) Check for Updates 10) Rebuild Container 11) Stop Web Services OTHER h) Help q) Quit Enter choice:
To begin your session, choose option 1, “Start Claude Code.” (On macOS and Linux the Control Panel runs on the system Bash that ships with every Mac -- no Homebrew or newer Bash needed. On Windows it runs natively in PowerShell. The older individual helper scripts like run_daaf.sh still exist and work behind the scenes, but you no longer need to remember them.)
Authenticate
One quick setup step before you’re ready to go:
Authenticate
On first launch, Claude Code will prompt you to authenticate. For Max subscription users, this is a one-time browser-based login -- it opens in your web browser, you sign in with your Anthropic account, and then return to the terminal. You may need to copy and paste the link into your browser; be careful to check it for erroneous line-breaks in the URL if you run into issues!
Note: This login step is for those using an Anthropic subscription account. If you’ve configured credentials in environment_settings.txt instead (OpenRouter, OpenAI/ChatGPT, or cloud providers -- see Advanced Configuration), Claude Code picks them up automatically and you can skip this step.
Tip: Ctrl + C in the terminal cancels a running command, not copy. Use Ctrl + Shift + C (Windows/Linux) or Cmd + C (macOS) to copy text.
Installation complete. Now explore.
On first run, DAAF will present a user acknowledgment and transparency statement explaining your responsibilities when using the framework: take a moment to read through it carefully.
This is a great moment to start engaging with DAAF on your own terms. Ask Claude about the transparency statement itself -- what it means, what your responsibilities are, what DAAF does and doesn’t guarantee. From there, try something like: “What data sources does DAAF know about?” or “Walk me through how a Full Pipeline analysis works.” or “What are the pros and cons of using DAAF for my research?” Talking conversationally with Claude is one of the easiest ways to get oriented.
DAAF will intelligently reference both the user documentation and the workflow documentation as relevant (but it never hurts to prompt it: “Based on a thorough read of the DAAF project documentation, can you tell me…?”). From here on, you can interact with Claude the same way you would with any AI assistant -- but DAAF will “kick in” its specialized workflows and skillsets whenever relevant to supercharge anything related to data analysis work, data documentation, data exploration, and so on.
Python or R? DAAF works in either language. Python is the default, but R is a first-class execution lane engineered for parity -- choose R and the whole pipeline follows (.R scripts, R libraries, and Quarto notebooks instead of Marimo). To switch, just tell Claude “set execution language to R” at the start of a session, or set it per project; there are no configuration files to edit. Coming from Stata? Tell DAAF once and it will add inline translational comments in your home language.
If you want a gentle onboarding guide for actually using DAAF, head to Understanding and Working with DAAF next. The rest of this guide covers basic day-to-day workflows, file management, keeping DAAF updated, and advanced configuration options -- browse those at your own pace.
Quick tip: Now that you have Claude Code up and running with DAAF, you can start asking Claude for help! DAAF has a dedicated User Support mode for exactly this: ask it what DAAF is, how something works, or what to do when you’re stuck, and it will load its own documentation and walk you through it in plain language. This includes questions about the underlying tools too -- Docker, Git, Claude Code -- it can look up official documentation for those online when needed. Point it to any document, section, or sentence, and ask it to help you understand it better. It has visibility into the whole project documentation, so it should be able to help you out as you go. This kind of personalized assistance is invaluable for anyone getting onboarded.
Installation complete! Everything below covers day-to-day workflows, configuration, and troubleshooting -- reference material you can return to anytime.
Working with DAAF
Once DAAF is installed, your daily workflow runs through the DAAF Control Panel -- run bash daaf.sh (.\daaf.ps1 on Windows) from your daaf-docker/ folder and pick from a single numbered menu: launch Claude Code, browse and edit files, view notebooks and session logs, drop into a container shell, or back up, restore, update, and rebuild. Everything below walks through each workflow in detail. If you ever prefer to launch a tool directly, each still has its own helper script (shown alongside), and the Control Panel uses those same scripts behind the scenes.
| Operation | macOS / Linux | Windows |
|---|---|---|
| DAAF Control Panel | bash daaf.sh |
.\daaf.ps1 |
| Start session (menu option 1) | bash run_daaf.sh |
.\run_daaf.ps1 |
| End session | /exit → exit → docker compose down |
Same |
| Browse/edit files (option 2) | bash run_vscode.sh |
.\run_vscode.ps1 |
| View session logs (option 3) | bash view_logs.sh |
.\view_logs.ps1 |
| View notebooks (Python/Marimo, option 4) | bash view_notebooks.sh |
.\view_notebooks.ps1 |
| View documents (R/Quarto, option 5) | bash view_quarto.sh |
.\view_quarto.ps1 |
| Back up research (option 7) | bash backup_daaf.sh |
.\backup_daaf.ps1 |
| Restore from backup (option 8) | bash restore_from_backup.sh |
.\restore_from_backup.ps1 |
| Update DAAF (option 9) | bash update_daaf.sh |
.\update_daaf.ps1 |
| Rebuild container (option 10) | bash rebuild_daaf.sh |
.\rebuild_daaf.ps1 |
Starting and ending sessions
Your daily workflow is simple: make sure Docker Desktop is running, open your terminal, navigate to the daaf-docker/ folder you set for the installation process, and open the DAAF Control Panel. Then choose option 1, “Start Claude Code.” It handles everything -- starts the container if it’s not already running, then launches Claude Code directly.
# Navigate to your DAAF folder and open the Control Panel
cd daaf-docker
bash daaf.sh
# Navigate to your DAAF folder and open the Control Panel
cd daaf-docker
.\daaf.ps1
Prefer to skip the menu and launch Claude Code directly? Run bash run_daaf.sh (.\run_daaf.ps1 on Windows) instead. To enter the container shell instead of Claude Code (for manual commands, setting API keys, or troubleshooting), pass bash as an argument: bash run_daaf.sh bash (macOS/Linux) or .\run_daaf.ps1 bash (Windows).
When you’re done working, exit in three steps: type /exit to leave Claude Code, then exit to leave the container, then docker compose down to shut down the container. Stopping the container does not delete any of your work -- everything in the Docker volume persists across restarts.
Managing your files
Your research files, data, and outputs live inside a Docker volume -- a storage area managed by Docker that’s separate from the daaf-docker/ folder on your computer. Think of the daaf-docker/ folder as the “recipe” that was used to set everything up, while the Docker volume is the actual “kitchen” where all the work happens.
This means your work persists across container restarts and rebuilds, but files created inside the container don’t automatically appear in your regular computer folders. Only the Docker volume is accessible to Claude -- your personal documents, photos, and everything else are completely isolated.
Browser-based file editor with Visual Studio Code
The easiest way to browse, edit, and manage your files is with DAAF’s built-in browser-based code editor (VS Code in the browser). The simplest way to open it is from the DAAF Control Panel -- run bash daaf.sh (.\daaf.ps1 on Windows) and choose option 2, “Browse Files (VS Code).” If you prefer the direct command, run this from your daaf-docker/ folder -- no need to enter the container:
bash run_vscode.sh
.\run_vscode.ps1
This opens a full VS Code editor at localhost:2720 (“localhost” means “this computer” -- open this address in your web browser like a regular website). It comes pre-loaded with ten extensions for Python and R syntax highlighting, Markdown preview, Git history, CSV viewing, and folder compression. The default access password is daaf (customizable in your environment_settings.txt file -- see Advanced Configuration).
- Markdown preview: Right-click any
.mdfile and select “Open Preview”, or pressShift+Ctrl+V, to see rendered Markdown with proper formatting -- the easiest way to read DAAF’s reports and plans. - File management: Use the file explorer sidebar to browse, create, rename, move, and delete files.
- Getting files IN: Drag and drop files from your computer onto the file explorer sidebar to import them into the Docker volume (e.g., a dataset you want DAAF to analyze). This works for single files and whole folders, in Chrome, Edge, and Firefox.
- Getting files OUT: To export a single file, right-click it and choose Download (works in every browser). To export a whole folder in any browser, right-click the folder and choose Compress → zip (provided by the built-in
vscode-archiveextension, ready to use with no setup), then right-click the new.zipand choose Download -- you get one tidy archive on your computer. Stick to the zip, tar, or tgz options when compressing. (In Chrome or Edge you can also right-click a folder and choose Download directly, which copies the files individually.) - Search: Use
Ctrl+Shift+F(orCmd+Shift+Fon Mac) to search across all files -- helpful for finding specific variables, scripts, or content across a project. - Git integration: The Source Control panel shows uncommitted changes and lets you view diffs -- the most direct way to review exactly what DAAF produced during a session (and, if you’ve enabled the optional “Git commit management” preference, browse commit history too).
For getting a large research folder out wholesale, taking a full backup (Control Panel option 7) copies everything out to your computer in one step -- see below. You can also browse the Docker volume through Docker Desktop’s GUI by navigating to the Volumes panel and clicking the daaf_daaf-data volume, though this is much less streamlined.
Backing up your work
Since your research files live inside the Docker volume rather than your regular computer folders, regularly backing up your work is essential. The easiest way is from the DAAF Control Panel -- run bash daaf.sh (.\daaf.ps1 on Windows) and choose option 7, “Create Backup.” If you want a GitHub backup for your work, ask Claude how to make your own repository and save to it accordingly. If you’d rather call the backup script directly, that works too:
cd daaf-docker bash backup_daaf.sh
cd daaf-docker .\backup_daaf.ps1
This creates a date-versioned folder (e.g., 2026-07-17_daaf_backup/) inside daaf-docker/ that you can move to external storage or share with colleagues. Multiple same-day backups auto-suffix with letters (a, b, c...). The backup checks itself as it goes: it verifies there’s enough free disk space before it starts, and after copying it compares the backup against the original -- checking both the number of files and their total size -- so a truncated or incomplete backup gets flagged with a warning rather than passing silently. You can also back up manually through Docker Desktop’s GUI by downloading the whole daaf or research folder from the volume viewer.
A backup folder is sensitive -- store it privately. The backup covers both DAAF volumes: your research data, plus Claude Code’s own state (your login, session history, and plugins) in a hidden .daaf-claude-config/ subfolder. Because that includes your Claude Code login credentials, don’t attach a backup to tickets, repositories, or shared drives -- and if you share a backup with a colleague, delete the .daaf-claude-config/ subfolder from the copy first.
Viewing notebooks and session logs
DAAF provides browser-based tools for reviewing completed work. The quickest way to open any of them is from the DAAF Control Panel (options 3, 4, and 5), but each also has its own convenience script you can run directly from your daaf-docker/ folder:
Marimo notebooks (Python) localhost:2718
Control Panel option 4, or run bash view_notebooks.sh (or .\view_notebooks.ps1), to open marimo’s notebook browser at localhost:2718. DAAF uses marimo to create streamlined Python code notebooks as part of its analysis, which you can view as interactive dashboards with code cells, outputs, and visualizations. Since they’re written in regular Python code, you can also inspect them in any text editor.
Quarto documents (R) localhost:2720
R projects produce Quarto notebooks (.qmd files) instead of Marimo. Control Panel option 5, or run bash view_quarto.sh (or .\view_quarto.ps1), shows a numbered picker of every notebook below research/; pick one and it renders to a self-contained HTML audit document and opens it in your browser. In a Full Pipeline project the Quarto file presents narrative context, the literal code from executed R scripts, their captured logs, figures, and small data previews.
Session logs localhost:2719
Control Panel option 3, or run bash view_logs.sh (or .\view_logs.ps1), to start the DAAF Log Explorer at localhost:2719. Shows every tool call, subagent dispatch, and file reference organized chronologically -- useful for understanding what DAAF did during a session and debugging issues. (It has something to show only after you’ve run at least one session.)
Sessions and context
Each DAAF session has a working memory (context window) that fills up as the conversation gets longer. When a session is interrupted or context fills up, DAAF writes a STATE.md file capturing current progress, decisions made, and what remains. To resume: open the STATE.md file (via the browser file manager at localhost:2720), copy the restart prompt it provides, type /clear in Claude Code, then paste the prompt. DAAF will pick up exactly where it left off using the state file.
By default, DAAF does not make git commits during your research sessions -- and it doesn’t need to. Every script version is preserved right in your project folder, including failed attempts (DAAF saves fixes as new numbered versions rather than overwriting the original), so the project folder itself is a complete, human-readable audit trail you can review with the VS Code Source Control panel. If you’d like git-based version tracking on top of that, you can turn on the optional “Git commit management” preference; once enabled, DAAF suggests commits at natural milestones and always asks before committing anything. Either way, nothing is ever pushed to a remote repository without your explicit instruction.
Keeping DAAF updated
DAAF is actively developed and updated. The simplest way to update is from the DAAF Control Panel -- run bash daaf.sh (.\daaf.ps1 on Windows) and choose option 9, “Check for Updates.” Before updating, it’s a good idea to back up your research folder first (the updater offers to do this for you). You can also run the update script directly from your daaf-docker/ folder:
cd daaf-docker bash update_daaf.sh
cd daaf-docker .\update_daaf.ps1
The update script handles everything for you: it offers to back up first, checks the GitHub remote, shows you how many new commits are available, and detects any local framework customizations you’ve made -- showing you exactly what changed and presenting options instead of overwriting anything. It is also self-healing: host tool files a previous update missed are delivered automatically, and if a host script on your machine has drifted from the repository version the updater heals it (saving your previous copy as <name>.pre-update first, and never overwriting if that backup can’t be written). If the Dockerfile or docker-compose.yml changed, it offers to rebuild the image for you automatically. Your research files in research/ are never affected by updates.
Updating to v3.0.0? Run your updater twice. Because of a limitation in the older updater, existing users on v2.1.x should run the update script twice in a row. The first run applies most everything plus an upgrade to the updater itself; the second run uses the freshly upgraded updater to deliver the new daaf.sh/daaf.ps1 Control Panel. If everything is already current, it simply reports “Already up to date!” -- it is always safe to re-run. (v3.0.0 also moves to a new base image, so a one-time rebuild is required; the updater detects this and offers to run it for you.)
Rebuilding the container
If an update changes the Dockerfile (e.g., new Python packages, updated Claude Code version), the update script will detect this automatically and prompt you to rebuild. You can also rebuild manually:
cd daaf-docker bash rebuild_daaf.sh
cd daaf-docker .\rebuild_daaf.ps1
The rebuild script copies the updated Dockerfile and docker-compose.yml from the container to the host, then rebuilds the image. Your research data in the Docker volume is not affected. Most updates don’t change the Dockerfile, so usually the update script alone is all you need.
Authentication and API keys
The sections below cover additional configuration for users with specific needs. If you completed the standard installation above and everything is working with a Max subscription, you can skip this section and come back later if and when you need it.
Configure authentication via environment_settings.txt
By default, Claude Code prompts you to log in interactively the first time you launch it (browser-based OAuth or pasting an API key). This works well for Max subscription and direct API key setups. However, if you’re using OpenRouter, a cloud provider (Bedrock/Vertex), or simply want your authentication to persist automatically without interactive login, you can configure it through the environment_settings.txt file in your daaf-docker/ folder.
Your daaf-docker/ folder includes an environment_settings_example.txt template. It is organized into six numbered, lifecycle-tagged sections and documents the supported authentication methods -- Options A through E for direct authentication (plus interactive browser login, which needs no variables), and Option F for the OpenAI/ChatGPT provider shim (covered further below) -- with the exact environment variables needed for each. The installer now seeds this file for you automatically from the template on a fresh install, carrying forward any install-time values you provided; it never overwrites an existing environment_settings.txt, so your real keys are always safe. To set it up:
1. Copy the template (if you haven’t already):
cd daaf-docker cp environment_settings_example.txt environment_settings.txt
cd daaf-docker Copy-Item environment_settings_example.txt environment_settings.txt
2. Open environment_settings.txt in any text editor and uncomment the section matching your authentication method. For example, to use OpenRouter:
# --- Option C: OpenRouter (third-party model gateway) ---
ANTHROPIC_BASE_URL=https://openrouter.ai/api
ANTHROPIC_AUTH_TOKEN=your_openrouter_api_key_here
ANTHROPIC_API_KEY=
OPENROUTER_API_KEY=your_openrouter_api_key_here
Replace your_openrouter_api_key_here with your actual OpenRouter API key (format: sk-or-v1-...). Get one at openrouter.ai/settings/keys ↗. Note that ANTHROPIC_API_KEY= must be set to an empty value (not removed entirely) -- if it’s unset, Claude Code falls back to Anthropic’s servers.
3. Restart the container to pick up the changes:
docker compose down bash run_daaf.sh
docker compose down .\run_daaf.ps1
If you previously logged in interactively with Anthropic, run /logout inside Claude Code before switching to an environment_settings.txt-based method -- cached credentials can take priority over environment variables.
Important: Only uncomment ONE authentication section. If multiple methods are set, Claude Code uses the highest-priority one (see the priority order documented in environment_settings_example.txt). This can lead to unexpected billing if, for example, you have both an API key and an OAuth token set.
Security note: The environment_settings.txt file lives on your host machine (in daaf-docker/), is gitignored by default, and is never visible to Claude inside the container. DAAF’s safety guardrails prevent Claude from reading or writing environment settings files by design -- your credentials stay strictly on your side of the boundary.
Set up data source API keys
Most DAAF data sources -- including all built-in education data from the Urban Institute -- are freely accessible with no authentication required. You can skip this step entirely if you’re only working with education data.
However, some data domains require API keys from their hosting platforms. The table below shows API keys for data sources that ship with DAAF. When you onboard a new data source from an API via Data Onboarding Mode, DAAF will guide you through setting up the appropriate environment variable using the same pattern shown here.
| Data Source | Environment Variable | Where to Get a Key |
|---|---|---|
| County Presidential Election Returns | HARVARD_DATAVERSE_API_KEY |
Harvard Dataverse ↗ → Log in → Account name (top-right) → API Token → Create Token |
Add data source API keys to the same environment_settings.txt file used for authentication (see above). Uncomment and fill in the keys you need:
# Remove the leading # and replace the placeholder with your actual key
HARVARD_DATAVERSE_API_KEY=your_token_here
After editing, restart the container (docker compose down, then bash run_daaf.sh) to pick up the changes. You can set multiple API keys simultaneously -- each uses a unique environment variable name.
If you skip this step and later try to analyze data that requires it, DAAF will inform you that the API key is missing and point you back to these instructions.
Running DAAF on GPT models (OpenAI or ChatGPT)
DAAF can run on OpenAI’s GPT models with no Anthropic account, through a lightweight translation shim that ships built into DAAF (it presents an Anthropic-compatible endpoint on your own machine, quietly forwards requests to OpenAI, and starts automatically inside the container). These are supported pathways under active, extensive testing -- they work, and user reports are welcome. There are two lanes:
Option F -- OpenAI API key. For researchers who have an OpenAI API key (pay-per-use) and want to talk to OpenAI directly. Add your key and the shim settings to environment_settings.txt, then do a one-time rebuild (this lane needs a rebuild because the shim’s auto-launch is baked into the container). After that, start Claude Code and switch to your GPT model with /model. Note: an OpenAI API key needs prepaid API credits, which are billed separately from any ChatGPT subscription.
ChatGPT-subscription lane. For researchers who already pay for ChatGPT Plus/Pro and would rather use it than buy API credits. It uses the same shim pointed at your ChatGPT subscription’s backend: first enable device-code login in your ChatGPT security settings, then run codex login --device-auth inside the container (it prints a URL and a one-time code you enter from any device), set SHIM_BACKEND_MODE=chatgpt in environment_settings.txt, and recreate the container. Your login is stored in a persisted, backed-up location, so you only do it once.
One thing to know about the ChatGPT lane: its backend enforces a lower working-context ceiling -- measured at about 370,000 tokens -- than the API routes (which serve the model’s full ~1M window). This is a backend limit no client setting can raise, so on that lane you set CLAUDE_CODE_MAX_CONTEXT_TOKENS=370000 and DAAF accounts against that ceiling for its context-management guidance. It also works through a backend interface OpenAI doesn’t officially offer for third-party tools, so OpenAI could change it, and you are responsible for compliance with OpenAI’s terms of service. Full step-by-step instructions for both lanes live in the Installation & Quickstart guide ↗.
Running multiple DAAF instances
Most people run a single DAAF installation and never need this. But you can run two or more independent installs on the same machine -- for example, one for work and one for personal projects, or one on Claude and another on GPT -- each with its own Docker volume, research history, and even its own DAAF version. Two things must be unique per install so they don’t collide: the Compose project name (which determines the container and data volume) and the three published localhost ports (2718 notebooks, 2719 log viewer, 2720 code editor).
To set up a second instance, choose a distinct project name and three free ports, set them as environment variables first, then run the installer into a second, separate folder:
# macOS / Linux -- set these before running the installer
export DAAF_PROJECT_NAME=daaf-personal
export DAAF_PORT_MARIMO=2818
export DAAF_PORT_LOGVIEWER=2819
export DAAF_PORT_VSCODE=2820
The installer seeds these values into that folder’s environment_settings.txt, so they persist for every later launch and update with nothing more to do -- and the Control Panel and helper scripts read them automatically, always talking to the right container and ports. (On Windows, use $env:DAAF_PROJECT_NAME = "daaf-personal" and the matching $env:DAAF_PORT_* lines instead.) Your data volume moves with the project name, so choose the name once, up front.
How environment_settings.txt is handled. All of your configuration -- API keys, model routing, ports, and more -- lives in this one file. The installer seeds it for you from the annotated template and carries forward your install-time values, but it never overwrites an existing file. On the host side, the lifecycle scripts read only a small allowlist of keys from it and never execute it as code (a deliberate safety choice, since the same file holds your API keys), and when a script needs to persist a setting for you it preserves your comments and structure and tells you exactly what it changed.
Common issues and fixes
Most setup issues have quick solutions. If you don’t find your answer here, check the Support page or ask DAAF directly -- User Support mode can troubleshoot Docker, Git, and Claude Code problems.
“docker: command not found” or “docker is not recognized”
Docker Desktop may not be installed, or your computer needs a restart after installation. Verify Docker Desktop is installed from docker.com/products/docker-desktop ↗. After installing, restart your computer, then verify by running docker --version in your terminal.
Make sure Docker Desktop is running -- look for the whale icon in your system tray or menu bar.
“unable to get image ’daaf-daaf-docker’”
The Docker image hasn’t been built yet. Open Docker Desktop and check the Images panel -- if you don’t see daaf-daaf-docker, the installer may not have completed. Re-run the installer:
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/DAAF-Contribution-Community/daaf/main/scripts/host/install.sh | bash
Windows:
irm https://raw.githubusercontent.com/DAAF-Contribution-Community/daaf/main/scripts/host/install.ps1 | iex
“service ’daaf-docker’ is not running”
The container isn’t active. Start it with the convenience script from the daaf-docker/ folder:
- macOS / Linux:
bash run_daaf.sh - Windows:
.\run_daaf.ps1
You can verify the container’s status in Docker Desktop under Containers -- it should show green “Running.” If the container isn’t listed at all, re-run the installer.
The first build is taking a very long time
This is normal. The first installation takes 5--15 minutes because it downloads and installs a base operating system image (~200MB), Python 3.12, 50+ data science packages (including geospatial libraries like GDAL, GEOS, and PROJ), the R stack with Quarto, and Claude Code.
This only happens once -- Docker caches everything, so future container starts take just seconds.
I can’t find my research files on my computer
Research files live inside a Docker volume -- managed storage that’s separate from your regular folders. You won’t see them in Finder or File Explorer. Three ways to access them:
- Browser file manager: Run
bash run_vscode.sh(or.\run_vscode.ps1on Windows) to open a full file explorer at localhost:2720. You can browse, edit, and right-click to download any file. - Backup script: Run
bash backup_daaf.sh(or.\backup_daaf.ps1) to create a date-versioned copy of everything in yourdaaf-docker/folder. - Copy a specific file:
docker compose cp daaf-docker:/daaf/research/your-project/report.md ./
This copies a single file to your current folder.
Inside the container, your research is stored at /daaf/research/.
Port conflicts (2718, 2719, or 2720 already in use) Advanced
DAAF uses three ports: 2718 (Marimo notebooks), 2719 (Log Explorer), and 2720 (browser code editor). If one is already in use by another application:
Quick fix: Restart the container in Docker Desktop (stop, then start).
Persistent fix: Set the relevant port in your daaf-docker/environment_settings.txt file -- DAAF_PORT_MARIMO (2718), DAAF_PORT_LOGVIEWER (2719), or DAAF_PORT_VSCODE (2720) -- for example DAAF_PORT_MARIMO=3718, then recreate the container (docker compose down, then bash daaf.sh). Prefer this over hand-editing docker-compose.yml -- updates and rebuilds regenerate that file and would discard a manual port change.
Permission denied errors inside the container (especially on macOS) Advanced
This usually means file ownership doesn’t match the container user. The fix is usually simple: stop and restart the container.
docker compose down docker compose up -d
DAAF’s docker-compose configuration includes an init service that automatically fixes file permissions on startup.
If that doesn’t resolve it, run this one-time fix:
docker run --rm -v "daaf_daaf-data:/daaf" busybox chown -R 1000:1000 /daaf
Claude Code asks for an API key every time I launch
The most reliable fix is to save your credentials in environment_settings.txt instead of relying on the interactive login cache (which can reset when the container is rebuilt).
From your daaf-docker/ folder:
- Copy the template:
cp environment_settings_example.txt environment_settings.txt - Open
environment_settings.txtin any text editor - Add your API key:
ANTHROPIC_API_KEY=sk-ant-api03-xxxxxxx - Restart the container:
docker compose downthenbash run_daaf.sh
The environment_settings.txt file lives on your host machine, is gitignored, and is never visible to Claude.
Malformed authentication URL when trying to log in to Claude Code
When Claude Code prompts you to authenticate via a URL, the link can sometimes wrap across multiple lines in your terminal. If you copy a URL that contains a line break, the browser will fail to open it or show an error page.
Fix: Paste the copied URL into a plain text editor (Notepad, TextEdit, or any simple editor). Look for any unexpected line breaks in the middle of the URL and remove them so the entire address is on a single line. Then copy the cleaned-up URL and paste it into your browser.
OpenRouter: “model not found” or authentication errors Advanced
Three settings must be exactly right in your environment_settings.txt:
ANTHROPIC_BASE_URL=https://openrouter.ai/api-- must be exactly this, with no/v1suffix (the/v1variant is for OpenAI-compatible tools, not Claude Code)ANTHROPIC_API_KEY=-- must be present and empty (not removed entirely). An unset key causes Claude Code to fall back to Anthropic authentication.- If you previously logged in with an Anthropic account, run
/logoutinside Claude Code to clear cached credentials.
After making changes, restart the container (docker compose down, then bash run_daaf.sh). Verify the connection with /status inside Claude Code, and check the OpenRouter Activity Dashboard ↗ to confirm requests are arriving.
How do I change the Claude model during a session?
Type /model in the Claude Code chat. Use arrow keys to select a model and press Enter. DAAF defaults to Opus 4.8 (1M context); the lower-cost Sonnet tier matches the Opus line on DAAF’s benchmarks at a fraction of the cost. For current Claude models, use the left/right arrow keys to set the thinking level -- High is recommended for DAAF. The model selection appears below the chat input line.
Wondering which model to pick in the first place? DAAFBench: Choosing Your Model benchmarks how reliably each model runs DAAF’s workflows.
The notebook won’t render in my browser
Use the convenience script from the daaf-docker/ folder:
- macOS / Linux:
bash view_notebooks.sh - Windows:
.\view_notebooks.ps1
This handles container startup and port mapping automatically.
If it still doesn’t work: Is the container running? Is port 2718 mapped in docker-compose.yml? Try opening in an incognito/private browser window. Check the terminal output for error messages.
“Context utilization CRITICAL” and the session seems to stop
This isn’t an error -- it’s DAAF’s responsible context management. When a session’s context window fills up, DAAF writes a STATE.md file capturing current progress, decisions made, and what remains.
To resume: open the STATE.md file (via the browser file manager at localhost:2720), copy the restart prompt it provides, type /clear in Claude Code, then paste the prompt. DAAF will pick up exactly where it left off using the state file.
Claude seems to have forgotten earlier instructions or decisions
This is a known limitation of long LLM sessions. DAAF mitigates this with STATE.md (progress tracker) and Plan.md (methodology spec), which serve as persistent reference documents.
If you notice drift: prompt Claude to re-read STATE.md and Plan.md by saying something like “Please re-read the state file and plan before continuing.” Alternatively, start a fresh session with /clear -- DAAF will resume from the state file.
DAAF seems to be making things up about data variables or endpoints
“Hallucination” is when the AI makes up information that sounds plausible but isn’t accurate. It can happen if DAAF’s reference materials didn’t load properly for your topic.
Fixes:
- Make sure Verbose output is set to True in
/configso you can monitor whether skills are loading. - Ask DAAF to verify its claims against the skill documentation: “Can you check that variable name against the skill docs?”
- Type
/clearfor a fresh context if the session seems confused. - Report persistent issues via GitHub.
The updater said it “updated itself” -- do I need to do anything?
Yes -- run the updater one more time. The update script is one of the files it keeps in sync, so occasionally an update includes a newer version of the updater itself. When that happens it copies the new updater into place and asks you to run it again; that second run uses the new updater and finishes applying everything. This is expected and completely safe -- running it twice never does any harm, and if there’s nothing left to do it simply reports “Already up to date!” and exits. Existing users updating to v3.0.0 should plan to run the updater twice for exactly this reason.