Containers are in beta. Contact support to enable them for your server.
A container site runs a Docker image behind your domain. Cito pulls the image, runs it and serves it on your domain over SSL. You create one from the Create Site wizard using the Docker Container profile, and manage it afterwards from the site’s Containers tab. Use a container site when your application ships as an image, or needs software the server does not provide, such as Postgres, Redis or a background worker. For PHP, WordPress and NodeJS applications, the native site types are usually simpler and faster.

How it works

Each site’s containers run under that site’s own user with rootless Podman. A process running as root inside the container runs as your site user on the server. Sites cannot see each other’s containers, images or networks. Nginx serves your domain, terminates SSL and proxies requests to your container on a loopback port that Cito allocates. The container itself is never exposed to the internet. Every site has a primary service called web, which receives the web traffic. You can add up to nine more services, such as a database or a cache, which run alongside it on a private network. To keep data when a container is replaced, store it in a volume. A volume is a folder in your site’s home directory that is mounted into the container. Volumes are included in your backups and visible in the file manager. Containers restart automatically if they exit, and start again after a server reboot. A service you have stopped stays stopped.
If the Docker Container card is greyed out in the Create Site wizard, your server isn’t set up to run container sites yet. The reason is shown on the card. Contact support to have your server set up.

Creating a container site

Click ‘Create Site’ in the top right corner of the dashboard and select the Docker Container profile. Enter your domain name (without www) and an SSH username, then fill in the container details: You can also set environment variables, volumes and additional services at this stage. All of them can be changed after the site is created.
Importing a Compose fileIf you already have a docker-compose.yml, expand Import from docker-compose and paste your file, or choose it from your computer. Cito fills in the form for you to review. See Importing from Docker Compose.
Click Create Site. Before anything is created, Cito checks that every image exists, can be pulled with the credentials you supplied, has a linux/amd64 build and fits in the server’s free disk space. If a check fails, you’ll see the error on the form and nothing is created. Once the checks pass, Cito creates the site, issues an SSL certificate, pulls the images and starts the containers. An SSL certificate is only issued if your domain already resolves to your server’s IP address. If the image pulls but the container fails to start, the site is still created, and the success page says “The site was created, but its container is not running yet”. Open the Containers tab, check the logs, fix the configuration and save it again.

Private images

To pull an image from a private registry, enter a Registry Username and a Registry Password / Token for the registry the image is hosted on. For most registries, such as GitHub Container Registry or Docker Hub, you should use an access token with read-only access rather than your account password.
  • Credentials are stored for future redeploys and are never shown again.
  • The password is only ever sent to the registry it was entered for. If you change the image to one hosted on a different registry, you’ll be asked to enter the password again.
  • To remove stored credentials, clear the username in the site’s Configuration card and save.
Registry credentials can only be set for the primary web service. Additional services must use public images.

Connecting to MySQL

Container sites can use the server’s MySQL just like any other site. Create a database from the site’s Databases tab as usual, then point your application at:
This hostname resolves to the server from inside every container on the site. The host is also shown on the Databases tab with a copy button. See MySQL for more. You don’t need to run your own MySQL container. If your application needs a different database, such as Postgres, add it as a service.

What’s different about container sites

Container sites don’t use PHP-FPM or a document root, so some site features don’t apply:
  • There is no PHP version, public_html directory or Git repository setting.
  • Caching (Cito Boost) isn’t available.
  • Container sites cannot be cloned yet.
For the full list of limits, see Container limits.

Running containers manually

If you need full control over a container, for example to use a feature container sites don’t support, you can still run containers yourself over SSH and serve them through a Proxy Pass site. Cito doesn’t manage containers you run this way. They don’t appear in the dashboard, and you are responsible for keeping them running. If you later want the dashboard tooling for a site like this, you can convert it to a container site. Cito recreates the containers under the site’s user, copies the data and switches the domain over, with a revert button if you change your mind.