Guide
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.
Updated by Pulkit
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, 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 describes the SSH transport.
docker context create devbox --docker "host=ssh://deploy@devbox.example.com"docker context use devboxdocker psdocker context use defaultIt 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 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 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 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.
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.
ed machines docker ps --all devboxed machines docker compose up devbox shoped machines docker logs --tail 200 --follow devbox apied machines docker df devboxed machines docker prune --yes devbox buildered machines forwards add devbox --local 5433 --remote 5432 --title postgresWhich 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, 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 and the manage servers from your Mac use case. The pricing page lists everything one Edith license includes.