Step-by-step setup

Quick requirements

You need:

  • A supported Windows, macOS, or Linux system
  • Hardware virtualization enabled
  • Enough RAM and disk space for images, containers, volumes, and build cache
  • Internet access to download Docker and pull test images
  • Permission to install apps and system components when prompted
  • About 10 to 20 minutes for a normal desktop install

For Windows, Docker's current install docs list WSL 2 as the normal backend path, along with supported Windows 10/11 builds, 64-bit hardware, virtualization, and 8 GB system RAM. If WSL is missing, install it first with our WSL guide or Microsoft's official WSL install guide.

For macOS, choose the installer that matches your chip. Docker provides separate downloads for Apple Silicon Macs and Intel Macs from the official Mac install page.

For Linux Desktop, Docker's docs require KVM virtualization support, systemd, a supported desktop environment, and at least 4 GB of RAM. For a headless Linux server, use Docker Engine from Docker's package repository instead.

1. Choose Docker Desktop or Docker Engine

Choose Docker Desktop on Windows or macOS. It is the simplest path for local apps, AI tools, web UIs, databases, and Compose projects.

Choose Docker Desktop on Linux only if you want the graphical Desktop app. Choose Docker Engine on Linux if the machine is a server, VPS, WSL-only environment, or terminal-first development box.

This choice matters because Docker Desktop and Docker Engine have different install flows and, on Linux, can use different Docker contexts.

2. Install Docker Desktop on Windows

If WSL 2 is not installed yet, open PowerShell as administrator and run:

wsl --install

Restart Windows if prompted. Then follow Docker's official Windows install guide and download Docker Desktop for Windows from the official Docker page.

Run Docker Desktop Installer.exe. During setup:

  1. Use the WSL 2 backend when prompted.
  2. Choose per-user install if you want the current-user path and do not need all-users features.
  3. Choose all-users install if your admin or organization requires it.
  4. Restart if Docker or Windows asks.
  5. Start Docker Desktop from the Start menu.
  6. Accept the Docker terms if they apply to your use.

When Docker Desktop says it is running, open PowerShell and verify:

docker --version
docker compose version
docker run hello-world

If you work inside Ubuntu or another WSL distribution, enable WSL integration:

Docker Desktop > Settings > Resources > WSL Integration

Then open Ubuntu and run:

docker --version
docker run hello-world

Success looks like this: Docker works in PowerShell and, if enabled, inside your WSL distribution too.

3. Install Docker Desktop on macOS

Open Docker's official Mac install page and choose the installer for your chip.

Check your chip in Terminal if you are unsure:

uname -m

Use this result:

  • arm64: Apple Silicon, such as M1, M2, M3, or newer
  • x86_64: Intel Mac

Install Docker Desktop:

  1. Download the matching Docker Desktop .dmg.
  2. Open the .dmg.
  3. Drag Docker into Applications.
  4. Open Docker from Applications.
  5. Approve macOS helper or password prompts when needed.
  6. Accept the Docker terms if they apply to your use.
  7. Wait until Docker Desktop finishes starting.

Verify in Terminal:

docker --version
docker compose version
docker run hello-world

On Apple Silicon, prefer images that support ARM64 or multiple architectures. Older AMD64-only images may run through emulation and can be slower or more fragile.

4. Install Docker Desktop on Linux desktop

Use Docker Desktop on Linux only when you want the Desktop UI. Start with Docker's official Linux Desktop install page and then choose your distribution-specific page, such as Ubuntu, Debian, Fedora, RHEL, or Arch.

Before installing, check KVM:

lsmod | grep kvm
ls -al /dev/kvm

If /dev/kvm exists but your user cannot access it, add your user to the kvm group:

sudo usermod -aG kvm $USER

Sign out and sign back in. Then follow Docker's distribution-specific install instructions from the official Linux Desktop page.

After installation, verify:

docker --version
docker compose version
docker run hello-world

If Docker Engine is also installed on the same Linux machine, check the active context:

docker context ls

Docker Desktop commonly uses the desktop-linux context. Docker Engine commonly uses the default context.

5. Install Docker Engine on Linux servers

Use Docker Engine for Ubuntu servers, VPS machines, WSL-only Linux setups, CI boxes, or any machine where you do not need Docker Desktop.

Do not use random one-line install scripts from old tutorials. Follow Docker's current Docker Engine install docs for your distribution. Docker's Ubuntu path installs packages such as Docker Engine, the CLI, containerd, Buildx, and the Compose plugin from Docker's repository.

After installing Docker Engine, verify:

sudo docker run hello-world

If you want to run Docker without sudo, follow Docker's Linux post-installation steps and add your user to the docker group:

sudo usermod -aG docker $USER

Sign out and sign back in before testing again:

docker run hello-world

Security note: membership in the docker group is powerful. Only add users you trust.

Verify it works

Run:

docker --version
docker compose version
docker run hello-world

Then test a real local port:

docker run --rm -p 8080:80 nginx

Open this in your browser:

http://localhost:8080

Stop the container with Ctrl+C.

This proves Docker can run a container and expose a port to your host machine. That same pattern is what many local tools use:

  • n8n often exposes port 5678
  • Open WebUI commonly exposes a web port such as 3000 or 8080, depending on the command
  • PostgreSQL commonly exposes 5432
  • Redis commonly exposes 6379

Always follow the specific image's current documentation before exposing ports, especially for databases and admin tools.

Common problems

Docker Desktop says virtualization is not enabled

Enable virtualization in BIOS or UEFI. Look for Intel VT-x, Intel Virtualization Technology, AMD-V, or SVM Mode. After changing the setting, fully shut down and start the machine again.

Docker works in PowerShell but not in WSL

Open Docker Desktop and enable WSL integration:

Docker Desktop > Settings > Resources > WSL Integration

Also confirm your distribution is WSL 2:

wsl --list --verbose

Docker daemon is not running

On Docker Desktop, open the app and wait until it says Docker is running.

On Linux Engine, check the service:

sudo systemctl status docker
sudo systemctl start docker

Permission denied on Linux

Run with sudo first:

sudo docker ps

If Docker is installed correctly and you want normal user access, add your user to the Docker group:

sudo usermod -aG docker $USER

Then sign out and sign back in.

Port already allocated

Another app is already using the host port.

On Windows:

netstat -ano | findstr :8080

On macOS or Linux:

lsof -nP -iTCP:8080 -sTCP:LISTEN

Use a different host port:

docker run --rm -p 8081:80 nginx

Then open:

http://localhost:8081

Docker Desktop uses too much disk

Check usage:

docker system df

Clean unused build cache, stopped containers, and dangling images:

docker system prune

Be careful with volumes:

docker volume ls

Volumes often contain the real data for local databases, n8n workflows, Open WebUI data, and other persistent apps. Do not prune volumes unless you know what you are deleting or have backups.

Next useful actions

Run your first real Compose project after hello-world works. For AI and automation guides, Docker is usually just the foundation for a local web app, model UI, workflow tool, or database.

If you are on Windows, make sure Docker works from the same place your guide will run. If the guide says to run commands in WSL, test Docker inside Ubuntu. If the guide says PowerShell, test in PowerShell.

Before running serious local apps, learn these commands:

docker ps
docker ps -a
docker images
docker volume ls
docker logs <container_name>
docker stop <container_name>
docker compose up -d
docker compose down

For persistent tools such as n8n, Open WebUI, databases, or dashboards, identify the volume before deleting or reinstalling anything.

Background, planning, and caveats

Docker Desktop vs Docker Engine

Docker Desktop is the desktop product. It bundles the engine, CLI, Compose, Desktop UI, settings, local VM behavior, and integrations for Windows, macOS, and supported Linux desktops.

Docker Engine is the core runtime normally used on Linux servers and headless systems. It does not give you the same Desktop app, but it is often the cleaner choice for a server.

For Useful Atlas hands-on guides, Docker Desktop is usually best for Windows and macOS readers. Docker Engine is usually best for Linux servers.

Docker Desktop licensing

Docker Desktop has product terms. Docker's install docs summarize that Docker Desktop is free for personal use, education, non-commercial open source projects, and small businesses under Docker's stated size and revenue thresholds. Larger commercial or government use may require a paid subscription.

If you are installing Docker Desktop on a company machine, check your organization's policy and Docker's current subscription terms before standardizing it.

Windows permissions

Docker's Windows permission docs explain that install mode matters. Per-user installation is designed to avoid administrator privileges for install and updates, while all-users installation requires elevation and may use the privileged helper service.

For most individual Windows users, the practical path is simple: install Docker Desktop, use the WSL 2 backend, and run Docker as your normal user. In managed company environments, follow your admin's install mode.

Mac permissions

Docker Desktop on macOS may ask for a password when applying recommended settings or installing helper components. Docker's Mac permission requirements explain which parts require elevated access.

For a normal personal install, approve the prompts from Docker Desktop itself, not from third-party scripts.

Linux Desktop contexts

Docker Desktop for Linux runs a VM and uses a Desktop-specific context. If you also have Docker Engine installed, containers and images may not appear in the same place.

Use:

docker context ls

Switch only when you know which runtime you want:

docker context use desktop-linux
docker context use default

Security notes

Containers are not magic security boundaries. Treat unknown images like unknown software. Use official images where possible, pin versions for important setups, keep secrets out of Compose files committed to Git, and avoid exposing admin ports to your network unless the guide explicitly requires it.

On Linux, the docker group effectively grants strong control over the Docker daemon. Add users carefully.

Red flags

  • You skip WSL 2 on Windows and then wonder why Linux containers fail.
  • You install an old Docker package from a random tutorial instead of Docker's current docs.
  • You expose a database or admin UI port without a password or firewall plan.
  • You delete Docker volumes while trying to free disk space without checking what data they contain.
  • You use the wrong Docker context on Linux Desktop and think your containers disappeared.
  • You install Docker Desktop on a company machine without checking licensing or admin policy.

Bottom line

Use Docker Desktop on Windows and macOS. On Windows, install or verify WSL 2 first. On macOS, choose the installer that matches Apple Silicon or Intel. On Linux desktops, use Docker Desktop only if you want the GUI; otherwise use Docker Engine for servers and terminal-first machines.

Do not stop at the installer. Run docker run hello-world, test a local web container, and understand volumes before using Docker for important local AI, automation, or database work.