---
title: "Local Docker Installation"
description: "Local Docker Installation guide for AnythingLLM"
---

import { Callout, Tabs } from "nextra/components";
import Image from "next/image";

<Image
  src="/images/getting-started/installation/local-docker/header-image.png"
  height={1080}
  width={1920}
  quality={100}
  alt="AnythingLLM Installation Local Docker"
/>

# Get Started with AnythingLLM in Docker

## Pull the latest image

```bash copy showLineNumbers
docker pull mintplexlabs/anythingllm:latest
```

## Run the image

<Callout type="warning" emoji="️⚠️">
  If you do not use the command below - all of your data will be lost when the container is restarted!

  The `-v ${STORAGE_LOCATION}:/app/server/storage` is required to persist your data on your host machine in a persistent way.
</Callout>

<Tabs items={['Linux/Mac', 'Windows']} defaultIndex="0">
  <Tabs.Tab>
  ```shell copy showLineNumbers
  export STORAGE_LOCATION=$HOME/anythingllm && \
  mkdir -p $STORAGE_LOCATION && \
  touch "$STORAGE_LOCATION/.env" && \
  docker run -d -p 3001:3001 \
  --cap-add SYS_ADMIN \
  --name anythingllm \
  -v ${STORAGE_LOCATION}:/app/server/storage \
  -v ${STORAGE_LOCATION}/.env:/app/server/.env \
  -e STORAGE_DIR="/app/server/storage" \
  mintplexlabs/anythingllm
  ```
 </Tabs.Tab>

 <Tabs.Tab>
  ```powershell copy showLineNumbers
  $env:STORAGE_LOCATION="$HOME\Documents\anythingllm"; `
  If(!(Test-Path $env:STORAGE_LOCATION)) {New-Item $env:STORAGE_LOCATION -ItemType Directory}; `
  If(!(Test-Path "$env:STORAGE_LOCATION\.env")) {New-Item "$env:STORAGE_LOCATION\.env" -ItemType File}; `
  docker run -d -p 3001:3001 `
  --cap-add SYS_ADMIN `
  --name anythingllm `
  -v "$env:STORAGE_LOCATION`:/app/server/storage" `
  -v "$env:STORAGE_LOCATION\.env:/app/server/.env" `
  -e STORAGE_DIR="/app/server/storage" `
  mintplexlabs/anythingllm;
  ```
 </Tabs.Tab>
</Tabs>

## Open the application

To access the full application, visit `http://localhost:3001` in your browser.

## Other information

### About UID and GID in the ENV

- The UID and GID are set to 1000 by default. This is the default user in the Docker container and on most host operating systems.
- If there is a mismatch between your host user UID and GID and what is set in the `.env` file, you may experience permission issues.

### Build locally from source _not recommended for casual use_

- `git clone` this repo and `cd anything-llm` to get to the root directory.
- `touch server/storage/anythingllm.db` to create empty SQLite DB file.
- `cd docker/`
- `cp .env.example .env` **you must do this before building**
- `docker-compose up -d --build` to build the image - this will take a few moments.

Your docker host will show the image as online once the build process is completed. This will build the app to `http://localhost:3001`.

---

## Common questions and fixes

### Cannot connect to service running on localhost!

Please see [How to connect to localhost](/installation-docker/localhost) services.

### Having issues with Ollama?

See [Ollama Connection Troubleshooting](/ollama-connection-troubleshooting) and also read about [How to connect to localhost](/installation-docker/localhost) services. This is 100% of the time the issue.

### Still not working?

Ask for help on our Discord [Community Server](https://discord.gg/6UyHPeGZAC)
