Skip to main content

Create a website

Launch a static or PHP website in minutes.

Step-by-step​

  1. Navigate to your project
  2. Click Websites in the left sidebar
  3. Click Create Website
  4. Configure basic settings:
FieldDescriptionExample
NameUnique identifier (lowercase, hyphens allowed)my-blog
ModeHosting modeStatic or PHP
PHP VersionPHP runtime version (PHP mode only)8.4
  1. Choose a hosting plan:
PlanResourcesReplicas
Starter0.25 vCPU / 256 MiB1
Standard0.5 vCPU / 512 MiB2
Pro1 vCPU / 2048 MiB3
  1. Configure document settings:
FieldDescriptionDefault
Index DocumentDefault page to serveindex.html
Error DocumentCustom error page(none)
SPA ModeRoute all paths to index documentOff
  1. Choose a content source:

    • Manual Upload — Upload files after creation via the file manager
    • Git Sync — Pull content from a Git repository automatically
  2. Optionally configure public access:

    • Quick Expose — Get a default SailOps URL immediately
    • Custom Domain — Attach your own domain through a gateway
  3. Click Create

Content sources​

Manual upload​

After creating the website, go to the Files tab to upload content through the built-in file manager.

Git Sync​

Automatically sync content from a Git repository:

FieldDescriptionExample
Repository URLHTTPS Git URLhttps://github.com/user/site.git
BranchBranch to syncmain
PathSubdirectory to serve/dist
Access TokenToken for private repositoriesghp_...
tip

For public repositories, leave the Access Token field empty. For private repos on GitHub, use a Personal Access Token with repo scope.

Custom domains​

To use a custom domain:

  1. You need an existing gateway in the project
  2. Select the gateway in the website form
  3. Enter your domain name (e.g., www.example.com)
  4. Configure DNS to point your domain to the gateway's IP address
info

SSL certificates are automatically provisioned via Let's Encrypt when you attach a custom domain through a gateway.

Create via Public API​

curl -X POST \
-H "X-Api-Key: $SAILOPS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "my-site",
"mode": "static",
"plan": "standard",
"indexDocument": "index.html",
"spaMode": true
}' \
https://app.sailops.io/api/public/api/v1/websites

With Git Sync​

curl -X POST \
-H "X-Api-Key: $SAILOPS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "docs-site",
"mode": "static",
"plan": "starter",
"gitSync": {
"repoUrl": "https://github.com/user/docs.git",
"branch": "main",
"path": "/build"
}
}' \
https://app.sailops.io/api/public/api/v1/websites