elestio 1.0.3 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,279 +1,523 @@
1
- # Elestio CLI
2
-
3
- Deploy and manage services on the [Elestio](https://elest.io) DevOps platform from the command line.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm install -g elestio
9
- ```
10
-
11
- Requires Node.js >= 18.
12
-
13
- ## Quick Start
14
-
15
- ```bash
16
- # Configure credentials (get your API token from https://dash.elest.io/account/security)
17
- elestio login --email you@example.com --token YOUR_API_TOKEN
18
-
19
- # Verify authentication
20
- elestio auth test
21
-
22
- # List available templates
23
- elestio templates
24
-
25
- # Deploy a service
26
- elestio deploy PostgreSQL --project 12345 --name my-db
27
-
28
- # List services
29
- elestio services --project 12345
30
- ```
31
-
32
- ## Commands
33
-
34
- ### Auth & Config
35
-
36
- | Command | Description |
37
- |---------|-------------|
38
- | `elestio login --email X --token Y` | Configure credentials |
39
- | `elestio whoami` | Show current user |
40
- | `elestio config` | Show current configuration |
41
- | `elestio config --set-default-project ID` | Set default project |
42
- | `elestio config --provider X --datacenter Y` | Set defaults |
43
- | `elestio auth test` | Test authentication |
44
-
45
- ### Catalog (no auth required)
46
-
47
- | Command | Description |
48
- |---------|-------------|
49
- | `elestio templates` | List all 400+ deployable templates |
50
- | `elestio templates search <query>` | Search templates |
51
- | `elestio templates info <name>` | Show template details |
52
- | `elestio categories` | List template categories |
53
- | `elestio sizes` | List server sizes and pricing |
54
- | `elestio sizes --provider hetzner` | Filter by provider |
55
-
56
- ### Projects
57
-
58
- | Command | Description |
59
- |---------|-------------|
60
- | `elestio projects` | List all projects |
61
- | `elestio projects create <name>` | Create a project |
62
- | `elestio projects edit <id> --name X` | Edit a project |
63
- | `elestio projects delete <id> --force` | Delete a project |
64
- | `elestio projects members <id>` | List members |
65
- | `elestio projects add-member <id> <email>` | Add a member |
66
- | `elestio projects remove-member <id> <memberId>` | Remove a member |
67
-
68
- ### Services
69
-
70
- | Command | Description |
71
- |---------|-------------|
72
- | `elestio services` | List services in default project |
73
- | `elestio service <vmID>` | Show service details |
74
- | `elestio deploy <template>` | Deploy a new service |
75
- | `elestio deploy <template> --dry-run` | Preview deployment |
76
- | `elestio delete-service <vmID> --force` | Delete a service |
77
- | `elestio move-service <vmID> <targetProjectId>` | Move to another project |
78
- | `elestio wait <vmID>` | Wait for deployment to complete |
79
-
80
- #### Deploy options
81
-
82
- ```bash
83
- elestio deploy PostgreSQL \
84
- --project 12345 \
85
- --name my-db \
86
- --provider hetzner \
87
- --region fsn1 \
88
- --size MEDIUM-2C-4G \
89
- --version 16 \
90
- --support level1
91
- ```
92
-
93
- ### Server Actions
94
-
95
- | Command | Description |
96
- |---------|-------------|
97
- | `elestio reboot <vmID>` | Graceful reboot |
98
- | `elestio reset <vmID>` | Hard reset |
99
- | `elestio shutdown <vmID>` | Graceful shutdown |
100
- | `elestio poweroff <vmID>` | Force power off |
101
- | `elestio poweron <vmID>` | Power on |
102
- | `elestio restart-stack <vmID>` | Restart Docker stack |
103
- | `elestio lock <vmID>` | Enable termination protection |
104
- | `elestio unlock <vmID>` | Disable termination protection |
105
- | `elestio resize <vmID> --size LARGE-4C-8G` | Resize a VM |
106
- | `elestio change-version <vmID> <version>` | Change software version |
107
-
108
- ### Firewall
109
-
110
- | Command | Description |
111
- |---------|-------------|
112
- | `elestio firewall get <vmID>` | Show firewall rules |
113
- | `elestio firewall enable <vmID> --rules '[...]'` | Enable firewall |
114
- | `elestio firewall update <vmID> --rules '[...]'` | Update rules |
115
- | `elestio firewall disable <vmID>` | Disable firewall |
116
-
117
- ### SSL / Custom Domains
118
-
119
- | Command | Description |
120
- |---------|-------------|
121
- | `elestio ssl list <vmID>` | List custom domains |
122
- | `elestio ssl add <vmID> <domain>` | Add domain with auto-SSL |
123
- | `elestio ssl remove <vmID> <domain>` | Remove domain |
124
-
125
- ### SSH Keys
126
-
127
- | Command | Description |
128
- |---------|-------------|
129
- | `elestio ssh-keys list <vmID>` | List SSH keys |
130
- | `elestio ssh-keys add <vmID> --name X --key Y` | Add an SSH key |
131
- | `elestio ssh-keys remove <vmID> --name X` | Remove an SSH key |
132
-
133
- ### Auto-Updates
134
-
135
- | Command | Description |
136
- |---------|-------------|
137
- | `elestio updates system-enable <vmID>` | Enable OS auto-updates |
138
- | `elestio updates system-disable <vmID>` | Disable OS auto-updates |
139
- | `elestio updates system-now <vmID>` | Run OS update now |
140
- | `elestio updates app-enable <vmID>` | Enable app auto-updates |
141
- | `elestio updates app-disable <vmID>` | Disable app auto-updates |
142
- | `elestio updates app-now <vmID>` | Run app update now |
143
-
144
- ### Alerts
145
-
146
- | Command | Description |
147
- |---------|-------------|
148
- | `elestio alerts get <vmID>` | Show alert rules |
149
- | `elestio alerts enable <vmID> --rules '...'` | Enable/update alerts |
150
- | `elestio alerts disable <vmID>` | Disable alerts |
151
-
152
- ### Backups
153
-
154
- | Command | Description |
155
- |---------|-------------|
156
- | `elestio backups local-list <vmID>` | List local backups |
157
- | `elestio backups local-take <vmID>` | Take a local backup |
158
- | `elestio backups local-restore <vmID> <path>` | Restore local backup |
159
- | `elestio backups local-delete <vmID> <path>` | Delete local backup |
160
- | `elestio backups remote-list <vmID>` | List remote backups |
161
- | `elestio backups remote-take <vmID>` | Take remote backup |
162
- | `elestio backups remote-restore <vmID> <snapshot>` | Restore remote backup |
163
- | `elestio backups auto-enable <vmID>` | Setup auto backups |
164
- | `elestio backups auto-disable <vmID>` | Disable auto backups |
165
-
166
- ### Snapshots
167
-
168
- | Command | Description |
169
- |---------|-------------|
170
- | `elestio snapshots list <vmID>` | List snapshots |
171
- | `elestio snapshots take <vmID>` | Take a snapshot |
172
- | `elestio snapshots restore <vmID> <orderID>` | Restore (0 = most recent) |
173
- | `elestio snapshots delete <vmID> <snapshotID>` | Delete a snapshot |
174
- | `elestio snapshots auto-enable <vmID>` | Enable auto snapshots |
175
- | `elestio snapshots auto-disable <vmID>` | Disable auto snapshots |
176
-
177
- ### S3 External Backups
178
-
179
- | Command | Description |
180
- |---------|-------------|
181
- | `elestio s3-backup verify <vmID>` | Verify S3 config |
182
- | `elestio s3-backup enable <vmID>` | Enable S3 backup |
183
- | `elestio s3-backup disable <vmID>` | Disable S3 backup |
184
- | `elestio s3-backup take <vmID>` | Take S3 backup |
185
- | `elestio s3-backup list <vmID>` | List S3 backups |
186
- | `elestio s3-backup restore <vmID> <key>` | Restore S3 backup |
187
- | `elestio s3-backup delete <vmID> <key>` | Delete S3 backup |
188
-
189
- S3 options: `--key`, `--secret`, `--bucket`, `--endpoint`, `--prefix`
190
-
191
- ### Access
192
-
193
- | Command | Description |
194
- |---------|-------------|
195
- | `elestio credentials <vmID>` | Get app URL, user & password |
196
- | `elestio ssh <vmID>` | Get web terminal URL |
197
- | `elestio ssh <vmID> --direct` | Get direct SSH connection info |
198
- | `elestio vscode <vmID>` | Get VSCode web URL |
199
- | `elestio files <vmID>` | Get file explorer URL |
200
-
201
- ### Volumes
202
-
203
- | Command | Description |
204
- |---------|-------------|
205
- | `elestio volumes` | List project volumes |
206
- | `elestio volumes create --name X --size 10` | Create a volume |
207
- | `elestio volumes service-list <vmID>` | List attached volumes |
208
- | `elestio volumes service-create <vmID> --name X` | Create & attach volume |
209
- | `elestio volumes resize <vmID> <volumeID> --size 50` | Resize a volume |
210
- | `elestio volumes detach <vmID> <volumeID>` | Detach a volume |
211
- | `elestio volumes delete <vmID> <volumeID>` | Delete a volume |
212
- | `elestio volumes protect <vmID> <volumeID>` | Toggle protection |
213
-
214
- ### CI/CD
215
-
216
- | Command | Description |
217
- |---------|-------------|
218
- | `elestio cicd targets` | List CI/CD targets |
219
- | `elestio cicd pipelines <vmID>` | List pipelines |
220
- | `elestio cicd pipeline-info <vmID> <pipelineID>` | Pipeline details |
221
- | `elestio cicd pipeline-restart <vmID> <pipelineID>` | Restart pipeline |
222
- | `elestio cicd pipeline-stop <vmID> <pipelineID>` | Stop pipeline |
223
- | `elestio cicd pipeline-delete <vmID> <pipelineID> --force` | Delete pipeline |
224
- | `elestio cicd pipeline-resync <vmID> <pipelineID>` | Re-sync pipeline |
225
- | `elestio cicd pipeline-logs <vmID> <pipelineID>` | View pipeline logs |
226
- | `elestio cicd pipeline-history <vmID> <pipelineID>` | Build history |
227
- | `elestio cicd create --auto --target <vmID> --name X --repo owner/repo` | Auto-create pipeline |
228
- | `elestio cicd create <config.json>` | Create from config file |
229
- | `elestio cicd template [mode]` | Generate config template |
230
- | `elestio cicd domains <vmID> <pipelineID>` | List pipeline domains |
231
- | `elestio cicd registries` | List Docker registries |
232
- | `elestio cicd registry-add --name X --username U --password P --url REPO` | Add Docker Hub registry |
233
- | `elestio cicd registry-add --name X --username U --password P --url REPO --registry-type registry.gitlab.com --repo-id ID` | Add GitLab.com registry |
234
- | `elestio cicd registry-add --name X --username U --password P --url REPO --registry-type gitlab-self-hosted --repo-id ID --gitlab-url gitlab.company.com` | Add self-hosted GitLab registry |
235
- | `elestio cicd registry-add --name X --username U --password P --url REPO --registry-type ghcr.io` | Add GitHub Container Registry |
236
-
237
- **`registry-add` options:**
238
-
239
- | Option | Description |
240
- |--------|-------------|
241
- | `--name` | Unique identity nickname for the registry credential |
242
- | `--username` | Registry username |
243
- | `--password` | Registry password or access token |
244
- | `--url` | Repository path (e.g. `myuser/myrepo`) — **not** the registry host |
245
- | `--registry-type` | Registry host: `docker.io` (default), `registry.gitlab.com`, `gitlab-self-hosted`, `ghcr.io` |
246
- | `--repo-id` | GitLab project/repo ID required for `registry.gitlab.com` and `gitlab-self-hosted` |
247
- | `--gitlab-url` | Self-hosted GitLab hostname (e.g. `gitlab.company.com`) required for `gitlab-self-hosted` |
248
-
249
- ### Billing
250
-
251
- | Command | Description |
252
- |---------|-------------|
253
- | `elestio billing` | Billing summary across all projects |
254
- | `elestio billing project <id>` | Per-project billing details |
255
-
256
- ## Global Options
257
-
258
- | Option | Description |
259
- |--------|-------------|
260
- | `--json` | Output in JSON format (for scripting) |
261
- | `--project <id>` | Specify project ID |
262
- | `--help`, `-h` | Show help |
263
- | `--version`, `-v` | Show version |
264
- | `--debug` | Show full error stack traces |
265
-
266
- ## Configuration
267
-
268
- Credentials and config are stored in `~/.elestio/`:
269
-
270
- - `~/.elestio/credentials` - Email and API token (mode 0600)
271
- - `~/.elestio/config.json` - JWT cache, default project, provider defaults
272
-
273
- Get your API token from [Elestio Dashboard > Security](https://dash.elest.io/account/security).
274
-
275
- ## Documentation
276
- https://docs.elest.io/books/elestio-cli-skill/page/overview
277
- ## License
278
-
279
- MIT
1
+ # Elestio CLI
2
+
3
+ Deploy and manage services on the [Elestio](https://elest.io) DevOps platform from the command line.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g elestio
9
+ ```
10
+
11
+ Requires Node.js >= 18.
12
+
13
+ ## Quick Start
14
+
15
+ ```bash
16
+ # Configure credentials (get your API token from https://dash.elest.io/account/security)
17
+ elestio login --email you@example.com --token YOUR_API_TOKEN
18
+
19
+ # Verify authentication
20
+ elestio auth test
21
+
22
+ # List available templates
23
+ elestio templates
24
+
25
+ # Deploy a service
26
+ elestio deploy PostgreSQL --project 12345 --name my-db
27
+
28
+ # List services
29
+ elestio services --project 12345
30
+ ```
31
+
32
+ ### Three ways to run software
33
+
34
+ | | Command | You get |
35
+ |---|---|---|
36
+ | **Managed service** | `elestio deploy postgresql` | One VM running the software, fully managed |
37
+ | **Cluster** | `elestio deploy postgresql --cluster --nodes 3` | Several VMs with replication |
38
+ | **Pipeline** | `elestio cicd deploy-template n8n --target <vmID>` | Software running on a shared CI/CD target, rebuilt from a repo |
39
+
40
+ Pipelines are cheaper (several pipelines share one target VM) and let you edit
41
+ the software's compose file; managed services get backups, monitoring and
42
+ support. See [CI/CD](#cicd) for the pipeline route.
43
+
44
+ ## Commands
45
+
46
+ ### Auth & Config
47
+
48
+ | Command | Description |
49
+ |---------|-------------|
50
+ | `elestio login --email X --token Y` | Configure credentials |
51
+ | `elestio whoami` | Show current user |
52
+ | `elestio config` | Show current configuration |
53
+ | `elestio config --set-default-project ID` | Set default project |
54
+ | `elestio config --provider X --datacenter Y` | Set defaults |
55
+ | `elestio auth test` | Test authentication |
56
+
57
+ ### Catalog (no auth required)
58
+
59
+ | Command | Description |
60
+ |---------|-------------|
61
+ | `elestio templates` | List all 400+ deployable templates |
62
+ | `elestio templates search <query>` | Search templates |
63
+ | `elestio templates info <name>` | Show template details |
64
+ | `elestio categories` | List template categories |
65
+ | `elestio sizes` | List server sizes and pricing |
66
+ | `elestio sizes --provider hetzner` | Filter by provider |
67
+
68
+ ### Projects
69
+
70
+ | Command | Description |
71
+ |---------|-------------|
72
+ | `elestio projects` | List all projects |
73
+ | `elestio projects create <name>` | Create a project |
74
+ | `elestio projects edit <id> --name X` | Edit a project |
75
+ | `elestio projects delete <id> --force` | Delete a project |
76
+ | `elestio projects members <id>` | List members |
77
+ | `elestio projects add-member <id> <email>` | Add a member |
78
+ | `elestio projects remove-member <id> <memberId>` | Remove a member |
79
+
80
+ ### Services
81
+
82
+ | Command | Description |
83
+ |---------|-------------|
84
+ | `elestio services` | List services in default project |
85
+ | `elestio service <vmID>` | Show service details |
86
+ | `elestio deploy <template>` | Deploy a new service |
87
+ | `elestio deploy <template> --cluster` | Deploy as a cluster (see [Clusters](#clusters)) |
88
+ | `elestio deploy <template> --dry-run` | Preview deployment |
89
+ | `elestio delete-service <vmID> --force` | Delete a service |
90
+ | `elestio move-service <vmID> <targetProjectId>` | Move to another project |
91
+ | `elestio wait <vmID>` | Wait for deployment to complete |
92
+
93
+ #### Deploy options
94
+
95
+ ```bash
96
+ elestio deploy PostgreSQL \
97
+ --project 12345 \
98
+ --name my-db \
99
+ --provider hetzner \
100
+ --region fsn1 \
101
+ --size MEDIUM-2C-4G \
102
+ --version 16 \
103
+ --support level1
104
+ ```
105
+
106
+ ### Clusters
107
+
108
+ Clustering is available for 19 templates - PostgreSQL, MySQL, Redis, ClickHouse,
109
+ RabbitMQ, OpenSearch, Keycloak and others. Run `elestio clusters templates` for
110
+ the current list, which is read from the catalog rather than hardcoded.
111
+
112
+ ```bash
113
+ # What can be clustered, and each one's minimum node count
114
+ elestio clusters templates
115
+
116
+ # 1 primary + 2 replicas. Always check the VM count first: billing is per VM.
117
+ elestio deploy postgresql --cluster --nodes 3 --dry-run
118
+ elestio deploy postgresql --cluster --nodes 3
119
+
120
+ # MySQL is the only software that supports writes on several nodes
121
+ elestio deploy mysql --cluster --cluster-mode multi-master
122
+ ```
123
+
124
+ | Option | Description |
125
+ |--------|-------------|
126
+ | `--cluster` | Deploy a cluster instead of a single node |
127
+ | `--nodes <n>` | **Total** nodes, primary included. Defaults to the template minimum, caps at 15 |
128
+ | `--cluster-mode <mode>` | `primary-replica` (default) or `multi-master` |
129
+
130
+ `--nodes 3` means 1 primary and 2 replicas, and bills 3 VMs.
131
+
132
+ ClickHouse, Vault, OpenSearch, RabbitMQ, rke2 and Nats elect a leader by
133
+ quorum and need at least 3 nodes; everything else starts at 2. The CLI checks
134
+ this before calling the API, because a cluster the API rejects has often
135
+ already started billing its VMs.
136
+
137
+ | Command | Description |
138
+ |---------|-------------|
139
+ | `elestio clusters` | List clusters in the project |
140
+ | `elestio clusters info <clusterID>` | Cluster details and its nodes |
141
+ | `elestio clusters nodes <clusterID>` | List the active nodes |
142
+ | `elestio clusters templates` | Software that supports clustering |
143
+ | `elestio clusters promote <clusterID> <vmID> --force` | Promote a replica to primary |
144
+ | `elestio clusters failover <clusterID> on\|off` | Turn automatic failover on or off |
145
+ | `elestio clusters resync <clusterID> --force` | Re-sync replicas from the primary |
146
+ | `elestio clusters lock <clusterID>` | Enable termination protection |
147
+ | `elestio clusters unlock <clusterID>` | Disable termination protection |
148
+ | `elestio clusters add-node <clusterID> [--dry-run]` | Add a node, copying the primary's provider, region, size and version |
149
+ | `elestio clusters remove-node <clusterID> <vmID> --force` | Remove a replica node and its VM |
150
+ | `elestio clusters firewall <clusterID>` | Show which IPs each port accepts |
151
+ | `elestio clusters firewall-restrict <clusterID> --port P --ips ip1,ip2` | Only accept a port from these IPs, on every node |
152
+ | `elestio clusters firewall-open <clusterID> --port P` | Open a port to everyone again |
153
+ | `elestio clusters delete <clusterID> --force` | Delete the cluster and all its nodes |
154
+
155
+ `promote`, `resync` and `delete` require `--force`: promotion demotes the
156
+ current primary, re-sync **erases all data on the replicas** and replaces it
157
+ with a copy of the primary, and delete removes every node. A locked cluster
158
+ must be unlocked before it can be deleted.
159
+
160
+ **Nodes.** `add-node` copies the primary: same provider, region, size and
161
+ software version (`--size`, `--region`, `--provider` or `--version` to change
162
+ them). It is billed as one more VM, so dry-run it first. It needs remote
163
+ backups on the primary, which seed the new node (`elestio backups auto-enable
164
+ <vmID>`), and is not available on multi-master clusters. After the VM is
165
+ deployed, Elestio still spends a few minutes turning it into a replica: the
166
+ cluster reads `running` meanwhile, and the CLI refuses other node or firewall
167
+ changes until that is done. `remove-node` only removes replicas; to remove the
168
+ primary, `promote` a replica first or delete the whole cluster.
169
+
170
+ **Firewall.** `firewall-restrict` applies to every node, and the cluster's
171
+ own nodes stay allowed so replication keeps working. Use it rather than
172
+ `elestio firewall` on a single node.
173
+
174
+ `failover` does not switch the primary itself. It turns on or off the automatic
175
+ failover that promotes a replica when the primary goes down; use `promote` to
176
+ switch by hand. Its state shows in `clusters info`.
177
+
178
+ Replicas are read-only and, unlike the primary, do not accept SSL connections:
179
+ a client with `sslmode=require` can write to the primary but cannot read from a
180
+ replica.
181
+
182
+ ### Server Actions
183
+
184
+ | Command | Description |
185
+ |---------|-------------|
186
+ | `elestio reboot <vmID>` | Graceful reboot |
187
+ | `elestio reset <vmID>` | Hard reset |
188
+ | `elestio shutdown <vmID>` | Graceful shutdown |
189
+ | `elestio poweroff <vmID>` | Force power off |
190
+ | `elestio poweron <vmID>` | Power on |
191
+ | `elestio restart-stack <vmID>` | Restart Docker stack |
192
+ | `elestio lock <vmID>` | Enable termination protection |
193
+ | `elestio unlock <vmID>` | Disable termination protection |
194
+ | `elestio resize <vmID> --size LARGE-4C-8G` | Resize a VM |
195
+ | `elestio change-version <vmID> <version>` | Change software version |
196
+
197
+ ### Firewall
198
+
199
+ | Command | Description |
200
+ |---------|-------------|
201
+ | `elestio firewall get <vmID>` | Show firewall rules |
202
+ | `elestio firewall enable <vmID> --rules '[...]'` | Enable firewall |
203
+ | `elestio firewall update <vmID> --rules '[...]'` | Update rules |
204
+ | `elestio firewall disable <vmID>` | Disable firewall |
205
+
206
+ ### SSL / Custom Domains
207
+
208
+ | Command | Description |
209
+ |---------|-------------|
210
+ | `elestio ssl list <vmID>` | List custom domains |
211
+ | `elestio ssl add <vmID> <domain>` | Add domain with auto-SSL |
212
+ | `elestio ssl remove <vmID> <domain>` | Remove domain |
213
+
214
+ ### SSH Keys
215
+
216
+ | Command | Description |
217
+ |---------|-------------|
218
+ | `elestio ssh-keys list <vmID>` | List SSH keys |
219
+ | `elestio ssh-keys add <vmID> --name X --key Y` | Add an SSH key |
220
+ | `elestio ssh-keys remove <vmID> --name X` | Remove an SSH key |
221
+
222
+ ### Auto-Updates
223
+
224
+ | Command | Description |
225
+ |---------|-------------|
226
+ | `elestio updates system-enable <vmID>` | Enable OS auto-updates |
227
+ | `elestio updates system-disable <vmID>` | Disable OS auto-updates |
228
+ | `elestio updates system-now <vmID>` | Run OS update now |
229
+ | `elestio updates app-enable <vmID>` | Enable app auto-updates |
230
+ | `elestio updates app-disable <vmID>` | Disable app auto-updates |
231
+ | `elestio updates app-now <vmID>` | Run app update now |
232
+
233
+ ### Alerts
234
+
235
+ | Command | Description |
236
+ |---------|-------------|
237
+ | `elestio alerts get <vmID>` | Show alert rules |
238
+ | `elestio alerts enable <vmID> --rules '...'` | Enable/update alerts |
239
+ | `elestio alerts disable <vmID>` | Disable alerts |
240
+
241
+ ### Backups
242
+
243
+ | Command | Description |
244
+ |---------|-------------|
245
+ | `elestio backups local-list <vmID>` | List local backups |
246
+ | `elestio backups local-take <vmID>` | Take a local backup |
247
+ | `elestio backups local-restore <vmID> <path>` | Restore local backup |
248
+ | `elestio backups local-delete <vmID> <path>` | Delete local backup |
249
+ | `elestio backups remote-list <vmID>` | List remote backups |
250
+ | `elestio backups remote-take <vmID>` | Take remote backup |
251
+ | `elestio backups remote-restore <vmID> <snapshot>` | Restore remote backup |
252
+ | `elestio backups auto-enable <vmID>` | Setup auto backups |
253
+ | `elestio backups auto-disable <vmID>` | Disable auto backups |
254
+
255
+ ### Snapshots
256
+
257
+ | Command | Description |
258
+ |---------|-------------|
259
+ | `elestio snapshots list <vmID>` | List snapshots |
260
+ | `elestio snapshots take <vmID>` | Take a snapshot |
261
+ | `elestio snapshots restore <vmID> <orderID>` | Restore (0 = most recent) |
262
+ | `elestio snapshots delete <vmID> <snapshotID>` | Delete a snapshot |
263
+ | `elestio snapshots auto-enable <vmID>` | Enable auto snapshots |
264
+ | `elestio snapshots auto-disable <vmID>` | Disable auto snapshots |
265
+
266
+ ### S3 External Backups
267
+
268
+ | Command | Description |
269
+ |---------|-------------|
270
+ | `elestio s3-backup verify <vmID>` | Verify S3 config |
271
+ | `elestio s3-backup enable <vmID>` | Enable S3 backup |
272
+ | `elestio s3-backup disable <vmID>` | Disable S3 backup |
273
+ | `elestio s3-backup take <vmID>` | Take S3 backup |
274
+ | `elestio s3-backup list <vmID>` | List S3 backups |
275
+ | `elestio s3-backup restore <vmID> <key>` | Restore S3 backup |
276
+ | `elestio s3-backup delete <vmID> <key>` | Delete S3 backup |
277
+
278
+ S3 options: `--key`, `--secret`, `--bucket`, `--endpoint`, `--prefix`
279
+
280
+ ### Access
281
+
282
+ | Command | Description |
283
+ |---------|-------------|
284
+ | `elestio credentials <vmID>` | Get app URL, user & password |
285
+ | `elestio ssh <vmID>` | Get web terminal URL |
286
+ | `elestio ssh <vmID> --direct` | Get direct SSH connection info |
287
+ | `elestio vscode <vmID>` | Get VSCode web URL |
288
+ | `elestio files <vmID>` | Get file explorer URL |
289
+ | `elestio logs <vmID> [--mode app\|install]` | Open a live log view (temporary URL): the app's container logs, or the install log |
290
+ | `elestio audits <vmID> [--days N]` | Audit trail: who did what (default: last 30 days) |
291
+
292
+ ### Volumes
293
+
294
+ | Command | Description |
295
+ |---------|-------------|
296
+ | `elestio volumes` | List project volumes |
297
+ | `elestio volumes create --name X --size 10` | Create a volume |
298
+ | `elestio volumes service-list <vmID>` | List attached volumes |
299
+ | `elestio volumes service-create <vmID> --name X` | Create & attach volume |
300
+ | `elestio volumes resize <vmID> <volumeID> --size 50` | Resize a volume |
301
+ | `elestio volumes detach <vmID> <volumeID>` | Detach a volume |
302
+ | `elestio volumes delete <vmID> <volumeID>` | Delete a volume |
303
+ | `elestio volumes protect <vmID> <volumeID>` | Toggle protection |
304
+
305
+ ### CI/CD
306
+
307
+ There are two very different things you can put on a CI/CD target, and picking
308
+ the wrong one is the usual reason a pipeline comes up empty:
309
+
310
+ | You want to run | Use | Why |
311
+ |---|---|---|
312
+ | Software from the Elestio catalog (n8n, Rybbit, Plausible...) | `cicd deploy-template` | Reads the template's `elestio.yml` for ports, env vars and lifecycle hooks |
313
+ | Your own application from your own repo | `cicd create --auto` | You supply the build and run commands |
314
+
315
+ #### Deploying catalog software as a pipeline
316
+
317
+ ```bash
318
+ # 1. Create a CI/CD target if you do not have one (this is a VM)
319
+ elestio deploy CI-CD-Target --name my-target
320
+
321
+ # 2. Find the software
322
+ elestio cicd templates n8n
323
+
324
+ # 3. See exactly what will be created, without creating it
325
+ elestio cicd deploy-template n8n --target <vmID> --dry-run
326
+
327
+ # 4. Deploy
328
+ elestio cicd deploy-template n8n --target <vmID>
329
+ ```
330
+
331
+ Every catalog entry has a companion repo at
332
+ `github.com/elestio-examples/<software>` containing a `docker-compose.yml` and
333
+ an `elestio.yml`. The `elestio.yml` is what makes the software actually run:
334
+
335
+ ```yaml
336
+ config: { runTime, version, buildCommand, runCommand, buildDir }
337
+ environments: [{ key, value }] # becomes the pipeline's env vars
338
+ ports: [{ protocol, targetPort, public, path }]
339
+ lifeCycleConfig: { preInstallCommand, postInstallCommand, ... }
340
+ webUI: [{ url, label, login, password }] # credentials printed on success
341
+ ```
342
+
343
+ `deploy-template` reads that file and builds the pipeline from it. Passwords
344
+ written as `random_password` are generated, `[EMAIL]` becomes your account
345
+ email, and `[CI_CD_DOMAIN]` is resolved by the platform once the pipeline has a
346
+ domain.
347
+
348
+ **Two routes:**
349
+
350
+ | | compose (default) | git (`--owner <git-user>`) |
351
+ |---|---|---|
352
+ | What it does | Inlines the template's `docker-compose.yml` | Generates the template repo into your Git account, then builds from it |
353
+ | Needs a Git account | No | Yes, connected in the dashboard |
354
+ | Lifecycle scripts | Skipped | Run |
355
+ | Repo files the compose mounts | Unavailable | Available |
356
+ | Works for | Templates that need no files from the repo | Every template |
357
+
358
+ The compose route has no checkout, so a template whose `docker-compose.yml`
359
+ bind-mounts a file from its repo cannot work: Docker creates the missing source
360
+ as an empty directory and the container fails to start. The CLI detects this
361
+ from the compose file and refuses upfront, naming the files, rather than
362
+ letting the build fail a minute later with a `runc` error. `--force` overrides.
363
+
364
+ This affects more templates than you would expect - n8n
365
+ (`./n8n-task-runners.json`), Rybbit (four files under `./configs/`) and
366
+ WordPress (`./php.ini`) are all in this category. Vaultwarden, Redis and
367
+ Metabase deploy cleanly on the compose route.
368
+
369
+ > **The git route is currently unavailable.** It needs
370
+ > `POST /api/cicd/createRepoByTemplate`, which the Elestio API returns 404 for:
371
+ > the controller exists in the backend but is not registered in its route
372
+ > whitelist. The CLI reports this explicitly instead of surfacing a bare 404.
373
+
374
+ | Command | Description |
375
+ |---------|-------------|
376
+ | `elestio cicd templates [query]` | List catalog software deployable as a pipeline |
377
+ | `elestio cicd deploy-template <software> --target <vmID>` | Deploy catalog software as a pipeline |
378
+ | `elestio cicd targets` | List CI/CD targets |
379
+ | `elestio cicd pipelines <vmID>` | List pipelines |
380
+ | `elestio cicd pipeline-info <vmID> <pipelineID>` | Pipeline details |
381
+ | `elestio cicd pipeline-restart <vmID> <pipelineID>` | Restart pipeline |
382
+ | `elestio cicd pipeline-stop <vmID> <pipelineID>` | Stop pipeline |
383
+ | `elestio cicd pipeline-delete <vmID> <pipelineID> --force` | Delete pipeline |
384
+ | `elestio cicd pipeline-resync <vmID> <pipelineID>` | Re-sync pipeline |
385
+ | `elestio cicd pipeline-logs <vmID> <pipelineID>` | View pipeline logs |
386
+ | `elestio cicd pipeline-history <vmID> <pipelineID>` | Build history |
387
+ | `elestio cicd create --auto --target <vmID> --name X --repo owner/repo` | Pipeline from your own repo |
388
+ | `elestio cicd create <config.json>` | Create from config file |
389
+ | `elestio cicd template [mode]` | Generate config template |
390
+ | `elestio cicd domains <vmID> <pipelineID>` | List pipeline domains |
391
+ | `elestio cicd registries` | List Docker registries |
392
+
393
+ **`deploy-template` options:**
394
+
395
+ | Option | Description |
396
+ |--------|-------------|
397
+ | `--target <vmID>` | **Required.** CI/CD target to deploy onto (`elestio cicd targets`) |
398
+ | `--owner <user-or-org>` | Switches to the git route and names the account to create the repo in |
399
+ | `--no-git` | Force the compose route even when `--owner` is given |
400
+ | `--name <name>` | Pipeline name (defaults to the software name) |
401
+ | `--branch <branch>` | Template branch (default `main`) |
402
+ | `--private` | Create the generated repo as private |
403
+ | `--non-org` | The owner is a personal account, not an organisation |
404
+ | `--auth-id <id>` | Git auth ID, when you have more than one account connected |
405
+ | `--git-type <type>` | `GITHUB` (default) or `GITLAB` |
406
+ | `--repo-name <name>` | Template repo to use, when it differs from the software name |
407
+ | `--build-cmd`, `--run-cmd`, `--install-cmd`, `--build-dir` | Override the values from `elestio.yml` (git route only) |
408
+ | `--variables <KEY=VALUE...>` | Override the environment variables, newline-separated (git route only) |
409
+ | `--force` | Deploy on the compose route even when the compose mounts a repo file |
410
+ | `--dry-run` | Print the plan, create nothing |
411
+
412
+ #### Pipelines from your own repository
413
+
414
+ ```bash
415
+ elestio cicd create --auto --target <vmID> --name my-app --repo acme/my-app \
416
+ --mode github --build-cmd "npm run build" --run-cmd "npm start"
417
+ ```
418
+
419
+ Modes: `github`, `github-fullstack`, `gitlab`, `gitlab-fullstack`, `docker`.
420
+
421
+ #### Docker registries
422
+
423
+ | Command | Description |
424
+ |---------|-------------|
425
+ | `elestio cicd registry-add --name X --username U --password P --url REPO` | Docker Hub |
426
+ | `... --registry-type registry.gitlab.com --repo-id ID` | GitLab.com |
427
+ | `... --registry-type gitlab-self-hosted --repo-id ID --gitlab-url gitlab.company.com` | Self-hosted GitLab |
428
+ | `... --registry-type ghcr.io` | GitHub Container Registry |
429
+
430
+ | Option | Description |
431
+ |--------|-------------|
432
+ | `--name` | Unique identity nickname for the registry credential |
433
+ | `--username` | Registry username |
434
+ | `--password` | Registry password or access token |
435
+ | `--url` | Repository path (e.g. `myuser/myrepo`) - **not** the registry host |
436
+ | `--registry-type` | `docker.io` (default), `registry.gitlab.com`, `gitlab-self-hosted`, `ghcr.io` |
437
+ | `--repo-id` | GitLab project/repo ID - required for both GitLab types |
438
+ | `--gitlab-url` | Self-hosted GitLab hostname - required for `gitlab-self-hosted` |
439
+
440
+ ### Billing
441
+
442
+ | Command | Description |
443
+ |---------|-------------|
444
+ | `elestio billing` | Billing summary across all projects |
445
+ | `elestio billing project <id>` | Per-project billing details |
446
+
447
+ ## Global Options
448
+
449
+ | Option | Description |
450
+ |--------|-------------|
451
+ | `--json` | Output in JSON format (for scripting) |
452
+ | `--project <id>` | Specify project ID |
453
+ | `--help`, `-h` | Show help |
454
+ | `--version`, `-v` | Show version |
455
+ | `--debug` | Show full error stack traces |
456
+
457
+ ### Passing values that start with `-`
458
+
459
+ `--flag value` treats a value like `-p` or `--port` as the next flag. For any
460
+ value that begins with a dash - passwords, negative numbers - use the
461
+ `--flag=value` form instead:
462
+
463
+ ```bash
464
+ elestio cicd registry-add --name ghcr --username me --password='-Xk9secret'
465
+ ```
466
+
467
+ Everything after a bare `--` is treated as a positional argument.
468
+
469
+ ## Configuration
470
+
471
+ Credentials and config are stored in `~/.elestio/` (directory mode 0700):
472
+
473
+ - `~/.elestio/credentials` - Email and API token (mode 0600)
474
+ - `~/.elestio/config.json` - JWT cache, default project, provider defaults (mode 0600; the cached JWT is a bearer credential)
475
+
476
+ Requests to the API time out after 60s rather than hanging.
477
+
478
+ Get your API token from [Elestio Dashboard > Security](https://dash.elest.io/account/security).
479
+
480
+ ## Troubleshooting
481
+
482
+ **My pipeline deployed but nothing is running.**
483
+ The pipeline was created without the template's configuration. Use
484
+ `elestio cicd deploy-template <software>` rather than `cicd create` for catalog
485
+ software: it reads the template's `elestio.yml` for ports, environment
486
+ variables and lifecycle hooks. `cicd create` builds a bare pipeline and expects
487
+ you to supply all of that yourself.
488
+
489
+ **The software starts, then exits, or the build fails.**
490
+ Check the build log: `elestio cicd pipeline-history <vmID> <pipelineID>`, then
491
+ `elestio cicd pipeline-log <vmID> --pipeline <id> --file <log>`. On the compose
492
+ route the usual causes are a repo file the compose mounts (the CLI refuses
493
+ these upfront unless you passed `--force`) or a template that genuinely needs
494
+ its lifecycle scripts. Both need the git route, which is currently
495
+ unavailable (see above), so for now there is no workaround for those
496
+ templates.
497
+
498
+ **`variables.trim is not a function` (500 Pipeline.CreateFailed).**
499
+ The `variables` field must be a newline-separated string, never an array. The
500
+ CLI enforces this from 1.1.0; if you are on an older version, upgrade with
501
+ `npm install -g elestio@latest`.
502
+
503
+ **`does not support clustering`.**
504
+ Only some templates can be clustered. Run `elestio clusters templates` for the
505
+ current list.
506
+
507
+ **`needs at least 3 nodes`.**
508
+ ClickHouse, Vault, OpenSearch, RabbitMQ, rke2 and Nats elect a leader by
509
+ quorum and cannot run on two nodes.
510
+
511
+ **Authentication keeps failing.**
512
+ API tokens can be revoked or expire. Get a new one from
513
+ [Dashboard > Security](https://dash.elest.io/account/security) and re-run
514
+ `elestio login`. Check what is stored with `elestio config`.
515
+
516
+ **A value starting with `-` is ignored.**
517
+ Use `--flag=value`. See [Global Options](#global-options).
518
+
519
+ ## Documentation
520
+ https://docs.elest.io/books/elestio-cli-skill/page/overview
521
+ ## License
522
+
523
+ MIT