Containers are in beta. Contact support to enable them for your server.
The Containers tab lets you see the status of a container site, change its configuration, read its logs and open a shell inside it. This can be found under Site settings by clicking the ‘Containers’ menu option. To see every container on your server in one place, use the Containers page.

Status

The Container card shows the primary web service’s image, port, uptime, CPU and memory usage, and its current status: Internal port shows the loopback address Nginx proxies your domain to, e.g. 127.0.0.1:21004. It’s allocated by Cito and cannot be changed. Images shows how much disk space the site’s images use, shared by all of its services. Old images are removed automatically after each update. The status refreshes every 15 seconds, or every 2 seconds while something is provisioning.

Starting, stopping and restarting

Use the Start, Stop and Restart buttons on the Container card. These act on every service on the site:
  • Start and restart bring up services in dependency order, with web last.
  • Stop runs in reverse, with web first.
To act on a single service, use the buttons on its row in the Services card. Restarting a container does not pull a new image or apply configuration changes. To do that, save the configuration.

Changing the configuration

The Configuration card holds the primary web service’s settings: image, container port, command override, registry credentials, environment variables and volumes. Settings for other services are edited from the Services card. Change what you need and click Save & Recreate. Before saving, Cito checks that the image can be pulled with your credentials and that there’s enough disk space for it. If a check fails, the error is shown and nothing is saved. Once saved, Cito works in the background:
  1. Pulls the image. The old container keeps serving traffic while this happens.
  2. Stops the old container and starts a new one with the new configuration.
  3. Removes the old container and any images that are no longer used.
Your site is unavailable between the old container stopping and the new one starting, usually a few seconds. If the new container fails to start, the old one is started again and the error is shown on the tab.
Recreating replaces the containerAnything the container wrote outside a volume is lost when it’s recreated. Logs from the previous container are also no longer available.
A recreate always leaves the service running, even if you had stopped it. If the registry can’t be reached during a recreate, Cito starts the copy of the image it already has and shows a Provisioning note. Save again later to pull the latest version.

Deploying a new version

Push your new image to its registry under a new tag, e.g. ghcr.io/org/app:1.5, then update Docker Image to the new tag and click Save & Recreate.
We recommend versioned tags rather than latest. They make it clear what’s deployed, and you can roll back by changing the tag back.

Environment variables

Environment variables are passed to the container when it starts. Values are masked in the dashboard. Click the eye icon to reveal one. Use the Form view to edit variables one at a time, or switch to Advanced to edit them all as a .env file:
  • Everything after the first = is the value.
  • Quote a value to keep leading or trailing spaces or a #. Double quotes support \n, \" and \\; single quotes are literal.
  • An export prefix is ignored.
  • If a name is repeated, the last value wins.
Lines that can’t be read are listed with their line number and must be fixed before you can save.
Environment variables are visible to anyone with access to the site in the dashboard. Treat them as you would a .env file on the server.

Volumes

A volume mounts a folder from your site’s home directory into the container, so its data survives the container being recreated. Volumes are included in your site’s backups and appear in the file manager with a volume badge showing the service and path they’re mounted at.
Databases in volumesBackups copy volume folders as files. A database’s files copied while it’s running are not guaranteed to be consistent. If you run a database in a container, schedule a dump to a file in a volume, e.g. with a cron job, and restore from that.

File ownership

Processes that run as root inside the container write files owned by your site user, so you can manage them over SSH or in the file manager as normal. Many images, including Postgres, MySQL and Redis, switch to their own user inside the container. Files they write are owned by a container user rather than your site user. The file manager shows these with a container data badge and won’t let you modify them. Use the service’s shell to manage them instead.

Logs

The Logs card shows the primary service’s output (stdout and stderr) with timestamps. Choose how many lines to show, from 100 to 5,000, and use the download button to save them to a file. To see another service’s logs, click the logs button on its row in the Services card. Your application should write its logs to stdout and stderr. Logs written to files inside the container are lost when it’s recreated, unless they’re in a volume.

Shell

Click the shell button on a service’s row in the Services card to open an interactive terminal inside it. The service must be running. The shell runs /bin/sh as the container’s default user. Closing the dialog ends the session. Changes you make in the shell are lost when the container is recreated, unless they’re in a volume. Minimal images, such as scratch and distroless images, don’t include a shell, so a terminal can’t be opened. Use the logs instead.

Crash loops

If a container keeps exiting shortly after it starts, its status shows Crash looping with the exit code and how many times it’s been restarted. Cito keeps restarting it automatically. To fix it:
  1. Check the last lines of the logs for the reason.
  2. Fix the configuration, e.g. a missing environment variable, a wrong command or a missing volume, and click Save & Recreate.
To stop the restarts while you investigate, click Stop. Common exit codes:

Configuration not applied

If a save was stored but the container couldn’t be recreated with it, you’ll see “There was an error recreating the container”. The running container is still using the previous configuration. Check the error shown on the tab, then save again.

The Containers page

The Containers page in the dashboard’s sidebar lists every container site on your server. For each site it shows the image, status, CPU and memory usage and image storage. Sites with several services can be expanded to show each service. Use Manage to open a site’s Containers tab, or the start, stop and restart buttons to act on the whole site.
The Containers page is only visible to account owners and admins. Users with access to individual sites can manage those sites from their Containers tab.