> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reader.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install @vakra-dev/reader and its system dependencies.

## Install the package

```bash theme={null}
npm install @vakra-dev/reader
```

## Prerequisites

* **Node.js 22.12.0+**. Reader has ESM compatibility issues with Bun - use Node.
* **x86\_64 architecture** for Docker. Chromium is bundled as x86\_64 only, so Apple Silicon Macs must use native Node.js or a remote Linux server for Docker deployments.
* **Chrome system libraries** on Linux (see below). On macOS, Chrome is resolved automatically on first run.

<Warning>
  Bun is not supported. The underlying browser automation stack has ESM compatibility issues with the Bun runtime. Use `node` or `npx tsx`.
</Warning>

## macOS

Nothing extra needed. Install the package and run your code - Chrome is resolved automatically on first use.

```bash theme={null}
npm install @vakra-dev/reader
node your-script.js
```

## Linux (Debian / Ubuntu)

Reader needs Chrome's system dependencies to run a headless browser. Install them with:

```bash theme={null}
apt-get update && apt-get install -y \
  wget gnupg ca-certificates curl \
  fonts-liberation fonts-freefont-ttf xvfb \
  libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 \
  libcups2 libdbus-1-3 libdrm2 libgbm1 libgtk-3-0 \
  libnspr4 libnss3 libxcomposite1 libxdamage1 \
  libxfixes3 libxkbcommon0 libxrandr2 libxshmfence1 libxss1 \
  xdg-utils
```

This is the same list used in the official Dockerfile.

## Docker

Reader ships with a production-ready Dockerfile under `examples/deployment/docker/` in the GitHub repo. The key constraints:

* **`platform: linux/amd64`** - Chromium is bundled as x86\_64
* **`shm_size: 2gb`** - Chrome uses `/dev/shm` heavily and crashes with the default 64 MB
* **`seccomp:unconfined` + `cap_add: SYS_ADMIN`** - required for the Chrome sandbox

See the [Deployment guide](/self-hosted/guides/deployment) for the full Docker Compose setup.

## Verify the install

Create a file, `test.js`:

```javascript theme={null}
import { ReaderClient } from "@vakra-dev/reader";

const reader = new ReaderClient({ verbose: true });
const result = await reader.scrape({
  urls: ["https://example.com"],
  formats: ["markdown"],
});

console.log(result.data[0].metadata.website.title);
await reader.close();
```

Run it:

```bash theme={null}
node test.js
```

If you see a title printed, you're done. If not, check that Chrome's system dependencies are installed and that you're on Node 22+.

## Where to go next

<CardGroup cols={2}>
  <Card title="Quickstart" icon="bolt" href="/self-hosted/getting-started/quickstart">
    Walk through your first scrape in more depth.
  </Card>

  <Card title="Examples" icon="code" href="/self-hosted/getting-started/examples">
    Runnable examples for batch, crawl, proxies, and more.
  </Card>
</CardGroup>
