---
title: Adding a new project
slug: hosty/adding-a-new-project
createdAt: 2026-11-08T11:27:49.007Z
---

This page shows how to move a project to Hosty, once the admins have [created it](https://wiki.systemseed.com/hosty/7xVm-adding-a-new-project). A new project starts from backups: you upload its database and files, and the first deployment of production imports them.

:::hint{type="info"}
Some steps need the lead developer role: uploading backups and backing up production. The deployments are done by CI, with the release manager user of the project. See [Roles & Permissions](https://wiki.systemseed.com/hosty/roles-and-permissions).
:::

## What you need

From the admins:

- the name of the project, the name of the cluster and its AWS region;
- your user with the lead developer role (see [Setting up a new user](https://wiki.systemseed.com/hosty/setting-up-a-new-user));
- a release manager user for CI, with its access keys and VPN profile.

## 1. Prepare the code

1. Add the Hosty configuration of the project in `.hosty/hosty.yaml`, with the project, the cluster and the region from the admins. See [Project configuration](https://wiki.systemseed.com/hosty/project-configuration) and the examples there.
2. Install the dependencies of the applications, i.e. `composer install` or `npm ci`, either in CI before the build or in the build hook of the application (`hooks.build` in `hosty.yaml`).
3. Keep files that the site doesn't need to run out of the images: user content, caches, `node_modules` of a PHP site and so on. They make the images bigger and every deployment slower. Hosty builds the images from the folder of each application.
4. [Set up Hosty CLI](https://wiki.systemseed.com/hosty/setting-up-hosty-cli) and commit everything.

## 2. Upload the backups

The first deployment of production imports the latest full backup of the database and the backups of the files. Upload them with your lead developer user.

Upload the database dump. Supported formats are `.sql`, `.sql.gz` and `.sql.zst`:

```bash
hosty backup:database:upload --full ./backup.sql.gz -v
```

Upload the files of each persistent storage from `hosty.yaml`. The path is relative to the root of the project:

```bash
hosty backup:files:upload public drupal/web/sites/default/files/ -v
```

Hosty CLI asks for a code from your authenticator app if you don't have a session of `hosty auth`. If the project has several applications, add `--application` to each command.

## 3. Deploy production from CI

Set up CI with the release manager user, as described in [CI/CD configuration](https://wiki.systemseed.com/hosty/cicd-configuration). For production, CI runs:

```bash
hosty build --push production -v
hosty deploy production -v
```

Commit all changes before the build: Hosty CLI tells whether an image has to be built again by the last commit of the code, so it doesn't see changes that aren't committed.

The first deployment takes longer, as it imports the backups. Hosty CLI waits for the import up to 30 minutes by default. For a large database, set a longer time in `hosty.yaml`:

```yaml
import:
  # Minutes, from 30 to 1440.
  timeout: 300
```

## 4. Check production

Connect to the VPN and list the domains of production:

```bash
hosty domains production -v
```

Open the site and check that it works. If it doesn't, look at the logs with `hosty logs production`. To serve the site on its own domain, see [Adding a custom domain](https://wiki.systemseed.com/hosty/adding-a-custom-domain).

## 5. Make the first backup

Development environments are created from the partial backup of the database, which is the database without the data of the tables listed in `excludeTablesFromImportOnDevEnvs`. The backup you uploaded is a full one, so make a backup of production before you create development environments:

```bash
hosty backup:create -v
```

You can also upload a partial dump you made yourself, with `hosty backup:database:upload --partial`. Otherwise the first scheduled backup makes it: by default, production is backed up at 0:00, 8:00 and 16:00 UTC. A development environment created before there is any partial backup starts with an empty database.

Before you make the backup, check the list of tables in `excludeTablesFromImportOnDevEnvs`. The partial backup must not have personal data, as developers can download it.

## Next steps

- [Working with environments](https://wiki.systemseed.com/hosty/working-with-environments)
- [Adding a custom domain](https://wiki.systemseed.com/hosty/adding-a-custom-domain)
- [Disaster recovery](https://wiki.systemseed.com/hosty/disaster-recovery)
