Getting started

Ship previews in minutes

Previewly listens for pull-request activity, downloads your repository at the head commit, builds a runnable image, exposes it on Fly, then tears it down on schedule or after merge.

1 · Connect GitHub

Install the Previewly GitHub App on each organization where you want previews. Previewly receives permissions to read the repository archive and reacts to webhook events tied to PRs so it can enqueue builds.

2 · Configure behavior (recommended)

Add previewly.toml or previewly.yml / yaml at the repository root. You should set internal_port (or alias port) to match the port your HTTP server listens on, and optionally set startup_command whenever the automatic stack guess cannot know how your service starts—especially Python and Go backends.

Omit dockerfile anywhere you are happy with Previewly detecting Node, Next.js, minimal static folders, Python (with dependency files), Go (with go.mod), or with providing an explicit starter command yourself.

3 · Listening address and HTTPS

  • Bind your server to 0.0.0.0. Previewly merges HOST, HOSTNAME, and PORT into the Fly app environment immediately before boot.
  • Speak plain HTTP internally on exactly one TCP port—that is the Fly internal listener the edge proxy fronts with HTTPS externally.
  • If you customize the Dockerfile, expose the same numeric port documented in Previewly's Fly config.

4 · Opening a preview

Open or update a pull request on a watched branch. Previewly clones the HEAD commit, resolves configuration, selects a Dockerfile (or emits a generated one when none exist), invokes flyctl deploy, and attaches the public *.fly.dev hostname to your deployment dashboard entry.

Next steps

Read Configuration for full field semantics, Custom Dockerfile if you rely on staged builds or non-root identities, then compare plans for idle-timeout and concurrency limits that match how your team previews.