Skip to content
Console
Menu

Getting Started

Authentication

KV Store

Hosting quickstart

A repository to a running app on a public URL, in five calls.

This takes a Git repository to an app answering over HTTPS. It uses the management API at https://api.sylphx.com, which is how Hosting serves customers today; the console does the same five things.

Today this runs on the management API

Hosting is served through the management API at api.sylphx.com, and every call on this page runs there. The services, source_links and service_rollouts collections of the API reference describe the one-API shape of the same product; the calls here are the ones to use.

sylphx login issues an organization-wide key with your member role's scopes; use an owner, admin or developer login for this guide. For a machine, create an organization-wide key and set SYLPHX_API_KEY to its secret. An environment-scoped key cannot create a project or change a service definition: those writes affect the whole project, not just one environment.

sylphx api METHOD PATH sends one call with your key, and every call below is also plain HTTP with Authorization: Bearer $SYLPHX_API_KEY.

#1. Create the project

A project holds the repository link and its environments. A new project comes with production and preview. Web services are public by default: Hosting provides an HTTPS URL without enabling networking or registering a domain.

sylphx api POST /v1/projects -d '{"name":"shop","gitRepository":"acme/shop","gitBranch":"main"}'

The answer carries the project under app: its id (proj_…) and its environments, each with its own id (env_…) and envType. Keep the project id and the production environment id.

Then check that the GitHub App can read the repository, before the first deploy:

Shell
sylphx api GET /v1/github/connect/$ENV_ID

deployAppInstallation.state is installed when the App can read the repository. When it is missing, message says which owner to install it on and installUrl is the page to do it on; a deploy of a repository the App cannot read is refused with a 422 and that same message. Installing the App is the one step in this guide that needs a person in a browser.

#2. Add the service

A service names the repository, the branch and the port the app listens on:

Shell
sylphx api POST /v1/projects/$PROJECT_ID/services -d '{
  "name": "web",
  "githubRepo": "acme/shop",
  "githubBranch": "main",
  "port": "3000",
  "sourceKind": "git"
}'

If the app lives in a sub-directory, optionally update the production environment (a repository-root app needs no environment PATCH):

Shell
sylphx api PATCH /v1/projects/$PROJECT_ID/environments/$ENV_ID -d '{"sourceRoot":"apps/web"}'

GET /v1/projects/$PROJECT_ID/services lists the services, and PATCH /v1/projects/$PROJECT_ID/services/web changes one, for example {"instanceType":"nano"} for the smallest machine.

#3. Deploy

Shell
sylphx api POST /v1/projects/$PROJECT_ID/deploy -d '{"envType":"production","force":true}'

This builds the commit at the tip of the branch and rolls it out. A push to the branch does the same, so after the first deploy you rarely call this yourself.

#4. Watch it go live

Shell
sylphx api GET /v1/deployments/projects/$ENV_ID/status
sylphx api GET /v1/deployments/projects/$ENV_ID/deployments
sylphx api GET /v1/projects/$PROJECT_ID/logs

The status moves to running when the app is live; unhealthy means the deploy failed, and the logs say why. Each entry of the deployments list names a build, and GET /v1/deployments/builds/{build_id} reads one in full.

#5. Open the app

Read the deployment status back. Its url is the app's public HTTPS URL, including the platform-provided hostname when no custom domain is configured:

Shell
sylphx api GET /v1/deployments/projects/$ENV_ID/status

For a host of your own, see Network.

#Advanced: private networking

To keep an environment private, set publicNetworking: false when creating the project or environment, or PATCH that environment before deploying:

Shell
sylphx api PATCH /v1/projects/$PROJECT_ID/environments/$ENV_ID -d '{"publicNetworking":false}'

A service can instead declare public_networking = false in sylphx.toml. An explicit private service stays private even in a public environment. Existing private environments are not changed by the new-project default.

This is the Vercel public-by-default web deployment pattern: configuration is an optional override, not a prerequisite. Every organization uses the same path.

#Clean up

Shell
sylphx api DELETE /v1/projects/$PROJECT_ID

This is the same sequence the Hosting journey runs against production, so it is checked against the live API.

#Next