PHPackages                             craftcms/cloud - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. craftcms/cloud

ActiveYii2-extension

craftcms/cloud
==============

3.0.3(1mo ago)536.4k—8.4%8PHPCI passing

Since Aug 21Pushed 1mo ago7 watchersCompare

[ Source](https://github.com/craftcms/cloud)[ Packagist](https://packagist.org/packages/craftcms/cloud)[ RSS](/packages/craftcms-cloud/feed)WikiDiscussions 3.x Synced 1mo ago

READMEChangelog (10)Dependencies (39)Versions (274)Used By (8)

[![Craft Cloud icon](https://raw.githubusercontent.com/craftcms/.github/v3/profile/product-icons/craft-cloud.svg)](https://craftcms.com/cloud "Craft Cloud")

Craft Cloud Extension
=====================

[](#craft-cloud-extension)

Welcome to [**Craft Cloud**](https://craftcms.com/cloud)!

This repository contains source code for the `craftcms/cloud` Composer package, which is required to run a Craft project on our first-party hosting platform, Craft Cloud.

When installed, the extension automatically [bootstraps](https://www.yiiframework.com/doc/guide/2.0/en/runtime-bootstrapping) itself and makes necessary [application configuration](https://craftcms.com/docs/5.x/reference/config/app.html) changes for the detected environment:

- 🌩️ **Cloud:** There’s no infrastructure settings to worry about—database, queue, cache, and session configuration is handled for you.
- 💻 **Local development:** Craft runs normally, in your favorite [development environment](https://craftcms.com/docs/5.x/install.html).

✨ To learn more about Cloud, check out [our website](https://craftcms.com/cloud)—or dive right in with [Craft Console](https://console.craftcms.com/cloud). Interested in everything the extension does to get your app ready for Cloud? Read our [Cloud extension deep-dive](https://craftcms.com/knowledge-base/cloud-extension), in the knowledge base.

Installation
------------

[](#installation)

The Cloud extension can be installed in any existing Craft 4.6+ project by running `php craft setup/cloud`. Craft will add the `craftcms/cloud` package and run the extension’s own setup wizard.

Tip

This process includes the creation of a [`craft-cloud.yaml` configuration file](https://craftcms.com/knowledge-base/cloud-config) which helps Cloud understand your project’s structure and determines which versions of PHP and Node your project will use during builds and at runtime.

When you [deploy](https://craftcms.com/knowledge-base/cloud-deployment) a project to Cloud, the `cloud/up` command will run, wrapping Craft’s built-in [`up` command](https://craftcms.com/docs/5.x/reference/cli.html#up) and adding the cache and session tables (if they’re not already present).

Filesystem
----------

[](#filesystem)

When setting up your project’s assets, use the provided **Craft Cloud** filesystem type. Read more about [managing assets in Cloud projects](https://craftcms.com/knowledge-base/cloud-assets).

Testing
-------

[](#testing)

The Codeception `unit` suite on `3.x` boots Craft and expects a local test database.

```
composer test:init
composer test:up
composer test
composer test:down
```

`composer test:init` will create `tests/.env` from `tests/.env.example` if it does not already exist. `composer test:up` uses that file when starting the MySQL service defined in `tests/docker-compose.yaml`.

For local compatibility work on `3.x`, it can be helpful to keep your main checkout on the default/latest Craft 5 dependency set and use a separate Git worktree for Craft 4 so each checkout can keep its own `vendor/`, `composer.lock`, and `tests/.env` state.

```
git worktree add ../cloud-3x-craft4 3.x

# In the Craft 4 worktree:
composer update "craftcms/cms:^4.6" "craftcms/flysystem:^1.0" --with-all-dependencies --no-audit

# In your main checkout:
composer update "craftcms/cms:^5" "craftcms/flysystem:^2.0" --with-all-dependencies
```

Developer Features
------------------

[](#developer-features)

### Template Helpers

[](#template-helpers)

#### `cloud.artifactUrl()`

[](#cloudartifacturl)

Generates a URL to a resource that was uploaded to the CDN during the build and deployment process.

```
{# Output a script tag with a build-specific URL: #}

{# You can also use the extension-provided alias: #}
{% js '@artifactBaseUrl/dist/js/app.js' %}
```

Read more about [how to use artifact URLs](https://craftcms.com/knowledge-base/cloud-builds#artifact-uRLs).

#### `cloud.isCraftCloud`

[](#cloudiscraftcloud)

`true` when the app detects it is running on Cloud infrastructure, `false` otherwise.

```
{% if cloud.isCraftCloud %}
  Welcome to Cloud!
{% endif %}
```

### Aliases

[](#aliases)

The following aliases are available, in addition to [those provided by Craft](https://craftcms.com/docs/5.x/configure.html#aliases).

#### `@web`

[](#web)

On Cloud, the `@web` alias is guaranteed to be the correct environment URL for each HTTP context, whether that be a [preview domain](https://craftcms.com/knowledge-base/cloud-domains#preview-domains) or [custom domain](https://craftcms.com/knowledge-base/cloud-domains#adding-a-domain).

#### `@artifactBaseUrl`

[](#artifactbaseurl)

Equivalent to [`cloud.artifactUrl()`](#artifactUrl), this allows [Project Config](https://craftcms.com/docs/5.x/system/project-config.html) settings to take advantage of dynamic, build-specific CDN URLs.

Configuration
-------------

[](#configuration)

Most configuration (to Craft and the extension itself) is handled directly by Cloud infrastructure, through [environment overrides](https://craftcms.com/docs/5.x/configure.html#environment-overrides). These options are provided strictly for reference, and have limited utility outside the platform.

OptionTypeDescription`artifactBaseUrl``string|null`Directly set a fully-qualified URL to build artifacts.`s3ClientOptions``array`Additional settings to pass to the `Aws\S3\S3Client` instance when accessing storage APIs.`cdnBaseUrl``string`Used when building URLs to [assets](#filesystem) and other build [artifacts](#artifacturl).`sqsUrl``string`Determines how Craft communicates with the underlying queue provider.`projectId``string`UUID of the current project.`environmentId``string`UUID of the current [environment](https://craftcms.com/knowledge-base/cloud-environments).`buildId``string`UUID of the current [build](https://craftcms.com/knowledge-base/cloud-builds).`accessKey``string`AWS access key, used for communicating with storage APIs.`accessSecret``string`AWS access secret, used in conjunction with the `accessKey`.`accessToken``string`AWS access token.`redisUrl``string`Connection string for the environment’s Redis instance.`signingKey``string`A secret value used to protect transform URLs against abuse.`useAssetBundleCdn``boolean`Whether or not to enable the CDN for asset bundles.`previewDomain``string|null`Set when accessing an environment from its [preview domain](https://craftcms.com/knowledge-base/cloud-domains#preview-domains).`useQueue``boolean`Whether or not to use Cloud’s SQS-backed queue driver.`region``string`The app region, chosen when creating the project.`useAssetCdn``boolean`Whether or not to enable the CDN for uploaded assets.`useArtifactCdn``boolean`Whether or not to enable the CDN for build artifacts and asset bundles.`staticCacheDuration``int`The default duration, in seconds, to statically cache requests.Tip

These options can also be set via environment overrides beginning with `CRAFT_CLOUD_`.

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance89

Actively maintained with recent releases

Popularity34

Limited adoption so far

Community26

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 93.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

238

Last Release

53d ago

Major Versions

1.78.1 → 2.22.12026-01-09

1.79.0 → 2.23.02026-03-20

2.23.0 → 3.0.02026-03-23

1.x-dev → 2.x-dev2026-03-26

2.23.1 → 3.0.32026-03-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ccdf8b493035de2343c55bd889513e3af5c04d5823482a2b186ad16adb1c3e3?d=identicon)[brandonkelly](/maintainers/brandonkelly)

---

Top Contributors

[![timkelty](https://avatars.githubusercontent.com/u/18329?v=4)](https://github.com/timkelty "timkelty (909 commits)")[![deleugpn](https://avatars.githubusercontent.com/u/9533181?v=4)](https://github.com/deleugpn "deleugpn (21 commits)")[![AugustMiller](https://avatars.githubusercontent.com/u/1895522?v=4)](https://github.com/AugustMiller "AugustMiller (15 commits)")[![angrybrad](https://avatars.githubusercontent.com/u/61869?v=4)](https://github.com/angrybrad "angrybrad (10 commits)")[![jasonmccallister](https://avatars.githubusercontent.com/u/5354908?v=4)](https://github.com/jasonmccallister "jasonmccallister (10 commits)")[![bencroker](https://avatars.githubusercontent.com/u/57572400?v=4)](https://github.com/bencroker "bencroker (3 commits)")[![brianjhanson](https://avatars.githubusercontent.com/u/1843073?v=4)](https://github.com/brianjhanson "brianjhanson (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![jamesmacwhite](https://avatars.githubusercontent.com/u/8067792?v=4)](https://github.com/jamesmacwhite "jamesmacwhite (1 commits)")[![brandonkelly](https://avatars.githubusercontent.com/u/47792?v=4)](https://github.com/brandonkelly "brandonkelly (1 commits)")

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/craftcms-cloud/health.svg)

```
[![Health](https://phpackages.com/badges/craftcms-cloud/health.svg)](https://phpackages.com/packages/craftcms-cloud)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.7k509.9M17.0k](/packages/laravel-framework)[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[magento/community-edition

Magento 2 (Open Source)

12.1k52.1k10](/packages/magento-community-edition)[bref/laravel-bridge

An advanced Laravel integration for Bref, including Octane support.

3384.1M11](/packages/bref-laravel-bridge)[magento/magento2-functional-testing-framework

Magento2 Functional Testing Framework

15511.5M30](/packages/magento-magento2-functional-testing-framework)[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
