Deploi Ops — Server Management & Deployment
When this skill is invoked, display this banner:
◇
◇ ◇ ____ _ _
◇ ◇ | _ \ ___ _ __ | | ___ (_)
◇ ◇ | | | |/ _ \ '_ \| |/ _ \| |
◇ ◇ | |_| | __/ |_) | | (_) | |
◇ ◇ |____/ \___| .__/|_|\___/|_|
◇ |_|
◇ ◇ Ops — Deploy & Manage
◇ ◇ deploi.no
◇ ◇
This skill handles everything after server creation: deploying apps, domains & DNS,
SSL/HTTPS, firewalls, monitoring, databases, and all server administration on Deploi VPS.
Prerequisites:
.env with DEPLOI_USERNAME and DEPLOI_ACCOUNT_PASSWORD (Deploi account login)
deploi-servers.json for server access (IP, username, per-server sudo password)
If .env is missing, refer user to deploi-server skill or kundepanel.deploi.no.
If deploi-servers.json is missing, the user needs to create a server first via the deploi-server skill.
Credentials source:
- API auth:
.env → DEPLOI_USERNAME + DEPLOI_ACCOUNT_PASSWORD
- Server sudo password:
deploi-servers.json → per-server password field (NOT .env)
API Foundations
Endpoint: https://api.deploi.no — all commands use HTTP POST requests with a JSON body.
Node.js API Helper
node -e "
const https = require('https');
const data = JSON.stringify(<PAYLOAD>);
const req = https.request('https://api.deploi.no', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(data) }
}, (res) => {
let body = '';
res.on('data', c => body += c);
res.on('end', () => console.log(body));
});
req.write(data);
req.end();
"
Authentication
Read DEPLOI_USERNAME and DEPLOI_ACCOUNT_PASSWORD from .env, then:
{ "command": "Login", "username": "<email>", "password": "<password>" }
Extract data.token and data.clients[0].id from the response. Use these for all authenticated calls.
If any API call returns messageId: 41 ("Not logged in"), the token has expired — re-authenticate.
Complete API Command Reference
| Command |
Auth |
Required Params |
Description |
Login |
No |
username, password |
Get token + clientid |
Logout |
Yes |
token |
Invalidate token |
GetUserInfo |
Yes |
token, clientid |
Account details |
GetServers |
Yes |
token, clientid |
List all servers |
GetServerInfo |
Yes |
token, id |
Server details (IP, specs) |
CreateVirtualServer |
Yes |
token, clientid, + specs |
Create new VPS |
RestartVirtualServer |
Yes |
token, id |
Restart a server |
DomainAvailable |
No |
domain |
Check domain availability |
GetDomainPrice |
No |
domain |
Get domain pricing |
GetDomains |
Yes |
token, clientid |
List owned domains |
GetDomainRecords |
Yes |
token, domainname |
List DNS records |
AddDomainRecord |
Yes |
token, domainname, + record |
Add DNS record |
DeleteDomainRecord |
Yes |
token, domainname, id |
Remove DNS record |
OrderDomain |
Yes |
token, clientid, + details |
Register/transfer domain |
GetFirewalls |
Yes |
token, clientid |
List managed firewalls |
CreateFirewall |
Yes |
token, clientid, + config |
Create managed firewall |
AddFirewallRule |
Yes |
token, + rule |
Add firewall rule |
OrderEmailService |
Yes |
token, clientid, + config |
Order email hosting |
GetInvoices |
Yes |
token, clientid |
List invoices |
Routing: What Do You Need?
Based on the user's request, load the appropriate reference:
| User wants to... |
Reference file |
| Deploy an app end-to-end |
references/deploy.md |
| Register/manage domains, DNS records |
references/domains-dns.md |
| Set up SSL/HTTPS, Certbot, Nginx |
references/ssl-https.md |
| Configure firewall (UFW or managed) |
references/firewall.md |
| Install/manage databases (PostgreSQL, MySQL) |
references/databases.md |
| Email, billing, invoices, other services |
references/billing.md |
For server operations (restart, CPU monitoring, status checks, upgrade), see below.
Server Operations via API
Server Status Check
{ "command": "GetServerInfo", "token": "<t>", "id": "<server-id>" }
Returns serverInfo.virtual.mainip, RAM, CPU, status, and more.
Note: Servers with status: "off" return success: false. GetServers still lists them.
RestartVirtualServer
{ "command": "RestartVirtualServer", "token": "<t>", "id": "<server-id>" }
Get server-id from GetServers (the id field, not the name).
After restart: Wait 30–60 seconds, then verify with GetServerInfo that status is "active".
Upgrade/Downgrade Server
{ "command": "UpdateVirtualServer", "token": "<t>", "id": "<server-id>", "setCpu": true, "cpucent": cpucents, "setRam": false, "ram": gbram, "diskChange": [{"id": "<disk id>", "size": gbsize } ]}
Get server-id from GetServers (the id field, not the name).
After upgrade/downgrade: Wait 30–90 seconds, then verify with GetServerInfo that running is true.
Logout
{ "command": "Logout", "token": "<t>" }
Decision Frameworks
When to Create a New Server
| Situation |
Recommendation |
| First app ever |
Core (4 GB RAM, 2 CPU, 40 GB) — room to grow |
| Adding small side project |
Use existing server if <3 apps and has headroom |
| Database needs isolation |
Dedicated Start (1 GB) or Core (4 GB) |
| App gets heavy traffic |
Dedicated server, possibly larger custom spec |
| Different OS needed |
New server (can't change OS on existing) |
| Staging/dev environment |
Start (1 GB) — cheap and disposable |
Server Conventions
All Deploi VPS servers follow these conventions:
- Username:
cursor
- Auth: SSH key (
~/.ssh/id_ed25519) — password login disabled
- Sudo password: Per-server, stored in
deploi-servers.json
- OS: Ubuntu 24.04 (default)
- App directory:
/home/cursor/apps/<app-name>/
- Backups:
/home/cursor/backups/
To connect: ssh <server-name> (uses the SSH config alias)
Important Notes
- Always ask before making changes that affect running services
- Back up configs before modifying them (
cp nginx.conf nginx.conf.bak)
- Test configs before reloading (
nginx -t before systemctl reload nginx)
- Sudo password comes from
deploi-servers.json — NOT from .env
- No server deletion via API — users must use kundepanel.deploi.no
- curl is blocked by the API — all API calls must use the Node.js helper pattern
- clientid is a number — wrong clientid returns "Not logged in" (messageId 41)
- Duplicate server names are allowed — always check
GetServers before creating
API Error Reference
| messageId |
Message |
Meaning |
| 4 |
Password must be at least 8 characters... |
Server password too weak |
| 8 |
Memory must be more than 0... |
RAM out of range (1-160 GB) |
| 9 |
CPU must be more than 0... |
CPU out of range (1-80) |
| 11 |
OS is not one of the supported options |
Invalid OS string |
| 13 |
The API currently only supports creating one disk |
Wrong disk count |
| 14 |
Disk size must be between 5 and 10,000 GB |
Disk size out of range |
| 23 |
Request is not according to the API specifications |
Missing required fields |
| 25 |
Creating virtual server failed |
Generic failure — check account or contact support |
| 41 |
Not logged in |
Token expired or invalid — re-authenticate |
| 80 |
Server created |
Success |
| 127 |
Email or Password Invalid |
Wrong credentials |
| 138 |
Request blocked |
Using curl — switch to Node.js |
1---2name: deploi-ops3description: Everything after server creation on Deploi VPS: deploy applications, manage domains, DNS records, SSL certificates, HTTPS setup, firewall configuration, server restart, CPU monitoring, databases, email services, billing, invoices. Use when the user wants to deploy code to a Deploi server, register or configure domains, set up DNS, get SSL/HTTPS working, manage firewalls, check server status, restart servers, monitor resources, install software, configure web servers, manage Docker containers, set up databases, or perform any server administration task on Deploi VPS. Also triggers for keywords: deploy, domain, DNS, SSL, certificate, HTTPS, firewall, monitoring, billing, email, restart, CPU, invoices, Deploi ops, server management.4---56# Deploi Ops — Server Management & Deployment78When this skill is invoked, display this banner:910```11 ◇12 ◇ ◇ ____ _ _13 ◇ ◇ | _ \ ___ _ __ | | ___ (_)14 ◇ ◇ | | | |/ _ \ '_ \| |/ _ \| |15 ◇ ◇ | |_| | __/ |_) | | (_) | |16 ◇ ◇ |____/ \___| .__/|_|\___/|_|17 ◇ |_|18 ◇ ◇ Ops — Deploy & Manage19 ◇ ◇ deploi.no20 ◇ ◇21```2223This skill handles **everything after server creation**: deploying apps, domains & DNS,24SSL/HTTPS, firewalls, monitoring, databases, and all server administration on Deploi VPS.2526**Prerequisites:**27- `.env` with `DEPLOI_USERNAME` and `DEPLOI_ACCOUNT_PASSWORD` (Deploi account login)28- `deploi-servers.json` for server access (IP, username, per-server sudo password)2930If `.env` is missing, refer user to `deploi-server` skill or kundepanel.deploi.no.31If `deploi-servers.json` is missing, the user needs to create a server first via the `deploi-server` skill.3233**Credentials source:**34- **API auth:** `.env` → `DEPLOI_USERNAME` + `DEPLOI_ACCOUNT_PASSWORD`35- **Server sudo password:** `deploi-servers.json` → per-server `password` field (NOT `.env`)3637---3839## API Foundations4041**Endpoint:** `https://api.deploi.no` — all commands use HTTP POST requests with a JSON body.4243### Node.js API Helper4445```bash46node -e "47const https = require('https');48const data = JSON.stringify(<PAYLOAD>);49const req = https.request('https://api.deploi.no', {50 method: 'POST',51 headers: { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(data) }52}, (res) => {53 let body = '';54 res.on('data', c => body += c);55 res.on('end', () => console.log(body));56});57req.write(data);58req.end();59"60```6162### Authentication6364Read `DEPLOI_USERNAME` and `DEPLOI_ACCOUNT_PASSWORD` from `.env`, then:6566```json67{ "command": "Login", "username": "<email>", "password": "<password>" }68```6970Extract `data.token` and `data.clients[0].id` from the response. Use these for all authenticated calls.7172If any API call returns `messageId: 41` ("Not logged in"), the token has expired — re-authenticate.7374### Complete API Command Reference7576| Command | Auth | Required Params | Description |77|---------|------|-----------------|-------------|78| `Login` | No | `username`, `password` | Get token + clientid |79| `Logout` | Yes | `token` | Invalidate token |80| `GetUserInfo` | Yes | `token`, `clientid` | Account details |81| `GetServers` | Yes | `token`, `clientid` | List all servers |82| `GetServerInfo` | Yes | `token`, `id` | Server details (IP, specs) |83| `CreateVirtualServer` | Yes | `token`, `clientid`, + specs | Create new VPS |84| `RestartVirtualServer` | Yes | `token`, `id` | Restart a server |85| `DomainAvailable` | **No** | `domain` | Check domain availability |86| `GetDomainPrice` | **No** | `domain` | Get domain pricing |87| `GetDomains` | Yes | `token`, `clientid` | List owned domains |88| `GetDomainRecords` | Yes | `token`, `domainname` | List DNS records |89| `AddDomainRecord` | Yes | `token`, `domainname`, + record | Add DNS record |90| `DeleteDomainRecord` | Yes | `token`, `domainname`, `id` | Remove DNS record |91| `OrderDomain` | Yes | `token`, `clientid`, + details | Register/transfer domain |92| `GetFirewalls` | Yes | `token`, `clientid` | List managed firewalls |93| `CreateFirewall` | Yes | `token`, `clientid`, + config | Create managed firewall |94| `AddFirewallRule` | Yes | `token`, + rule | Add firewall rule |95| `OrderEmailService` | Yes | `token`, `clientid`, + config | Order email hosting |96| `GetInvoices` | Yes | `token`, `clientid` | List invoices |9798---99100## Routing: What Do You Need?101102Based on the user's request, load the appropriate reference:103104| User wants to... | Reference file |105|-------------------|---------------|106| Deploy an app end-to-end | `references/deploy.md` |107| Register/manage domains, DNS records | `references/domains-dns.md` |108| Set up SSL/HTTPS, Certbot, Nginx | `references/ssl-https.md` |109| Configure firewall (UFW or managed) | `references/firewall.md` |110| Install/manage databases (PostgreSQL, MySQL) | `references/databases.md` |111| Email, billing, invoices, other services | `references/billing.md` |112113For server operations (restart, CPU monitoring, status checks, upgrade), see below.114115---116117## Server Operations via API118119### Server Status Check120121```json122{ "command": "GetServerInfo", "token": "<t>", "id": "<server-id>" }123```124125Returns `serverInfo.virtual.mainip`, RAM, CPU, status, and more.126127**Note:** Servers with `status: "off"` return `success: false`. `GetServers` still lists them.128129### RestartVirtualServer130131```json132{ "command": "RestartVirtualServer", "token": "<t>", "id": "<server-id>" }133```134135Get `server-id` from `GetServers` (the `id` field, not the name).136137**After restart:** Wait 30–60 seconds, then verify with `GetServerInfo` that status is `"active"`.138139140### Upgrade/Downgrade Server141142```json143{ "command": "UpdateVirtualServer", "token": "<t>", "id": "<server-id>", "setCpu": true, "cpucent": cpucents, "setRam": false, "ram": gbram, "diskChange": [{"id": "<disk id>", "size": gbsize } ]}144```145146Get `server-id` from `GetServers` (the `id` field, not the name).147148**After upgrade/downgrade:** Wait 30–90 seconds, then verify with `GetServerInfo` that `running` is `true`.149150### Logout151152```json153{ "command": "Logout", "token": "<t>" }154```155156---157158## Decision Frameworks159160### When to Create a New Server161162| Situation | Recommendation |163|-----------|---------------|164| First app ever | Core (4 GB RAM, 2 CPU, 40 GB) — room to grow |165| Adding small side project | Use existing server if <3 apps and has headroom |166| Database needs isolation | Dedicated Start (1 GB) or Core (4 GB) |167| App gets heavy traffic | Dedicated server, possibly larger custom spec |168| Different OS needed | New server (can't change OS on existing) |169| Staging/dev environment | Start (1 GB) — cheap and disposable |170171---172173## Server Conventions174175All Deploi VPS servers follow these conventions:176177- **Username:** `cursor`178- **Auth:** SSH key (`~/.ssh/id_ed25519`) — password login disabled179- **Sudo password:** Per-server, stored in `deploi-servers.json`180- **OS:** Ubuntu 24.04 (default)181- **App directory:** `/home/cursor/apps/<app-name>/`182- **Backups:** `/home/cursor/backups/`183184To connect: `ssh <server-name>` (uses the SSH config alias)185186---187188## Important Notes189190- **Always ask before making changes** that affect running services191- **Back up configs** before modifying them (`cp nginx.conf nginx.conf.bak`)192- **Test configs** before reloading (`nginx -t` before `systemctl reload nginx`)193- **Sudo password** comes from `deploi-servers.json` — NOT from `.env`194- **No server deletion via API** — users must use kundepanel.deploi.no195- **curl is blocked** by the API — all API calls must use the Node.js helper pattern196- **clientid is a number** — wrong clientid returns "Not logged in" (messageId 41)197- **Duplicate server names** are allowed — always check `GetServers` before creating198199## API Error Reference200201| messageId | Message | Meaning |202|-----------|---------|---------|203| 4 | Password must be at least 8 characters... | Server password too weak |204| 8 | Memory must be more than 0... | RAM out of range (1-160 GB) |205| 9 | CPU must be more than 0... | CPU out of range (1-80) |206| 11 | OS is not one of the supported options | Invalid OS string |207| 13 | The API currently only supports creating one disk | Wrong disk count |208| 14 | Disk size must be between 5 and 10,000 GB | Disk size out of range |209| 23 | Request is not according to the API specifications | Missing required fields |210| 25 | Creating virtual server failed | Generic failure — check account or contact support |211| 41 | Not logged in | Token expired or invalid — re-authenticate |212| 80 | Server created | Success |213| 127 | Email or Password Invalid | Wrong credentials |214| 138 | Request blocked | Using curl — switch to Node.js |