Skip to content
# Hosting

Hosting & databases

Web hosting apps, environment variables and managed databases.

GET+POST/hosting

List and create web hosting apps (Coolify-backed). appType is a discriminated union: dockerimage, nixpacks, static, or dockercompose. resourceTier (small/medium/large) selects a CPU/RAM tier; small is included, medium/large add a monthly surcharge. GET /hosting/{id} returns full details, PATCH /hosting/{id} changes the resource tier and/or domains, DELETE /hosting/{id} terminates (bills the final partial hour). POST /hosting/{id}/action starts/stops/restarts, POST /hosting/{id}/star toggles starred, GET /hosting/{id}/logs?lines=200 tails logs.

GET response 200
json
[
  {
    "id": "app_3Fk...",
    "coolifyUuid": "a1b2c3d4",
    "name": "my-app",
    "status": "running",
    "domains": ["https://my-app.example.com"],
    "costMonthly": 5.0,
    "starred": false,
    "createdAt": "2026-07-01T10:00:00Z",
    "managementUrl": "https://coolify.internal/project/.../application/a1b2c3d4"
  }
]
POST body → 201
json
{
  "name": "my-app",
  "storageGb": 5,
  "appType": "nixpacks",
  "gitRepository": "https://github.com/me/my-app",
  "gitBranch": "main"
}

→ { "id": "app_3Fk..." }

Insufficient wallet balance → 402 insufficient_balance. Web hosting not configured on this deployment → 503 hosting_unavailable.

GET+POST/hosting/{id}/env

List (values redacted) or set an app's environment variables. POST /hosting/{id}/env/{envUuid}/reveal returns the real value; DELETE /hosting/{id}/env/{envUuid} removes it. Keys must be a valid env var name (letters, digits, underscore).

POST body → 201
json
{
  "key": "DATABASE_URL",
  "value": "postgres://...",
  "isBuildTime": false
}
POST .../reveal → 200
json
{ "value": "postgres://..." }
GET+POST/databases

List and create managed databases (Coolify-backed). Self-service dbType: postgresql, mysql, mariadb, redis, mongodb, keydb, dragonfly, clickhouse. resourceTier (small/medium/large) selects a CPU/RAM tier; small is included, medium/large add a monthly surcharge. GET /databases/{id} includes connection credentials. PATCH /databases/{id} changes the resource tier. DELETE /databases/{id} terminates. POST /databases/{id}/action starts/stops/restarts, POST /databases/{id}/star toggles starred, GET /databases/{id}/logs?lines=200 tails logs, POST /databases/{id}/public-access { "enabled": true } opens a random public port (49200–59999).

POST body → 201
json
{
  "dbType": "postgresql",
  "name": "my-db",
  "storageGb": 5
}

→ { "id": "db_9Qw..." }
GET /databases/{id} → 200 (excerpt)
json
{
  "id": "db_9Qw...",
  "dbType": "postgresql",
  "status": "running",
  "isPublic": false,
  "credentials": {
    "user": "postgres",
    "password": "…",
    "database": "postgres",
    "host": "…",
    "port": 5432
  }
}