# Docker Containers: Start, Stop, Create, and Manage Containers
URL: https://ctrlops.io/docs/modules/docker/containers
Published: 2026-11-05
Updated: 2026-11-11

The Containers tab lists every container and Compose stack on your server. Start, stop, or restart them, open a terminal inside one, change their settings, and create new ones from an image, your code, a database preset, a Marketplace template, or a Compose file.

The **Containers** tab is where you run your apps. It opens first when you click [Docker](https://ctrlops.io/docs/modules/docker), and it lists every container on this server.

> **New to Docker?**
> 
> A *container* is one running app. A *stack* is a group of containers that one compose file starts together, such as a website and its database.

![The Docker Containers tab with 12 running containers, the Search containers box, Filter, and Create at the top, the node-app, test, and woofer Compose stacks marked stack, the test stack open to show its two containers, and the single grafana container below](https://cdn.ctrlops.io/docs/docker-containers-list.webp)

Each stack is one row, with a count such as 2/2 up. Click its arrow to see its containers.

[Watch: Manage Docker Containers on One Screen - Logs, Exec & AI (CtrlOps)](https://www.youtube.com/watch?v=KtY-N7MeiB4)

## Find what you need

| I want to | Instead of typing | Go to |
| --- | --- | --- |
| See what is running | `docker ps -a` | [Read the list](#read-the-container-list) |
| Start, stop, or restart | `docker start`, `docker stop`, `docker restart` | [Row buttons](#start-stop-or-restart-a-container) |
| Remove a container | `docker rm` | [Delete a container](#delete-a-container) |
| Get a shell inside | `docker exec -it <name> sh` | [Open a terminal](#open-a-terminal-inside-a-container) |
| Read the logs | `docker logs -f <name>` | [Read the logs](#read-the-logs-of-a-container) |
| Check CPU, memory, and processes | `docker stats`, `docker top` | [Check usage](#check-cpu-memory-and-processes) |
| Change the restart policy or limits | `docker update` | [Change settings](#change-the-name-restart-policy-or-limits) |
| Change an environment variable | `docker stop`, `docker rm`, `docker run` | [Change a variable](#change-an-environment-variable) |
| Copy files in or out | `docker cp` | [Files](#download-or-upload-files) |
| Run something new | `docker run -d -p 8080:80 ...` | [Create](#create-something-new) |
| Start or remove a whole stack | `docker compose up -d`, `docker compose down` | [Manage a stack](#manage-a-compose-stack) |

## Read the container list

Each row shows the container and its image, its network, its status, and its live CPU and memory. The list updates by itself every few seconds.

- **Stacks** sit under a row marked **stack**. Click the row's arrow to see its services. *2/3 up* means two of its three containers run.
- **Search containers…** finds a container. **Filter** shows only running, paused, restarting, or stopped ones.
- Containers you made outside CtrlOps show here too. You do not need to deploy them again.

Most statuses explain themselves. These are the ones worth knowing:

| You see | What it means | What to do |
| --- | --- | --- |
| `exited (1)` | It stopped with an error. The number is its exit code | Read its logs |
| `exited (0)` | It finished and stopped normally | Nothing, unless it should keep running |
| `OOM` | It ran out of memory, and the system stopped it | Raise its memory limit, or find the leak |
| `restart loop` | It crashes and restarts again and again | Read its logs |
| `1 unhealthy` | One container failed its health check | Read its logs |
| **Update available** | The registry has a newer image | See [Update to a newer image](#update-to-a-newer-image) |

## Start, stop, or restart a container

The buttons sit at the right of each row, and they follow the state of the container:

- A running container shows **Stop** and **Restart**.
- A stopped container shows **Start** and **Restart**.
- A paused container shows **Resume** and **Restart**.

These buttons run right away, with no confirm step. The button spins until the list shows the new state.

On a stack row, **Restart** and **Down** act on every container in the stack. See [Manage a Compose stack](#manage-a-compose-stack).

### Act on several containers at once

Tick the rows you want, and a bar appears with **Start**, **Stop**, **Restart**, and **Delete**. Ticking a stack row selects every container in it. Each button shows how many of the selected containers it can act on.

To delete several, you type `delete 3` to confirm. If only some succeed, the result tells you, for example *2 of 3 containers stopped. 1 failed.*

![The node-app stack and the test-cache-1 container ticked in the Containers list, with the bar at the top showing 6 selected and the Start (0), Stop (6), Restart (6), Delete (6), and Clear selection buttons](https://cdn.ctrlops.io/docs/docker-bulk-actions-bar.webp)

All six selected containers run, so Start shows 0 and the other buttons show 6.

### Update to a newer image

Click **Update available** on the row. It opens [Recreate](#apply-changes-that-need-a-new-container) with **Pull the image again** already on.

## Delete a container

Click **Delete** on the row, then confirm. A running container shows **Stop and delete** instead.

> You lose the data stored inside the container. Named volumes stay on the server. Anonymous volumes go only if you tick **Also remove anonymous volumes**.

If the container belongs to a stack, the next deploy makes it again. To remove it for good, use [Delete Stack](#manage-a-compose-stack) or take it out of the compose file.

![The Delete express-hello-world? dialog for a stopped container, saying CtrlOps removes the container from the server and you lose the data in it, with the Also remove anonymous volumes checkbox and the Cancel and Delete buttons](https://cdn.ctrlops.io/docs/docker-delete-container-dialog.webp)

This container is stopped, so the button reads Delete. On a running one, it reads Stop and delete.

## Open a container

Click a row to open the container. A running container opens on **Terminal**. Any other container opens on **Logs**, because it has no shell to open.

To close it, use the ✕ or press Escape. A click outside does not close it, so you cannot lose a terminal by accident.

![The grafana container open, with the containers of the server grouped by stack on the left, the open containers in a strip at the top, the Stop, Pause, Restart, and More actions buttons in the header, and the Terminal, Logs, Overview, Env, Volumes, Files, Network, and Domain tabs](https://cdn.ctrlops.io/docs/docker-container-workspace.webp)

Switch containers on the left. Each open container keeps its place in the strip at the top.

Each tab does one job:

| Tab | Use it to |
| --- | --- |
| **Terminal** | [Run commands inside the container](#open-a-terminal-inside-a-container) |
| **Logs** | [Read what the container prints](#read-the-logs-of-a-container) |
| **Overview** | [Check usage](#check-cpu-memory-and-processes) and [change settings](#change-the-name-restart-policy-or-limits) |
| **Env** | [See its environment variables](#change-an-environment-variable) |
| **Volumes** | [See, add, or remove mounts](#add-or-remove-a-mount) |
| **Files** | [Browse, download, or upload files](#download-or-upload-files) |
| **Network** | [See its IP address and join a network](#connect-to-a-network) |
| **Compose File** | Read its compose file. Shows only on Compose containers. To edit, [open the stack](#manage-a-compose-stack) |
| **Domain** | [Send a domain to this container](https://ctrlops.io/docs/modules/docker/domains#add-a-domain-from-a-container) |

The header has the buttons for the current state. **More actions** holds the rest:

| Action | What it does |
| --- | --- |
| **Kill (SIGKILL)** | Stops the container at once. It loses anything it did not save, so use **Stop** first |
| **Recreate** | [Replaces it with a new container](#apply-changes-that-need-a-new-container) |
| **Duplicate** | [Makes a stopped copy](#make-a-copy-of-a-container) |
| **View raw inspect** | Shows the full `docker inspect` output |
| **Copy exec command**, **Copy logs command** | Copies the command, for use in your own SSH session |
| **Delete container** | [Removes it](#delete-a-container) |

![The More actions menu open from the ⋯ button in the container header, listing Kill (SIGKILL), Recreate, Duplicate, View raw inspect, Copy exec command, Copy logs command, and Delete container](https://cdn.ctrlops.io/docs/docker-more-actions-menu.webp)

More actions is the ⋯ button at the right of the container header.

## Open a terminal inside a container

Click a running container, and you are in a shell inside it. You can type commands right away. Typing `exit` closes the session, and you never land in the shell of the server.

- **New terminal session** opens another shell. Its menu lets you pick `bash`, `ash`, `zsh`, or `sh`.
- **Open as root** shows when the container does not run as root.
- **Split** puts two terminals side by side. **Full screen** gives the terminal the whole window.

![The Terminal tab of the grafana container with two shell sessions, ash and ash 2, a few ls and cd commands run inside the container, and the toolbar with New terminal session, Split, Scripts, Ask AI, Suggestions, and Full screen](https://cdn.ctrlops.io/docs/docker-container-terminal.webp)

The terminal runs inside the container, not on the server.

### Ask AI about this container

Click **Ask AI** in the terminal toolbar. It uses the same AI you set up for the [AI Terminal](https://ctrlops.io/docs/modules/ai-terminal), and it knows which container you are in.

Commands from the AI run in that session, inside the container. It asks before it runs one. With [Auto-Run](https://ctrlops.io/docs/modules/ai-terminal#what-auto-run-runs-by-itself) on, only read-only commands skip that step. Your AI provider gets your messages, the command output, and the names of the container, image, and server.

![The AI Assistant panel open beside the container terminal after a click on Ask AI, with the question List running services and a ps aux command marked Safe and Read, waiting for approval with the Run and Cancel buttons](https://cdn.ctrlops.io/docs/docker-ask-ai-panel.webp)

The AI says why it wants each command, and waits for you to click Run.

### Run a saved script

Click **Scripts** to run a script from your [Script Directory](https://ctrlops.io/docs/modules/ai-terminal/scripts) in this session. It runs inside the container, so the tools it uses must be in the image.

## Read the logs of a container

Click **Logs** on the row, or open the **Logs** tab of the container. You can follow new lines live, filter by level, search, and download. See [Docker Logs](https://ctrlops.io/docs/modules/docker/logs) for the details.

Stuck on an error? Rest on an `ERR` line in the **Logs** tab of the container, and click **Explain with AI**. The **Terminal** tab opens with a question about the error and the lines before it, and you press send.

## Check CPU, memory, and processes

The **Overview** tab shows the **Container details** card beside live **Memory**, **CPU**, **Network**, and **Block I/O**. Below them are the volumes, ports, processes, and labels of the container.

- **Port Mapping** has **Open in the browser**, **Copy URL**, and **Forward to localhost**. Use [Port Forwarding](https://ctrlops.io/docs/modules/port-forwarding) for a port that is not public.
- **Processes** lists what runs inside, with **Stop process** and **Kill process**. Stopping the main process stops the container.

![The Overview tab of the grafana container, with the Container details card on the left, pencil icons next to Name, Tags, Restart policy, Memory limit, and CPU limit, and the live Memory, CPU, Network, and Block I/O tiles on the right](https://cdn.ctrlops.io/docs/docker-overview-tab.webp)

Fields with a pencil icon in Container details can be edited.

## Change the name, restart policy, or limits

In **Overview**, click the pencil next to a field in **Container details**.

| Field | When it applies | Good to know |
| --- | --- | --- |
| **Name** | Right away | Up to 128 characters |
| **Restart policy** | Right away | See below |
| **Memory limit** | Right away | 6 MB or more. Going back to **No limit** needs a recreate |
| **CPU limit** | Right away | From 0.01 up to the number of cores. Going back to **No limit** needs a recreate |
| **Tags** | On recreate | Up to 10 tags |

The restart policy decides what happens when a container stops:

| Policy | The container restarts |
| --- | --- |
| `no` | Never. New containers start on this |
| `on-failure` | Only when it stops with an error. **Max retry count** sets how many times (0 means no limit) |
| `unless-stopped` | Always, unless you stopped it yourself. **The best choice for most apps** |
| `always` | Always, even after you stopped it, once Docker or the server restarts |

> On a Compose container, the next deploy sets these values from the compose file again. To keep a change, make it in the compose file.

## Change an environment variable

The **Env** tab lists the variables of the container. Values that look like secrets stay hidden until you click **Show value**, such as names with `PASSWORD`, `TOKEN`, or `SECRET` in them, names that end in `_KEY`, and links with a password in them.

The tab is read-only, because Docker cannot change the variables of an existing container. To change one:

- **Compose container:** edit the compose file, then [redeploy the stack](#manage-a-compose-stack).
- **Any other container:** open **More actions**, click **Recreate**, and use **Edit first**.

The note under the list names **Duplicate**, then **Edit first**. That works too, but it makes a copy with a new name.

![The Env tab of the grafana container listing 7 of 7 variables, such as PATH and GF_PATHS_DATA, with the Search variables box, a Copy value icon on each row, and a note on how to change a value](https://cdn.ctrlops.io/docs/docker-env-tab.webp)

None of these values look like secrets, so all of them show. Copy value is at the right of each row.

## Add or remove a mount

The **Volumes** tab lists what is mounted in the container.

- **Add volume** adds a mount. Pick the source, the path in the container, the access mode, and the type: `volume` for Docker storage, `bind` for a folder on the server, or `tmpfs` for memory.
- The bin icon on a row (**Remove mount**) removes one.
- **Set up** in the backup column starts a [backup of that volume](https://ctrlops.io/docs/modules/docker/volumes#back-up-a-volume).

A new or removed mount waits until you [recreate the container](#apply-changes-that-need-a-new-container).

![The Volumes tab of the postgres container with one mount, postgres-data on /var/lib/postgresql with mode rw and type volume, the Set up link in the Backup column, the bin icon, and the Add volume button](https://cdn.ctrlops.io/docs/docker-volumes-tab.webp)

Set up in the Backup column starts a backup of that volume.

## Download or upload files

The **Files** tab lets you browse the container while it runs. Click a folder to open it, and the path at the top shows where you are.

- **Download** on a row gets that file or folder. **Upload** sends a file from your computer to the folder you are in.
- **Download this folder** gets the folder you are in. At `/`, it reads **Download all files**.
- For a folder, you pick how: **Download .tar.gz** gets one compressed file (**Download .tar** if the server has no gzip), and **Download folder** keeps the files as they are.

To rename or delete a file, use the **Terminal** tab.

![The Files tab of the postgres container at the root folder /, with the layout buttons, Download all files, and Upload at the top, and folders such as bin, dev, etc, and home, each with a Download button](https://cdn.ctrlops.io/docs/docker-files-tab.webp)

Each folder and file has its own Download. At the root, the top button reads Download all files.

## Connect to a network

The **Network** tab shows each network the container is on, with its **IP Address**, **Gateway**, and **MAC**. Use **Connect to a network** to join another one, or disconnect from the card. To let two containers talk to each other, see [Networks](https://ctrlops.io/docs/modules/docker/networks#let-two-containers-talk-to-each-other).

## Apply changes that need a new container

Docker cannot change some settings on a container that already exists, such as its mounts and tags. CtrlOps holds these as pending changes and shows a bar under the header, with **Review**, **Recreate**, and **Discard**. **Undo** on a changed row takes back that one change, and **Discard** takes back all of them.

![The amber bar under the container header reading 1 change needs a new container: Add mount /demo/ada, with the Review, Recreate, and Discard buttons, and the new mount in the Volumes tab marked pending with an Undo link](https://cdn.ctrlops.io/docs/docker-pending-changes-bar.webp)

Your changes wait in this bar until you recreate the container.

**Recreate** makes a new container with the same name and a new ID. Anonymous volumes move to it. You can also start it from **More actions**.

- **Pull the image again** gets the newest version of the tag first.
- **Edit first** lets you change the settings before the swap.

If the new container fails, CtrlOps puts the old one back, so a bad change does not leave you with nothing.

On a Compose container, the bar shows **Review in Compose File** instead. It shows the change to the file, and **Save & redeploy** applies it.

> Recreate does not copy links, GPU settings, log options with secrets, the process limit, the OOM kill setting, block I/O weights, the cgroup parent, storage options, cluster and named pipe mounts, or the MAC address. The dialog names any that apply and asks you to confirm.

![The Recreate dialog saying Docker makes a new container with the same name and a new ID, with the Changes list showing Add mount /demo/ada, the Pull the image again checkbox, and the Cancel, Edit first, and Recreate buttons](https://cdn.ctrlops.io/docs/docker-recreate-dialog.webp)

The dialog lists your changes before you confirm.

## Make a copy of a container

**Duplicate** in **More actions** makes a copy named `<name>-copy` and does not start it. Host ports are not copied, and anonymous volumes start empty. Use **Edit first** to change the settings before the copy is made.

> If the copy uses the same named volume as the original, do not start it while the original runs. Both would write to the same data.

## Create something new

Click **Create** at the top of the list, and pick what fits:

| You want to run | Pick |
| --- | --- |
| An image from Docker Hub or another registry | [Application](#run-a-container-from-an-image) |
| Your own code from Git or a zip | [Application, then Build from code](#build-a-container-from-your-code) |
| A database, ready in a minute | [Database](#create-a-database) |
| An open source app, ready to use | [Marketplace](#install-an-app-from-the-marketplace) |
| Several services that work together | [Compose](#deploy-a-compose-stack) |

![The Create menu open at the top right of the Containers tab, showing Application, Compose to deploy a docker-compose stack, Database with postgres, mysql, and redis presets, and Marketplace with one-click app templates](https://cdn.ctrlops.io/docs/docker-create-menu.webp)

Create is at the top right of the Containers tab.

## Run a container from an image

### Open the form

Click **Create**, then **Application**. Keep **Use an existing image** selected.

### Pick the image

Choose **Images** for what is already on the server, or a registry: **Docker Hub**, **GHCR**, **GitLab Registry**, **AWS ECR**, or **Gitea Packages**. Then type or pick the image. You can use public images without signing in. For a private one, see [Sign in to a private registry](https://ctrlops.io/docs/modules/docker/images#sign-in-to-a-private-registry).

### Fill in the settings

Only the image and the name are needed to start. Add the rest if your app needs them:

| Field | What to enter |
| --- | --- |
| **Container name** | 2 to 128 letters, digits, dots, underscores, or hyphens |
| **Port mapping** | **Container port** is the port your app listens on. **Host port** is the port people reach on the server. Leave it empty and Docker picks one |
| **Network** | Pick one, or use **+ Create new network**. Containers on the same [network](https://ctrlops.io/docs/modules/docker/networks) can reach each other by name |
| **Environment variables** | **Add variable**, or **Paste .env** for many at once |
| **Volume mounts** | `volume-or-path:/container/path`. Use this for any data you want to keep |
| **Restart policy** | Use `unless-stopped` for an app that must stay up |
| **Start immediately** | Leave it on to run the container as soon as it is made |

**Advanced options** holds the command, entrypoint, user, labels, health check, and other Docker flags.

![The Create Container form with Use an existing image selected, the Images, Docker Hub, GHCR, GitLab Registry, AWS ECR, and Gitea Packages tabs, the image nginx:1.27-alpine, the container name demo-web, host port 3000 to container port 80 with the warning Container grafana uses port 3000, the bridge network, and empty Environment variables rows](https://cdn.ctrlops.io/docs/docker-create-container-form.webp)

The form warns you when another container uses the host port you type.

If the host port is in use, the form names the container that uses it. When you click **Create Container**, CtrlOps checks the ports again, and it can offer a free one, such as **Use 3001**.

### Create it

Click **Create Container**. Each step shows as it runs: **Check**, **Pull image**, **Create**, **Start**, **Show in list**. Then click **Open container** to go to it.

> Anyone who can run `docker inspect` on this server can read the environment variables of a container.

## Build a container from your code

In the same form, switch to **Build from code**. Choose **GitHub**, **GitLab**, **Bitbucket**, **Gitea**, or **Upload**, then pick a build pack: **Static**, **Dockerfile**, or **Docker Compose**. **Railpack** and **Nixpacks** show as *Coming soon*. The image builds on your server, not on your computer. To make only an image, or to generate a Dockerfile, use [Create Image](https://ctrlops.io/docs/modules/docker/images#build-an-image-from-your-code).

## Create a database

Click **Create**, then **Database**. You can pick from PostgreSQL, MySQL, MariaDB, Redis, MongoDB, ClickHouse, CouchDB, InfluxDB, Neo4j, Elasticsearch, Meilisearch, and Valkey.

Click **Create** on a card, and the form comes filled in for you. It has the image, a volume for the data, a health check, and the restart policy `unless-stopped`. The port is published on `127.0.0.1`, so the database is not open to the internet.

Type a password or click **Generate password**, and copy it before you create the database.

![The Create Database screen with the Search database box, the Select tag filter, and cards for PostgreSQL, MySQL, MariaDB, Redis, MongoDB, ClickHouse, CouchDB, and InfluxDB, each with its version, tags, and a Create button](https://cdn.ctrlops.io/docs/docker-database-presets.webp)

Pick a database card and CtrlOps fills in the rest of the form.

## Install an app from the Marketplace

Click **Create**, then **Marketplace**. Use **Search template** or the category filter to find an app, then click **Create**. Each card shows the license of the app and what it needs, such as a CPU with AVX or a domain with HTTPS.

Some apps need more access to the server, such as the Docker engine or a folder on the server. You tick a line for each one before you can deploy.

When the app is up, copy the values CtrlOps shows you, because it does not keep them. Then click **Open app**. On many apps, the first account that signs up is the admin, so make yours right away.

> Docker opens a published port even when a firewall such as UFW blocks it. Each app also has its own license, so read it before you use the app for a business.

![The Create from Template screen with the Search template box and the All categories filter, and app cards such as Ackee, Activepieces, Actual Budget, and AdGuard Home, each with its version, tags, license, notes such as Needs a domain with HTTPS, and a Create button](https://cdn.ctrlops.io/docs/docker-marketplace.webp)

Find an app by name or by category. The notes in yellow tell you what the app needs.

## Deploy a Compose stack

### Open the panel

Click **Create**, then **Compose**.

### Name the stack

Type a **Name**: 2 to 63 lower-case letters, digits, underscores, or hyphens. The line below it shows the folder CtrlOps makes on the server.

### Add the compose file

Pick how you want to add it:

- **Write Manually:** type or paste the YAML.
- **Upload From Local:** send a `docker-compose.yml` and a `.env` from your computer.
- **Generate With Form:** fill in a card for each service, click **Generate compose file**, then **Use this file**.

The status at the top of the editor checks your file as you go, for example *YAML is correct · 2 services*.

![The Docker Compose panel with the Name, Tags, and Description fields, the Stack folder: /srv/test line under the name, the Write Manually, Upload From Local, and Generate With Form tiles, and the compose file editor with the green status YAML is correct · 2 services](https://cdn.ctrlops.io/docs/docker-compose-panel.webp)

The green status next to Copy means the file is ready to deploy.

### Add variables and options

Add **Environment variables** as **Rows** or with **Paste**. **Up options** has **Run detached**, **Build images before start**, and **Force recreate containers**. Most stacks can leave these as they are.

### Deploy

Click **Deploy**. CtrlOps shows each phase: check the file, pull the images, create the network and volumes, and start the services. Not ready yet? **Save as draft** keeps your work on this device.

![The Docker Compose panel after a deploy of demo-stack, with the docker compose up command at the top, the progress marked completed, the last phase Starting 2 services done, the message Stack is up with 2 services running, the Show log button, and the line Stack demo-stack is up with the View containers button](https://cdn.ctrlops.io/docs/docker-compose-deploy-progress.webp)

You can close the panel. The deploy keeps running on the server.

The deploy runs on the server, so it keeps going if you close the panel or lose the connection. A chip in the toolbar, such as *Deploy 3/5 · shop*, opens it again.

## Manage a Compose stack

Click the project name on a stack row to open its details. Stacks you made outside CtrlOps show here too.

| Button | What happens | Command |
| --- | --- | --- |
| **Compose Up** | Starts the stack and makes what is missing. It shows only when the stack is not fully running | `docker compose up -d` |
| **Restart** | Restarts the services | `docker compose restart` |
| **Compose Down**, or **Down** on the row | Stops the containers. The stack stays in the list | `docker compose stop` |
| **Delete Stack** | Removes the containers and the networks | `docker compose down` |

> **Compose Down** in CtrlOps only stops the stack and removes nothing. It is not the same as typing `docker compose down`, which is what **Delete Stack** does. To delete a stack, you type its name. Volumes go only if you tick **Also remove volumes**, and the files in the stack folder stay.

![The details of the running demo-stack, with the Open terminal here, Restart, Compose Down, and Delete Stack buttons in the header, the Overview, Compose File, Deployment, and Logs tabs, the Information card with its config file, env file, services, network, and last deploy, and the Duplication / Migration card with Rename and Duplicate](https://cdn.ctrlops.io/docs/docker-stack-details.webp)

The header buttons act on the whole stack. Rest on a button to see its command.

The stack has four tabs:

- **Overview:** its project, files, services, network, and volumes, plus a table of its containers.
- **Compose File:** click **Edit**, change the file, and click **Save & redeploy**. If the redeploy fails, CtrlOps puts back the old file.
- **Deployment:** the deploys CtrlOps ran from this login. **Redeploy** goes back to an earlier version.
- **Logs:** the logs of all services together.

### Rename or duplicate a stack

Both are under **Duplication / migration** in **Overview**, and both warn you first.

- **Rename** stops the stack for a short time. Named volumes keep the old name, so the data does not move unless the volume has a fixed name.
- **Duplicate** copies the compose file and the `.env` file, and the copy does not start. It uses the same host ports, so change them before you start it. Its named volumes start empty.

## Tips

- **Set a restart policy on anything that must stay up.** A running container with no restart policy stays stopped after Docker or the server restarts.
- **Keep data in a volume.** Anything else inside a container is lost when you delete it.
- **Compare two containers with Split logs,** in the strip at the top of an open container.

## Troubleshooting

Most failures show **Show details** with the **Likely cause**, **Retry** where it helps, and **Copy report**. Send that report with any support question.

### A button is off on a container

Rest on the button to see why. A Swarm service manages the container, Docker is removing it, or another action is running on it. A dead container can only be deleted.

### The server did not answer in time.

The list keeps showing the last data it read and tells you how old it is. CtrlOps tries again by itself. **Delete** stays off until it can read the server again. The message *Connection lost.* means the same, for a dropped SSH connection.

### A port that the container needs is in use on the server.

Another program holds that port. Stop that program, or change the port of the container. The create form names what holds the port, and the check after you click **Create Container** can offer a free one.

### The container stopped immediately. Its main process ended with exit code 0.

Some images, such as `python` or `bash`, stop when no terminal is open. In **Advanced options**, set **Console** to **Interactive & TTY (-i -t)**, or type a command. Then create the container again.

### Could not start the container. CtrlOps removed it.

The container failed when it started, so CtrlOps cleaned it up. Open **Show details** to read why, fix the setting, and try again.

### This image has no shell. CtrlOps cannot open a terminal in it.

Some small images have no shell inside. Use the **Logs** tab to see what the container does. The **Files** tab has the same limit when an image has no `ls` program.

### 6 live connections are open. Close one to open another.

Each terminal and each followed log uses its own SSH connection, and a server tab allows 6. Close a terminal session or stop following a log.

### The Compose plugin is not installed.

Stacks need Docker Compose v2. Go to the [Dashboard](https://ctrlops.io/docs/modules/docker/dashboard#fix-what-needs-attention) tab and click **Install Compose plugin** in the box below the cards.

### Another action runs on this container or stack.

CtrlOps runs one action at a time on each container or stack. Wait until it ends, then try again.

### The old password does not work on my database

*This volume has data. The old password stays.* means the database kept the password from its first start. Log in with the old password, or use a new volume.

## Frequently Asked Questions

### Does deleting a container delete its data?

You lose the data stored inside the container. Named volumes stay on the server. Anonymous volumes are removed only if you tick **Also remove anonymous volumes**.

### Which restart policy should I use?

Use `unless-stopped` for most apps. The container comes back after a crash or a server restart, and it stays stopped if you stopped it yourself. A new container starts on `no`, which means it does not come back on its own.

### How do I change an environment variable on a container?

The **Env** tab is read-only, because Docker cannot change the variables of an existing container. For a Compose container, change the compose file and deploy again. For any other container, open **More actions**, click **Recreate**, and use **Edit first**.

### Why does a container open on the Terminal tab?

A running container opens on **Terminal**, and a container that is not running opens on **Logs**, because it has no shell to open. All the other tabs are one click away.

### What is the difference between Compose Down and Delete Stack?

**Compose Down**, or **Down** on the list row, runs `docker compose stop`. The containers stop and the stack stays in the list. **Delete Stack** runs `docker compose down`, which removes the containers and the networks of the stack. Volumes are removed only if you tick **Also remove volumes**, and the files in the stack folder are kept.

### Can the AI run commands inside a container?

Yes. Click **Ask AI** on the **Terminal** tab. It uses the same AI you set up for the [AI Terminal](https://ctrlops.io/docs/modules/ai-terminal), and its commands run in that terminal session, inside the container. It asks before it runs a command. With **Auto-Run** on, only read-only commands skip that step.

### Why did my change disappear after a Compose deploy?

Each Compose deploy sets the container from the compose file again. To keep a change on a Compose container, make it in the compose file.
