Create a website
Launch a static or PHP website in minutes.
Step-by-step
- Navigate to your project
- Click Websites in the left sidebar
- Click Create Website
- Configure basic settings:
| Field | Description | Example |
|---|---|---|
| Name | Unique identifier (lowercase, hyphens allowed) | my-blog |
| Mode | Hosting mode | Static or PHP |
| PHP Version | PHP runtime version (PHP mode only) | 8.4 |
- Choose a hosting plan:
| Plan | Resources | Replicas |
|---|---|---|
| Starter | 0.25 vCPU / 256 MiB | 1 |
| Standard | 0.5 vCPU / 512 MiB | 2 |
| Pro | 1 vCPU / 2048 MiB | 3 |
- Configure document settings:
| Field | Description | Default |
|---|---|---|
| Index Document | Default page to serve | index.html |
| Error Document | Custom error page | (none) |
| SPA Mode | Route all paths to index document | Off |
-
Choose a content source:
- Manual Upload — Upload files after creation via the file manager
- Git Sync — Pull content from a Git repository automatically
-
Optionally configure public access:
- Quick Expose — Get a default SailOps URL immediately
- Custom Domain — Attach your own domain through a gateway
-
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:
| Field | Description | Example |
|---|---|---|
| Repository URL | HTTPS Git URL | https://github.com/user/site.git |
| Branch | Branch to sync | main |
| Path | Subdirectory to serve | /dist |
| Access Token | Token for private repositories | ghp_... |
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:
- You need an existing gateway in the project
- Select the gateway in the website form
- Enter your domain name (e.g.,
www.example.com) - 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