# Install self-hosted memex

> Run memex in Docker on your own computer, a home server or a virtual machine, and create its one account.

Page: https://docs.memex.tools/self-hosted-install

The easiest way is to let the AI on your computer do it. Give the repository to Claude Code, Codex or any assistant that can run commands there, and ask:

```
Install memex from https://github.com/artem-kolesnikov/memex and connect yourself to it.
```

It follows these steps and hands you the one step that is yours: creating your account. To do it yourself, the steps are the same.

### 1. Install Docker
You need Docker on Linux, macOS, or Windows with Docker Desktop, on 64-bit x86 or ARM, with 1 GB of memory to spare. To install it, follow [DOCKER.md](https://github.com/artem-kolesnikov/memex/blob/main/DOCKER.md).

### 2. Start memex

```
docker run -d --name memex -p 127.0.0.1:8080:8080 -v memex:/data --restart unless-stopped ghcr.io/artem-kolesnikov/memex
```

### 3. Check that it is ready
memex is ready when this answers with `"status":"ok"`:

```
curl -fsS http://localhost:8080/api/health
```

### 4. Create your account
Open `http://localhost:8080` and create your account with your email address and a password. It is the only one this server holds, and your memex opens on three notes that show you around.

> **The setup code**
>
> For ten minutes after memex first starts, that is all the page asks. After that it also asks for a setup code, which proves you run the server; memex prints it in its log: `docker logs memex`. See [Sign-in and password](https://docs.memex.tools/self-hosted-sign-in).

Everything memex keeps is in the `memex` volume.

## Build it yourself

To run the code in the repository rather than the published image, build it from a clone under the image's name first, and the commands here use it:

```
docker build -t ghcr.io/artem-kolesnikov/memex .
```

## Next steps

- [Connect assistants to self-hosted memex](https://docs.memex.tools/self-hosted-connect): Connect Claude Code, Codex, Cursor, Gemini CLI, Claude Desktop or an agent of your own to a memex on your computer.
- [On your network](https://docs.memex.tools/self-hosted-network): Let other machines on your network reach a self-hosted memex, and give memex the address they use.

> **Tip:** The container has to be called memex for Claude Desktop's setup to find it.

## Related

- [memex.tools or self-hosted memex](https://docs.memex.tools/self-hosted): The same memex, run two ways: free on memex.tools, or on your own computer.
- [Sign-in and password](https://docs.memex.tools/self-hosted-sign-in): The one account on a self-hosted memex, its setup code, its password, and what to do when the password is forgotten.
- [Connect assistants to self-hosted memex](https://docs.memex.tools/self-hosted-connect): Connect Claude Code, Codex, Cursor, Gemini CLI, Claude Desktop or an agent of your own to a memex on your computer.
- [On your network](https://docs.memex.tools/self-hosted-network): Let other machines on your network reach a self-hosted memex, and give memex the address they use.
