Sites

Upload and manage static HTML sites through Lifecycle's UI, CLI, or authenticated v2 API.

Sites hosts static HTML files and ZIP archives for reports, prototypes, and documentation previews. A server-side application is not necessary.

⚠️

Sites requires storage, gateway, DNS, TLS, and authentication configuration. If Sites is unavailable, contact your platform operator.

Choose who can access a site

New sites from your user account are private by default. Administrator access does not give ownership rights.

VisibilityWho can view itWho can change it
Private (default)Only the ownerOnly the owner
PublicAnyone with the URL, without signing inOnly the owner

The owner can replace content, rename the site, extend expiration, change visibility, delete the site, or restore a deleted site. Public content can contain copies that remain outside Lifecycle after you make the site private. Sites has no email invitations or viewer or editor roles.

Upload from the UI

  1. Open Sites.
  2. Select Add site.
  3. Select an HTML file or ZIP archive with the required entry file.
  4. Add an optional display name.
  5. Select Private or Public.
  6. Examine the visibility and file.
  7. Select Upload private site or Publish site.
  8. Open the returned URL.
  9. Make sure that the content and assets are correct.

My sites shows sites that you own. Public shows public sites. Search matches the site name or ID. Search and pagination do not expose other users’ private sites.

From an owned site’s actions menu, you can replace content, rename it, change visibility, or delete it. Renaming changes only the display name. The site ID and content URL stay the same. The visibility dialog requires confirmation before publication. When you change visibility, the site ID and content URL stay the same. New requests to a private site require owner access.

Restore a deleted site

When you delete a site, its URL stops working immediately. Lifecycle keeps the site content for the retention period. Your platform operator sets the retention period. The default is 30 days. After the retention period, Lifecycle permanently removes the content. For the retention settings, see Configuration.

Only the owner can see or restore a deleted site.

To restore a site in the UI:

  1. Open Sites.
  2. Select Recently deleted.
  3. Find the site.
  4. Select Restore.

The Removed column shows the time until Lifecycle removes the site.

To restore a site with the CLI, run:

A restored site keeps its site ID, URL, and visibility. If the site expiration passed, Lifecycle sets a new expiration.

Upload a directory with the CLI

The CLI accepts a ZIP, HTML file, or directory:

Omitting --visibility uses the server’s default for your credentials. With user sign-in, that default is private. An explicit public upload requires confirmation or --yes. The CLI uses user sign-in and has no dedicated API-key input.

For a directory, lfc creates a ZIP locally. It excludes .git, node_modules, cache directories, and coverage output. Use .lfcsiteignore for additional exclusion patterns. Before an upload, the CLI checks the deployment’s upload policy and allowed visibility.

Prepare and replace content

  • Build the site locally.
  • When your site generator supports relative asset URLs, use them.
  • Include the entry file that the upload policy requires.
  • Remove credentials, internal data, source maps, and unnecessary output.
  • Before publication, check navigation and assets.

A content replacement or visibility change preserves the current content URL. The API’s openUrl opens the current site through Lifecycle. The contentUrl identifies the current content host. Neither URL grants access to a private site.

Deletion or expiration stops new content requests. During the retention period, you can restore a deleted site. After the retention period, deletion cannot be undone. Content already downloaded or displayed can remain on a user’s device.

Private content compatibility

Private sites block Web Workers, SharedWorkers, and new service workers. Features that require these workers, including some offline features, do not work. Use a site build that works without browser workers. Private sites also block display inside an iframe. If a site was public, a service worker installed in a visitor’s browser can remain after you make it private. For sensitive content, upload a new private site instead of changing the public site’s visibility.

Expiration

When the operator enables Sites TTL, new sites receive the configured expiration. The owner can extend expiration through the CLI or API. When TTL is disabled, a site can have no expiration. Use the displayed expiration instead of assuming a fixed number of days.

API access

Management routes require authentication and the applicable scope. A scope permits an operation only when the caller also has the required ownership.

TaskRouteScope
Read capabilitiesGET /api/v2/sites/capabilitiessites:read
List sitesGET /api/v2/sitessites:read
Create a sitePOST /api/v2/sitessites:write
Get a siteGET /api/v2/sites/{siteId}sites:read
Delete a siteDELETE /api/v2/sites/{siteId}sites:write
Replace contentPUT /api/v2/sites/{siteId}/contentsites:write
Extend expirationPOST /api/v2/sites/{siteId}/extendsites:write
Rename a sitePATCH /api/v2/sites/{siteId}sites:write
Change visibilityPATCH /api/v2/sites/{siteId}/accesssites:write
Restore a sitePOST /api/v2/sites/{siteId}/restoresites:write

Capabilities contain enabled, upload, defaultVisibility, allowedVisibilities, canCreate, and deletedRetentionDays. Capabilities do not expose administrator configuration or storage credentials. List requests accept view=mine|public|all|deleted, q, page, and limit. The deleted view shows only your deleted sites that you can restore. Results use the pagination fields items, total, current, and limit.

Create and content-replacement requests use multipart/form-data. Creation accepts optional visibility. A personal API key defaults to private sites. A service API key can create only public sites and defaults to public. The service key owns its sites through that exact key identity.

Use an existing API key with sites:write in LIFECYCLE_API_KEY. Set LIFECYCLE_URL to your Lifecycle API origin. To upload an HTML file with the key’s default visibility, run:

Renaming requires the JSON field name (1-255 characters) and accepts an optional expectedAccessRevision. Visibility changes require JSON fields visibility and expectedAccessRevision. For replacement, send expectedAccessRevision and expectedContentRevision as multipart fields. Older replacement clients can also receive 409 after a concurrent change. Delete, extend, and restore requests accept expectedAccessRevision as a query parameter.

A deleted site includes deletedAt and restorableUntil. permissions.canRestore shows whether you can restore the site. A deleted site returns 404 from GET /api/v2/sites/{siteId}.

For 409, fetch the site again before you decide whether to retry. Do not automatically overwrite another change. Use permissions to show available actions and currentRole to identify ownership. Public results hide unrelated creator and updater identities.

See API overview and API keys.

Troubleshooting

SymptomAction
Private upload is unavailableAsk the operator to check private Sites readiness.
Upload is rejectedCompare the entry file, extensions, counts, and sizes with the returned upload policy.
A private URL does not openSign in as the owner through the site’s opening URL.
A site returns 404Check its URL, visibility, expiration, and Recently deleted through an authorized account.
You deleted a site in errorRestore it from Recently deleted or with lfc sites restore before its retention ends.
A site has no assigned ownerContact your platform operator. Lifecycle has no self-service ownership transfer or recovery.
Assets return 404Rebuild with relative paths or the current content base URL.
A change returns 409Fetch current site details before you retry the intended change.