# How to Manage Docker on a Remote Server From a Mac

> Point the Docker CLI at a server, use a terminal or web UI, or get containers, Compose projects and disk usage for every server in one window.

- Canonical URL: https://getedith.pro/guides/manage-docker-on-remote-server-mac
- Published: 2026-12-03
- Updated: 2026-12-03

## The short answer

The Docker CLI can already talk to a remote server over SSH: create a Docker context that points at `ssh://user@host` and every `docker` command runs against that server. For a visual view, use a terminal UI such as lazydocker over SSH or a web UI such as Portainer on the server. If you manage containers on several servers from a Mac and want them in one window with nothing installed on the servers, Edith's [SSH server manager](https://getedith.pro/extensions/ssh-machines), Machines, has a Docker tab for every machine.

One thing first: Docker Desktop and OrbStack run containers on your Mac. They are container runtimes. Managing Docker on a server is a different job, and the tools below need Docker already installed on that server.

## Method 1: a Docker context over SSH

Built into the Docker CLI

### Point the Docker CLI at the server

With the Docker CLI on your Mac and SSH key access to the server, create a context and switch to it. Docker's documentation on [protecting the daemon socket](https://docs.docker.com/engine/security/protect-access/) describes the SSH transport.

Terminal

Shell

```
docker context create devbox --docker "host=ssh://deploy@devbox.example.com"
docker context use devbox
docker ps
docker context use default
```

It is free and uses the Docker you already know. The catch is that a context is global to your shell, so it is easy to run a command against the wrong server, and you still read plain text tables for one server at a time.

## Method 2: lazydocker or Portainer

[lazydocker](https://github.com/jesseduffield/lazydocker) is a free, MIT licensed terminal UI for containers, images, volumes and logs. Install it on the server and run it over SSH, or run it on your Mac with a remote context. [Portainer](https://github.com/portainer/portainer) Community Edition is free and open source and runs as a container on the server, serving a web UI for Docker, Swarm and Kubernetes with stacks and multiple environments. Its paid Business Edition adds role based access; see [Portainer pricing](https://www.portainer.io/pricing) for current tiers.

Portainer is the better choice when a team shares the servers or you need Kubernetes. Edith has neither team access nor Kubernetes support.

## Where these fall short for one person and a few servers

- **One server at a time.** Contexts and lazydocker show the server you are pointed at, not the fleet.
- **Something to install.** Portainer is another container to run, update and expose on each server.
- **Docker without the machine.** When a disk fills up, you want the machine's disk and Docker's own disk usage side by side.

## The Edith way: the Docker tab in Machines

Machines connects with the macOS OpenSSH client and your existing keys and SSH config. For each machine with Docker, the Docker tab lists containers with live CPU and memory, plus images, volumes, networks and Compose projects. You can start, stop, restart, pause, remove or open a shell in a container and follow its logs. It runs the real `docker` command on the server over SSH, so nothing is installed there, and it works with Linux, macOS and Windows hosts running Docker.

1. **Install Machines and add the server**
   Open Library in Edith, find Machines and click Install. Then click Add machine and pick the host under From SSH config, or type its Address and Username. The SSH user needs access to the Docker socket.
2. **Open the Docker tab**
   Click the machine, then Docker. Containers, Images, Volumes, Networks and Disk usage each have their own screen. Containers show live CPU and memory, and each one has Start, Stop, Restart, Shell and Remove.
3. **Read a container's logs**
   Open a container's details for its Logs, Inspect, Stats, Processes and Files. The log view can copy every visible line, change the text size and show timestamps.
4. **Work with Compose projects**
   Containers are grouped by Compose project, and each group can start or stop all of its containers at once. Compose review shows a project's effective configuration with environment values masked, so you can compare two revisions before a change.

## When the disk fills up

Docker images and build cache are the usual reason a server's disk passes 90 percent. In the Machines settings, turn on Notify when a disk is nearly full and set Disk alert at. When it fires, open the Docker tab, check Disk usage, and use the Reclaim space menu: Prune unused images…, Prune unused volumes…, Prune networks… or Prune build cache…. Each one asks before it removes anything, and removing a container, image or volume is confirmed the same way.

Reach a container's port safely

A database container that only listens on the server can be reached with a port forward instead of publishing the port to the internet. Open the machine's Tools tab, add one under Port forwards from local port 5433 to the server's 5432 and switch it on. Then open it in Edith's [database GUI](https://getedith.pro/extensions/database-client) or any client on `localhost`.

### From the terminal

Every Docker action is also a command with stable JSON output, useful for scripts and for coding agents. Destructive ones are a dry run until you add `--yes`, and `prune` first prints the exact docker command it would run.

Terminal

Shell

```
ed machines docker ps --all devbox
ed machines docker compose up devbox shop
ed machines docker logs --tail 200 --follow devbox api
ed machines docker df devbox
ed machines docker prune --yes devbox builder
ed machines forwards add devbox --local 5433 --remote 5432 --title postgres
```

## Which tool to use

- **Occasional commands:** a Docker context over SSH. Free and built in.
- **A keyboard UI on one server:** lazydocker.
- **A team, roles or Kubernetes:** Portainer.
- **Your own few servers, from a Mac, with health and files in the same place:** Machines. It comes with Edith, $35 once for one Mac with no per-server fee, on macOS 14 or later on Apple silicon. It has no mobile app and no sync between devices.

## Common questions

### Does Machines replace Docker Desktop or OrbStack?

No. Those run containers on your Mac. Machines manages Docker on machines that already have it installed, including your own Mac if Docker runs there.

### Does it support Kubernetes?

No. It covers Docker and Docker Compose only.

### Can I still run raw docker commands?

Yes. Open the machine's Terminal tab for a shell on the server, or click Shell on a container for a shell inside it. From your own terminal, `ed machines exec devbox -- docker buildx ls` runs any command there and passes its output and exit code through.

### Can a coding agent manage my containers?

Yes. The `ed machines docker` commands are also tools in Edith's [MCP server](https://getedith.pro/mcp), and commands that remove something show a preview until the call confirms it.

## Related

Read [how to monitor a server's CPU, memory and disk from a Mac](https://getedith.pro/guides/monitor-server-from-mac) and the [manage servers from your Mac](https://getedith.pro/use-cases/manage-servers-from-your-mac) use case. The [pricing page](https://getedith.pro/pricing) lists everything one Edith license includes.

## Edith extensions used

- [SSH Server Manager for Mac With Docker and Files](https://getedith.pro/extensions/ssh-machines): Watch, browse and run your servers and containers from one place.
- [Database GUI for Mac: Postgres, MySQL, SQLite](https://getedith.pro/extensions/database-client): Browse and safely edit your databases without leaving your Mac.

## Related guides

- [How to Kill a Process on a Port on Mac](https://getedith.pro/guides/kill-process-on-port-mac): Kill the process using a port on your Mac with lsof and kill, from Activity Monitor, with a free menu bar app, or see every local server by project first.
- [Monitor a Server's CPU, Memory and Disk From a Mac](https://getedith.pro/guides/monitor-server-from-mac): Monitor a Linux server's CPU, memory and disk from your Mac over SSH: top and htop, Netdata and Glances, or a live fleet view with down and disk alerts.

## Get Edith

Edith is a native Mac app for macOS 14 or later on Apple silicon with 100+ extensions, the `ed` command line and an MCP server. $35 once for one Mac, plus $7 for each additional Mac, with no subscription and a 30-day refund.

- [Buy Edith](https://getedith.pro/pricing): $35 once for one Mac, plus $7 for each additional Mac
- [Download Edith](https://getedith.pro/download): the installer, or Homebrew
