Sites guide

Serve a storage directory as a website.

Create a storage connection, map it to a hostname and path, load content, synchronize the cache, and test the public route before adding access controls or TLS.

  • Storage
  • Site record
  • Route verification

Before you start

Choose the route and content source.

You need a hostname that resolves to the deployment, a directory of static output, and a cloud store that can read that directory. Start with localstore before introducing remote credentials and synchronization.

Hostname

Use the host visitors will request. Public DNS must point it to the server or load balancer.

Path

Choose the directory within storage and avoid overlapping host and path combinations.

Content

Build static HTML, CSS, JavaScript, images, or generated documentation into that directory.

Remote credentials

Create the credential and set the cloud store's credential_name to its exact name.

Configuration sequence

Create storage before the site.

  1. Create or select a cloud store. Confirm Daptin can list and retrieve a disposable file.
  2. Place files in one directory. Include index.html at its root for the initial test.
  3. Create the site record. Set its hostname and path, then link the intended cloud store.
  4. Synchronize storage. Run site.storage.sync or restart where required so the cache and route load.
  5. Request the public URL. Check the homepage, a nested asset, a missing file, and cache refresh after a change.

Optional controls

Add only what this site needs.

Basic Authentication

Configure the site username and bcrypt password hash. Verify anonymous and incorrect credentials are denied.

HTTPS

Associate a certificate matching the hostname and test SNI selection when hosting several TLS sites.

TLS guide →

FTP

Enable FTP globally and set ftpenabled for the site. Verify access is limited to the intended path.

Protocol support →

Remote synchronization

Change a file in the provider, synchronize the site, and confirm the public response refreshes.

Cloud storage →

Verification

Test the public site.

  • The hostname resolves to the intended deployment.
  • The site links to a valid cloud store and non-conflicting path.
  • Directory requests return the expected index file.
  • Nested assets use correct content types and paths.
  • Remote changes appear after synchronization.
  • Basic Auth denies missing and incorrect credentials.
  • The certificate matches the requested hostname.
  • FTP remains disabled unless configured.

Daptin Sites serves static files and generated output. Put dynamic behavior behind APIs and actions; do not treat it as a general server-side code runtime.

Connect the site to its backend.