Skip to content

CaraCMS Cloud

Use with AI

This page

Ask ClaudeAsk ChatGPT

All of CaraCMS Docs

Connect once, and it answers your questions from this help.

Connect to ClaudeConnect to ChatGPT

On CaraCMS Cloud, the services behind the editor come from the cloud. The site needs one key in place of a GitHub token, two buckets, an image resizer, a Mux account and an email account.

What the cloud provides

Service

How it works on the cloud

GitHub access

The cloud gives the site’s server a short-lived token for the site’s repo, and only that repo.

Images

Stored in the site’s own folder and served, resized, from img.caracms.cloud.

Video

Clips are uploaded to the cloud’s Mux and play straight from Mux.

Forms

The site’s server checks each submission. The cloud stores it and sends the email.

Sign-in email

Sign-in links are sent by the cloud.

The site still runs its own Node server and Redis on a host you choose: see Where the server runs.

Setting a site up

  1. In app.caracms.com, make the site in your team and link its GitHub repo.

  2. Install the caracms GitHub App on that repo, choosing only that repo. The site’s page says whether it’s installed.

  3. On the same page, set the site’s domains: every address the editor will be opened at. Sign-in links are only sent to those.

  4. Make a key for the place the site runs, and set it there as CARACMS_CLOUD_KEY.

  5. Tell the site it runs on the cloud, if it doesn’t already say so.

Terminal window
npx caracms init --cloud --write

That writes one line in the config, which is the only thing that decides the mode:

caracms.config.ts
export default defineSite({
services: 'cloud',
// …
});

With a key in the environment or in .env, init also checks it: it shows the site and team the key belongs to, the linked repo, and whether the App is installed.

What the server still needs

Variable

What for

CARACMS_CLOUD_KEY

The site’s key.

SITE_URL

The site’s public address. The same value at build and at run time.

REDIS_URL

Drafts and sessions.

CARACMS_SECRET

Signs editors’ sessions. A long random string.

CARACMS_ALLOW

Who may sign in: addresses, or whole domains written as @example.com.

A backup sign-in and Turnstile’s spam check are optional, as on any site. The full list is on Standalone.

One key per place

Make a key for each place the site runs and label it: the host, your laptop, a staging deploy. Revoking one never touches the others. Never commit a key or paste it anywhere.

Working locally

Put a key labelled for your laptop in the site’s .env. The dev server still edits the files on disk and never touches the real repo. The key lets it show, import and upload the site’s real images.

A production build needs the key. Without one it stops and says so. Submissions made on a laptop are kept in a local folder and their emails written to the log, so a test never reaches a client’s inbox.

Limits

Each site has a storage limit, a video limit and a daily limit on form emails. When one is reached the cloud refuses in a plain sentence, shown where you’d look: the build log, /admin, the editor, or beside a submission. The message is kept even when its email isn’t sent. CaraCMS can raise a limit.

Moving a standalone site onto the cloud

Run init with --cloud on a standalone site. It writes the mode and prints the steps of the move in order, each with a check that it worked. Follow that list as printed. In outline:

  1. Make the site, its key and the App’s install in app.caracms.com.

  2. Push the config change. The host’s build fails until the key is set, and the old deployment keeps serving.

  3. Copy the images in with the media push command below.

  4. Set the key on the host, leaving the old variables in place. They’re ignored, and the log names each one.

  5. Upload any video clips again in the editor.

  6. Remove the old variables, then retire what the cloud replaced.

Terminal window
npx caracms media push

It copies the site’s uploads from its own bucket into its cloud folder under the same keys, so the content doesn’t change. It can be stopped and run again, and it never changes the source bucket.

Leaving

Run init with --self-hosted on a cloud site. It writes the mode back and prints the way out: set up your own services, copy the site’s folder from the cloud to a bucket of your own, and set the variables. The keys in the content stay the same.