Skip to content

Spaces ​

A Space gives your applications a bucket for files, such as uploads and images, behind the S3 API. Create one under Spaces → Create Space. Orbit runs Garage 2.4 for it, as a single node with its data on the server's disk under /var/lib/rancher/k3s/storage. Choose Independent to create it directly in the current workspace without a project, or In a project to select a project and environment. Applications reference it, and it supports backups, restore tests and restores.

A Space opens in Files. S3 access contains credentials and application connections, Protection contains the backup policy and copies, and Settings contains service infrastructure and deletion. Independent Spaces can connect to applications in different projects within their workspace; project Spaces keep their environment boundary.

The files live on a server's disk

If that server is lost, so are the files, unless backups go to external storage. The planned size is requested, not enforced.

  • The bucket has the service's name, so the name follows S3's rules: at least 3 characters, ending with a letter or digit. It needs at least 256 MB.

  • Connect adds four references to the application, under the prefix you choose (S3 by default):

    VariableValue
    S3_ENDPOINThttp://<name>.orbit-<project>-<environment>.svc.cluster.local:3900
    S3_BUCKETthe bucket
    S3_ACCESS_KEY_IDthe access key, which reaches only this bucket
    S3_SECRET_ACCESS_KEYthe secret key
  • In the S3 client, set the endpoint, the region us-east-1 and path-style requests: forcePathStyle: true in the AWS SDK for JavaScript, addressing_style path in boto3. With the AWS SDK for JavaScript v3:

    js
    import { PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
    
    const s3 = new S3Client({
      endpoint: process.env.S3_ENDPOINT,
      region: "us-east-1",
      forcePathStyle: true,
      credentials: {
        accessKeyId: process.env.S3_ACCESS_KEY_ID,
        secretAccessKey: process.env.S3_SECRET_ACCESS_KEY,
      },
    });
    await s3.send(
      new PutObjectCommand({
        Bucket: process.env.S3_BUCKET,
        Key: "hello.txt",
        Body: "hello",
      }),
    );
  • The keys stay for the life of the Space. Garage cannot give a key a new secret, so a Space has no Rotate credentials. To replace the keys, create another Space and copy the files.

  • Backups are a tar of the bucket's objects with their keys, contents and modification times. Other metadata, such as a custom Content-Type, is set again from the file's extension when it is restored. A backup and a restore copy the files to the server's disk first, so they need free space about the size of the bucket.

  • The restore test loads the tar into an isolated Garage and counts the objects. A restore makes the bucket match the backup: objects written after it are removed, and a broken tar leaves the bucket as it was.

  • Imports take a tar of the files, made inside their folder, such as aws s3 sync s3://bucket ./bucket && tar -cf bucket.tar -C ./bucket . (on macOS, start the tar with COPYFILE_DISABLE=1 so it adds no metadata files). There is no import from a URL.

  • Browse files in the Files tab. To upload or change an object, use an S3 client from your computer; the tunnel answers on 127.0.0.1:13900.

  • Public access publishes the endpoint on port 3900 over plain HTTP, so prefer the tunnel.

  • The pod has a second container, client, where rclone runs backups, restores and counts with its own memory limit.

In the API a Space is still a database service with the s3 engine, so scripts and API tokens that created S3 storage before keep working.

Browse files ​

Open Spaces → your Space → Files to navigate folders, inspect object sizes and modification dates, and copy a full object key. The view is read-only and requires the developer, admin or owner workspace role. Storage credentials never reach the browser.

Select an object name to view JSON, text or an image. Other formats download. The download arrow saves the original bytes. Supported raster images up to 2 MiB show a thumbnail. Select an image to zoom in or browse the images in the current results. Press Escape to return to the file list. The console reads through your signed-in session. A network-public S3 endpoint still requires bucket credentials.

To share URLs through an existing CDN, open Access → CDN address and save its HTTPS base URL, including any path prefix. Open on CDN then links each object to that address. Set up the origin, caching and access policy with your provider. For Orbit-managed image resizing and signed image URLs, open Images.

Listings load 100 entries at a time. Load more fetches the next page; the name filter applies only to entries already loaded in the current folder. Folder sizes are not calculated for bucket listings.

For static sites, Recent site publications offers shortcuts to up to 20 retained successful deployments. See files opens the contents of a registered release package, after verifying its SHA-256, file count and size. You can navigate its internal folders without downloading the package again while this tab remains open. The files stay inside the original archive in the Space; nothing is extracted or changed. Archive entries have no individual modification dates.

Opening a publication streams the complete compressed package through the controller once. Large packages can take longer; reads have a 60-second timeout and at most two run concurrently per controller. The existing 1 GiB and 50,000-file release limits apply. Expired, missing or invalid archives return an error. Arbitrary uploaded archives cannot be opened here. Archive entries list the names and sizes inside that package.

Deliver images ​

Open Spaces → your Space → Images and choose Turn on image delivery. The Space then answers on an HTTPS address of its own, such as https://photos-images-site.203-0-113-10.sslip.io, and every image in it can be asked for in the size and format a page needs:

html
<img src="https://photos-images-site.203-0-113-10.sslip.io/uploads/cat.jpg?w=800" alt="">

Originals stay exactly as they were uploaded. For each request, Orbit answers with the smallest file, among the formats the browser takes, that still looks like the original:

  • Formats. AVIF, then WebP, then JPEG (PNG for images with transparency), whichever is smallest at the quality you set. A browser that sends image/avif in its Accept header gets AVIF when AVIF is smaller.
  • Quality measured per image. Orbit measures each version of an image once with SSIMULACRA 2, the perceptual metric of the JPEG XL project, and keeps, per format, the lowest encoder quality that still reaches the score you chose. A photo full of detail gets a higher quality than a flat illustration, and none of them loses detail you can see. Metadata is removed, the photo is turned the way its EXIF says, and colors are converted to sRGB.
  • New images are prepared as they arrive. With Prepare new images as they arrive on, the image pod looks for new objects every two minutes and measures them before anyone asks, so the first visit is as fast as the next.
  • Sizes are kept. Each size is rendered once, kept on the disk of the server that runs the image pod, and answered from there with an ETag. Browsers keep it for the time you choose.
ParameterValuesWhat it does
w, hpixels, up to Largest sideWidth and height. Only one keeps the proportions. Images are never enlarged.
dpr1 to 4Pixel density: w=400&dpr=2 answers 800 pixels for a high density screen.
fitcontain (default), cover, fillKeep the whole image inside the size, fill it and crop the rest, or stretch it.
poscenter (default), smart, top, bottom, left, right, top-left, top-right, bottom-left, bottom-rightWhat cover keeps when it crops. smart keeps the most detailed part.
fmauto (default), avif, webp, jpeg, pngForce a format instead of the smallest the browser takes.
qauto (default), visually-lossless, excellent, high, or 1 to 100A perceptual level for this link, or a fixed encoder quality, which skips the measurement.
blur0 to 50Gaussian blur, for placeholders.
pa preset nameA preset's size. Other parameters refine it, except when only presets are served.

The quality levels follow what the SSIMULACRA 2 authors say a viewer can tell: Visually lossless keeps a score of 90 (no difference even when the two images alternate quickly), Excellent 85, the default (none when switching between them), and High 80 (none side by side). An unknown parameter or a value out of range is refused with 400 and the reason.

Who can ask for sizes ​

  • Anyone, any size up to the limit. Each visitor can prepare at most 120 new sizes a minute; sizes already kept are never limited.

  • Only the presets. The address serves ?p=name and nothing else. Add presets under Settings → Presets, for example a thumb of 200 × 200 with Fill and crop and Most detailed part.

  • Only links signed by your applications. Every link carries a signature, and optionally an expiry. Connect on the Space then adds S3_IMAGES_URL and S3_IMAGES_SIGNING_KEY to the application, which signs each link:

    js
    import { createHmac } from "node:crypto";
    
    export function imageUrl(key, params = {}) {
      const query = new URLSearchParams(params);
      query.sort();
      const text = key + "\n" + [...query].map(([k, v]) => k + "=" + v).join("&");
      const sig = createHmac("sha256", process.env.S3_IMAGES_SIGNING_KEY)
        .update(text)
        .digest("base64url");
      query.set("sig", sig);
      const path = key.split("/").map(encodeURIComponent).join("/");
      return process.env.S3_IMAGES_URL + "/" + path + "?" + query;
    }

    The signature is HMAC-SHA256 over the object key, a line break, and every other parameter as name=value in name order joined by &, none of them escaped, in unpadded base64url. Add exp, a time in seconds since 1970, to make a link stop working after it. In the console, Try a size signs links for you, and the API does too: POST /services/{serviceId}/images/link.

The images in the folder become public

Every image under the chosen Folder answers anyone who has its address, unless the Space only serves signed links. Leave the folder empty to serve the whole Space; Orbit's own _orbit/ folder is never served, and objects that are not images answer 415.

Try a size ​

Try a size picks an image from the folder, asks for the link with the size, crop, format and quality you choose, and shows what a visitor gets: the format, the size in pixels and bytes, how much smaller it is than the original, the encoder quality and the score it kept. It also writes an <img> with a srcset of four widths, for the browser to choose per screen.

How it runs ​

The image pod runs next to the Space, on any server of the cluster: Orbit's image worker in front, and imgproxy 4 behind it, reachable only inside the pod. It reads the Space with a Garage key of its own that can read and nothing else. The pod asks for at most 640 MiB for the worker and 1 GiB for imgproxy, plus the disk for kept sizes (Disk for kept sizes, 2 GB by default; the least recently used go first when it fills). Turning it off removes the pod and the kept sizes; the settings stay for when you turn it on again, and the originals are never touched.

  • The first request for a new image measures it, which takes one to three seconds for a large photo; later sizes of the same image are one rendering each, and kept sizes answer in milliseconds.
  • An object larger than 100 MiB or 60 megapixels is refused.
  • Replacing an object under the same key changes its version: Orbit measures the new one and stops answering the old sizes. Browsers may show the old image until Browsers keep each size for passes.
  • Animated GIFs are converted to WebP for browsers that take it, without the measurement. SVGs are served as they are, cleaned of scripts.
  • When a server's public address changes, the image address follows it.

Publish a static site ​

For a Git application using the Static build strategy, open Project → Settings → Static publishing, select a Space and choose Save and deploy. The same choice is available in a new project's advanced settings. One Space can hold releases for several sites in the same workspace. Leaving Application container selected preserves the existing deployment flow.

The build still runs through BuildKit, using the detected output directory (dist, or the framework's detected directory). Orbit exports the output as files instead of building a runtime image. An index.html is required. The shared static servers deliver those files behind the existing domains and HTTPS. Static output can be served on ARM64 and x86_64 nodes; no application image or pod is created for each site or preview.

Files and versions stay separate ​

Orbit stores one compressed archive per deployment, under this reserved prefix:

text
_orbit/sites/v1/<installation>/<workspace>/<project>/<environment>/<service>/<deployment>/<sha256>.tar.gz

Uploads and other objects already in the bucket are left in place. Publishing and cleanup use exact keys recorded in deployment history; they never synchronize, empty, or recursively delete the bucket. Do not upload your own files under _orbit/sites/.

Each server downloads into a temporary directory, checks the archive's checksum, file count and size, and atomically installs the release. Traffic switches only after the ready shared servers have complete copies. A failed publication restores the previous route. When moving from container hosting, the old workload is scaled to zero after success; its templates stay available for rollback to an older container release. Afterwards Orbit checks the shared servers every 15 seconds and copies the release to a new or replaced server right away. It reapplies the site's route and access in full when the site, its domains or its servers change, and every 5 minutes otherwise, which also puts back an object removed by hand.

The latest 10 distinct successful file releases, the active release, pending releases and up to three failed artifacts are retained. Rollback reuses a retained archive without rebuilding. Expired releases stay in deployment history but cannot be selected for rollback. Hashed assets from retained published versions remain available for visitors who still have an older page open. Cleanup failures leave files for a subsequent cleanup attempt. Deleting a site removes only its registered archives and cache. A Space, its environment or its project cannot be deleted while another retained site depends on it.

Routing and limits ​

  • Choose SPA to return index.html for missing page routes, or 404 for ordinary static sites. Missing JavaScript, CSS and images return 404 in both modes.
  • HTML and files without a filename hash require revalidation. Assets whose names contain a hash receive a one-year immutable cache policy. HEAD, conditional requests and byte ranges are supported.
  • Hidden paths (except .well-known), node_modules, Dockerfile and orbit.json are not published. Symlinks and special files are rejected. .dockerignore and .orbitignore apply to the build context.
  • Each release is limited to 1 GiB compressed and unpacked, and 50,000 files. Account for retained versions on both the Space and each serving server.
  • Access logs belong to the site and deployment. Per-application terminal, autoscaling and CPU/memory charts do not apply to the shared runtime.
  • This flow serves public static files. It does not execute SSR or server functions, or provide an external CDN. Use container hosting when a server process is required.

Headers and redirects ​

Place an orbit.json in the application's source directory (the configured build root), or generate it in the publish directory. The source file takes precedence. For example:

json
{
  "headers": [
    { "path": "/*", "values": { "Content-Security-Policy": "default-src 'self'" } },
    { "path": "/assets/*", "values": { "Cache-Control": "public, max-age=86400" } }
  ],
  "redirects": [
    { "from": "/old/*", "to": "/guide/:splat", "status": 308 },
    { "from": "/community", "to": "https://example.com/community", "status": 302 }
  ]
}

Paths match exactly or with a final /*; they refer to the site's public URL. Header rules accumulate in order, with the last value winning. The first matching redirect runs before file lookup, including for HEAD requests. Redirects accept 301, 302, 303, 307 and 308. :splat inserts the escaped wildcard capture. Query strings are preserved unless the destination supplies its own query (a final ? discards it).

The file is private, included in the release checksum and restored with rollback. Neither orbit.json nor its contents are served as an asset. Invalid rules fail publication with a line-number diagnostic and leave the current release active. The limit is 64 KiB, 100 rules and 20 header values per rule. Unsafe URL schemes, protocol-relative destinations, control characters, direct redirect loops and transport headers such as Content-Length are rejected. Normal caching and security defaults remain unless a rule overrides them.

Availability and updates ​

Update Orbit and its agents together before using this feature: the shared DaemonSet starts the native orbit-agent binary installed on each Linux node. Orbit verifies its version before publishing to it. Cache files live under /var/lib/orbit/static-sites, outside user buckets and build directories.

Already prepared servers continue serving if the Space becomes unavailable. A new server without a cached release needs the Space to download it. This cache does not replicate Garage or turn a single-node Space into durable distributed storage. Keep external backups; restoring an older Space backup can remove newer release archives. Local cached copies are not a replacement for that backup.

Orbit by Cortex Labs