You can now create Docker Compose stack from scratch entirely in your browser — no SSH session, no hand-indented YAML, no vi docker-compose.yml on a remote box. Stashboard releases V7.4 and V7.4.1 turned the visual Compose editor from a renderer of existing files into a full project bootstrapper. This guide walks every path you can take, the exact fields you fill in, how to confirm it worked, and the risks worth knowing before you click the button. 🧱
If you have never opened the editor before, start with the visual Docker Compose editor pillar for the lay of the land, then come back here — this post is the deep dive on how to create Docker Compose stack from scratch.
Prerequisites
Here is everything you need before you create Docker Compose stack from scratch:
- A Docker connection in Stashboard of type Local socket or SSH. A TCP+TLS connection cannot do any of this — it has no filesystem access to write a compose file, so the buttons are hidden for it.
- The
docker composeCLI available where that connection points: inside the Stashboard container for a Local socket, or on the remote host for SSH. Every write is validated withdocker compose config -q, and if the CLI is missing the save is refused by design — an editor bug can never persist a file Compose itself rejects. - Access to the Docker page, where each Compose project is shown as a group with a Compose button on its header.
Three ways to create Docker Compose stack from scratch
There are three entry points, depending on what you already have:
- Add service — append a brand-new service to an existing project (the surgical option).
- Raw YAML — paste a ready-made compose file into a plain-text tab.
- New project — write an entirely new
docker-compose.ymlwith nothing on disk yet.
All three share the same comment-preserving, atomically-written, config -q-validated writer introduced in V7.1, so whichever path you pick to create Docker Compose stack from scratch, your file ends up valid or it does not get written at all.
The Add service wizard
The most surgical way to create Docker Compose stack from scratch on top of a running project is the Add service tab. Open any project’s Compose modal and switch to it. It is a structured wizard that reuses the exact field controls of the existing-service editor:
- Image (with the registry tag dropdown) — required
- Ports (host/container/protocol)
- Volumes (named-volume suggestions, host-path warnings)
- Environment (key/value, masked for
*_KEY/_TOKEN/_PASSWORD/_SECRET) - Labels, restart policy, command/entrypoint, user, working_dir
- The full V7.2 resource picker (CPU/memory limits and reservations)
Plus a service-name field validated for uniqueness within the file and for Compose key shape (^[a-zA-Z0-9._-]+$).
The new block is appended at the end of the services: map by the same writer the field editor uses — so the rest of the file survives byte-for-byte, your comments and key order are untouched, and the new entry lands at the file’s existing indentation column (2-space vs. 4-space is detected, not assumed). Add several blocks and you get multiple containers in one file.
Save and run
After appending the block, Save and run executes docker compose up -d against the whole project, so the new container comes up alongside its siblings without disturbing them:
- Local socket → the in-container Compose CLI (the same V5.2 update path).
- SSH → the CLI on the remote host over the connection’s existing credentials.
The modal then switches to the new service’s tab, where every field is editable just like an existing one. Prefer Save only and the file is written without starting anything. If you would rather drive each field than write YAML, the companion edit Docker Compose without YAML guide covers every control in depth.
The Raw YAML tab
The Raw YAML tab is a plain-text editor for the project’s whole compose file — write or paste a ready stack by hand. It uses the same validated, atomic save and the same optional run. It is available on existing projects too, and it is the escape hatch for files the structured editor marks read-only. When you already have a known-good file in hand, pasting it here is the fastest way to create Docker Compose stack from scratch.
New project: create Docker Compose stack from scratch with nothing on disk
This is the headline V7.4.1 feature and the purest way to create Docker Compose stack from scratch. Every host header (except TCP+TLS) carries a New project button. Click it and you get a dialog with two tabs: From scratch and From template.
💡 The From template tab seeds the new project from one of 126 ready-made recipes — see the self-hosted Docker Compose templates guide for that path. The rest of this section covers From scratch.
The From-scratch fields are:
- Project name — validated to Compose’s lowercase rule
^[a-z0-9][a-z0-9_-]*$(must start with a letter or digit). It is written as a top-levelname:so the project name is deterministic, not silently inferred from the folder name. - File name — defaults to
docker-compose.yml. - Directory — a free-text path as the connection sees it: inside the Stashboard container for a Local socket, on the remote host for SSH (for example
/opt/stacks/myapp). - Create the directory if it doesn’t exist — an opt-in checkbox (on by default) that runs
mkdir -pbefore writing. - First service — the same shared field controls as the editor; service name validated
^[a-zA-Z0-9._-]+$, and an image is required.
Then Create and run writes the file, runs docker compose up -d (locally or over SSH), and opens the new project’s modal — where you can keep adding services with the Add-service flow above. Create only just writes the file and starts nothing. Either way, the file is validated by docker compose config -q and written atomically (.next candidate → validate → rename), so a half-written file never lands on disk.
⚠️ It refuses to clobber an existing stack. Before writing, the flow checks the target directory. If a compose file already lives there, you get a 409 instead of an overwrite: “A Compose file (‘docker-compose.yml’) already exists in ‘/opt/stacks/myapp’. Open it and use Add service instead.” So you cannot accidentally destroy a working stack when you create Docker Compose stack from scratch in an occupied directory.
How to verify it worked
Whichever way you create Docker Compose stack from scratch, confirm it like this:
- The card appears. The new project shows up as its own group on the Docker page (a re-scan runs automatically on success).
- For Create and run, the container shows a running state — open the project modal’s Logs tab to confirm it actually started, not just got created.
- Check the file. Open the Raw YAML tab and confirm the top-level
name:and your service are present. - Check on disk, where the connection points:
cat /opt/stacks/myapp/docker-compose.yml. For an appended service, diff it against your old copy — every untouched line, comment, and quote style should be identical (that is the byte-for-byte guarantee).
Risks and gotchas
- ⚠️ Local-socket paths are inside the container. When you create Docker Compose stack from scratch over a Local socket, the directory you type is resolved inside the Stashboard container. If your stacks root is not bind-mounted into Stashboard, the file lives in the ephemeral container layer and disappears when the container is recreated. Mount your stacks directory at the same path on both sides.
- TCP+TLS can’t write files. That transport has no filesystem reach — use Local socket or SSH for any create-from-scratch flow.
up -dcan fail after the file is written. If Create-and-run writes the file but the bring-up fails, Stashboard keeps the file and surfaces the real error (and the directory it landed in). Fix the issue and run again from the modal.- Private registries need a host-side
docker loginfirst —up -dpulls the image with the host’s credentials, not yours. - Validation is blocking. No
docker composeCLI where the connection points means no save. This is intentional.
Bottom line
Across V7.4 and V7.4.1, Stashboard made it possible to create Docker Compose stack from scratch three different ways — append a service to a live project, paste a ready file into the Raw YAML tab, or bootstrap a whole new project with a validated top-level name:, an opt-in mkdir -p, and a hard refusal to clobber anything already there.
Every path to create Docker Compose stack from scratch runs through the same atomic, config -q-validated, comment-preserving writer, so the worst case is a refused save, never a corrupted stack. Click New project on a host header and try it. 🚀
Stashboard is open source — you can find the full source code on GitHub and pull the ready-to-run image directly from Docker Hub. Issues, PRs, and stars are always welcome. 🙌
