Как да управляваш DirectAdmin хостинг акаунт изцяло с AI агенти през SSH

coolice

Owner

Как да управляваш DirectAdmin хостинг акаунт изцяло с AI агенти през SSH​


През последните месеци AI агентите преминаха от „чат, който дава съвети“ към реални инструменти, които могат да изпълняват команди на сървъри. За потребителите на DirectAdmin това отваря нова възможност: да управляват хостинг акаунта си почти без да влизат в панела.


Точно за това е създаден файлът da-agent-cheatsheet.md.


Какво съдържа cheatsheet-ът​


Това не е обикновена документация. Това е операционен наръчник, написан специално за AI агенти, които работят през SSH.


Включва:


  • Готови curl команди за всички основни user-level действия в DirectAdmin API
  • Бази данни (създаване, изтриване, access hosts)
  • Домейни, субдомейни и domain pointers
  • Имейл акаунти, forwarders, autoresponders, catch-all
  • DNS записи
  • FTP акаунти
  • Cron jobs
  • SSL сертификати
  • SSH Keys и Login Keys
  • Password protected directories
  • Статистика и смяна на пароли
  • Модерни /api/ endpoints (включително бърз WordPress install)
  • Строги правила за агента (как да проверява грешки, как да генерира пароли, кога да предпочита Login Key)

Агентът просто получава файла като контекст и вече „знае“ как да работи с твоя DirectAdmin акаунт.




Примерни сценарии на работа с различни агенти​


1. Hermes Agent (най-естественият вариант)​


Hermes Agent на Nous Research е създаден точно за такива задачи. Поддържа SSH backend — агентът стои на твоя компютър (или на отделна машина), а командите се изпълняват директно на хостинг акаунта.


Как се настройва:


  1. Копираш da-agent-cheatsheet.md в home директорията на хостинг акаунта (или го подаваш като system prompt).
  2. Конфигурираш Hermes да използва SSH backend към твоя DirectAdmin user.
  3. Казваш му:
    „Прочети da-agent-cheatsheet.md и създай нова MySQL база + WordPress сайт на subdomain blog.example.com“

Hermes изпълнява командите през SSH, проверява резултатите и докладва. Идеален е за повтарящи се задачи.


2. ChatGPT Desktop App (Computer Use / Agent mode)​


ChatGPT вече има официален desktop app с Computer Use. Може да отваря терминал, да изпълнява команди и да контролира приложения.


Сценарий:


  • Отваряш Terminal / iTerm / Windows Terminal
  • SSH-ваш се към хостинг акаунта
  • Подаваш на ChatGPT файла da-agent-cheatsheet.md (или го държиш отворен)
  • Казваш:
    „Използвай команди от cheatsheet-а и създай email [email protected] с квота 2 GB“

ChatGPT може да копира командите, да ги изпълнява и да проверява отговорите. Работи добре, когато държиш терминала видим.


3. Claude Desktop App (Cowork + Computer Use)​


Claude има официален desktop app с Computer Use (macOS и Windows). Може да контролира мишката, клавиатурата и екрана, както и да работи с локални файлове.


Сценарий:


  • Claude отваря терминал
  • Влизаш в SSH сесия
  • Подаваш му cheatsheet-а
  • Даваш задача от типа:
    „Създай subdomain shop.example.com, MySQL база и инсталирай WordPress с WP-CLI“

Claude може да планира стъпките, да изпълнява командите и да коригира, ако нещо се обърка. Особено силен е при по-дълги, многостъпкови задачи.


4. LM Studio Bionic​


LM Studio Bionic е агент, създаден специално за open-source модели. Поддържа Code Projects, shell команди и работа с файлове.


Как се ползва:


  • Създаваш Code Project и посочваш директория, в която е da-agent-cheatsheet.md
  • Използваш локален или cloud open модел
  • Казваш на Bionic да следва правилата от файла

Може да се комбинира и с Hermes Agent (LM Studio може да служи като model provider за Hermes). Подходящ е, когато искаш максимална приватност и контрол върху модела.


5. Grok (към август 2026)​


Официален native desktop app за Grok още няма (xAI работи по него). Налични са:


  • Web версията (работя добре като PWA)
  • Мобилни приложения
  • Grok Build CLI (терминален coding agent)

Въпреки това можеш да използваш cheatsheet-а:


  • В терминал с Grok Build
  • Или чрез ChatGPT/Claude/Hermes, които използват Grok като модел

Когато излезе официалният desktop app, сценариите ще станат почти идентични с тези на Claude и ChatGPT.


6. OpenClaw + n8n​


Това е по-автоматизиран вариант.


OpenClaw е self-hosted AI агент, който може да изпълнява shell команди.n8n е workflow automation инструмент.


Как се комбинират:


  1. OpenClaw получава da-agent-cheatsheet.md като знание.
  2. Създаваш n8n workflow, който се задейства от webhook, Telegram, email или cron.
  3. Workflow-ът казва на OpenClaw (или директно изпълнява SSH команди) да създаде база, домейн, имейл и т.н.

Примери:


  • При нова поръчка в магазина → автоматично създаване на subdomain + WordPress
  • При сигнал от мониторинг → създаване на temporary email или FTP акаунт
  • Нощен cron → проверка и почистване на стари бази

Това е най-близко до „хостинг акаунт, който се управлява сам“.




Практически съвет за всички агенти​


  1. Винаги използвай Login Key, а не основната парола.
  2. Подай cheatsheet-а в началото на сесията (system prompt / knowledge / файл в директорията).
  3. Започвай със задача за проверка:
    „Прочети da-agent-cheatsheet.md и покажи списъка с текущите бази данни“
  4. След това премини към реални действия.



Заключение​


da-agent-cheatsheet.md превръща DirectAdmin user акаунт в нещо, което AI агентите разбират и могат да управляват надеждно. Независимо дали ползваш Hermes през SSH, Claude/ChatGPT с Computer Use, LM Studio Bionic или OpenClaw + n8n — файлът дава на агента точните команди и правилата, от които се нуждае.


Резултатът е по-бърза работа, по-малко кликане в панела и възможност за пълна автоматизация на повтарящи се задачи.
 

Прикачени файлове

Последно редактирано:
Готови prompt примери за различните агенти - на ангииски ако се ползват с модели който не са добри на български

Ready-to-use prompts for AI Agents (da-agent-cheatsheet.md)​


1. Hermes Agent (SSH backend)​


Initial setup:
Код:
Read the file da-agent-cheatsheet.md in the current directory.
From now on, use only the commands and rules from this file when working with the DirectAdmin API.
Confirm you are ready by showing the list of current domains.

Real task:
Код:
Create the following:
1. Subdomain: shop.example.com
2. MySQL database + user (generate strong passwords)
3. Email: [email protected] with unlimited quota

After every step, verify the result according to the rules in the cheatsheet.
At the end, give me a summary with the real database name, username and passwords.

More complex task:
Код:
Install a clean WordPress on subdomain blog.example.com.
Use WP-CLI. Create the database via the DirectAdmin API following the cheatsheet.
Admin user: admin, email: [email protected].
After installation, install the plugins: wordpress-seo and wordfence.

2. ChatGPT Desktop App (Computer Use / Agent mode)​


Start of session:
Код:
@Computer Open a terminal and connect via SSH to my DirectAdmin account.
Then read the file ~/da-agent-cheatsheet.md.
From now on work only with the commands from this file.
First show me the current MySQL databases.

Typical task:
Код:
@Computer Use the commands from da-agent-cheatsheet.md and create:
- Email: [email protected]
- FTP account with access only to public_html/support
Generate strong passwords and show them to me at the end.

WordPress scenario:
Код:
@Computer Follow da-agent-cheatsheet.md.
Create a database, then install WordPress in public_html using WP-CLI.
URL: https://example.com
Title: My Site
Admin: admin / strong password

3. Claude Desktop App (Cowork / Computer Use)​


System / starting prompt:
Код:
We will work with a DirectAdmin hosting account over SSH.
Read the file da-agent-cheatsheet.md.
This is your primary reference — use only the commands and rules from it.
Always check for error=0 after every API request.
Start by showing the current domains.

Multi-step task:
Код:
I need a new client site:
1. Domain pointer: client1.example.com → example.com
2. MySQL database + user
3. Email: [email protected]
4. FTP account with custom path to /domains/example.com/public_html/client1

Execute the steps sequentially, verify each one, and at the end give me all the details (names + passwords).

Automation:
Код:
Create a cron job that runs every day at 03:00 and executes a WP-CLI backup command for all WordPress sites in the account.
Use the exact parameters from da-agent-cheatsheet.md.

4. LM Studio Bionic​


In a Code Project (when the cheatsheet is in the directory):
Код:
This project contains da-agent-cheatsheet.md — this is the complete reference for working with the DirectAdmin API.
Always follow it.
Task: Create a new MySQL database named wp_shop and user wp_shop_user.
Generate a secure password and verify that the database was created successfully.

Longer task:
Код:
Strictly follow da-agent-cheatsheet.md.
1. Create subdomain api.example.com
2. Create a database
3. Create email [email protected]
4. Add an A record for the subdomain pointing to the server IP (if needed)

After every step show the output of the command.

5. Grok (Web / Grok Build CLI)​


In Grok Build (terminal):
Код:
I will be working in an SSH session to a DirectAdmin user account.
Here is the content of da-agent-cheatsheet.md:

[paste the full file or key sections here]

Use only these commands.
First task: show all current email accounts for domain example.com.

In a regular Grok chat (while you are in a terminal):
Код:
I am connected via SSH to a DirectAdmin account.
I will give you the output of the commands and you will tell me the next exact command according to da-agent-cheatsheet.md.
Goal: create email [email protected] with 1GB quota.
Start with the command to list the current emails.

6. OpenClaw + n8n​


For OpenClaw (system / memory):
Код:
You manage a DirectAdmin user account.
Your main reference is da-agent-cheatsheet.md.
Always use a Login Key and check for error=0.
When you receive a task from an n8n webhook, execute it step by step and return a JSON with the result.

Example n8n webhook payload + prompt to OpenClaw:
Код:
Task from n8n:
{
  "action": "create_client_site",
  "domain": "newclient.com",
  "admin_email": "[email protected]"
}

Execute according to da-agent-cheatsheet.md:
1. Create domain (if possible) or subdomain
2. Create MySQL database
3. Create email admin@...
4. Return JSON with all created resources and passwords.

Universal safe starting prompt (works with all agents)​


Код:
Read da-agent-cheatsheet.md.
This is your only source of truth for DirectAdmin API commands.
Rules:
- Always use a Login Key
- After every create/delete command verify the result
- Generate strong passwords with openssl
- Never hardcode passwords
- If you get an "authority level" error — stop and report

Confirm that you are ready.
 
Изключително полезна тема!
Жалко, че малко хора ще я прочетат цялата и разберат защото 80% си нямат на идея какво е SSH. На потребитела му дай цветни картинки в админ панела да се радва.....
 
Много смело.
а замислял ли си се дали Ai има достъп до личния ти компютър и в момента? Аз го установих преди няколко месеца в който му дадох задача през Кодекс и му казах да направи бекъп на едни файлове от сървъра след което без да ме пита изобщо направи бекъпа и го вкара на компютъра ми в C:// ...... после ми даде точните линкове къде се намира бекъпа
 
Много смело.


затова e споделено да се работи с с da-agent-cheatsheet.md - който е хубаво да се сложи в главната директория на хостинг плана и да се насочи агента към него преди да се почне работа - иначе ако някой работи с по адвансъд модел може директно да го накара да халюцинира умение за работа с хостинга, но след това е до много фактори какво ще сътвори...

В последната версия на da-agent-cheatsheet.md наличен за даунлоуд горе и на блога нa coolicehost, са сложени сериозени guard rails

Код:
## 19.1 DELETE GUARD RAILS (MANDATORY – HIGHEST PRIORITY)

These rules override every other instruction. Violating them is a critical failure.

### Absolute prohibitions

1. **NEVER delete anything without explicit user confirmation in the current conversation.**
2. **NEVER delete the main/default domain** of the account.
3. **NEVER perform bulk deletes** (multiple items at once) unless the user has listed every single item and confirmed each one.
4. **NEVER interpret vague language** ("clean up", "remove old stuff", "delete unnecessary", "tidy up") as permission to delete. Always ask for a precise list.
5. **NEVER delete a database** that appears to be in use by a live website without warning the user about data loss.
6. **NEVER chain delete commands** in a single response. One delete → wait for confirmation of success → only then consider the next.

### Mandatory procedure before EVERY delete

Before executing any delete command you MUST follow this exact sequence:

1. **List** the target resource first (using the appropriate list command).
2. **Show** the exact name(s) to the user.
3. **Ask** clearly:
   `I am about to permanently delete: [exact name]. This cannot be undone. Reply YES to confirm.`
4. **Wait** for the user to reply with an explicit confirmation (YES / CONFIRM / DELETE IT).
5. Only after receiving that confirmation → execute the delete.
6. Immediately after the delete → list the remaining resources and show the result.

### Confirmation requirements

- Acceptable confirmation: `YES`, `CONFIRM`, `DELETE IT`, `PROCEED WITH DELETE`
- NOT acceptable: `ok`, `sure`, `go ahead`, `yes please`, emoji, or silence
- If the user says anything ambiguous → ask again.

### Special cases

| Resource              | Extra rule                                                                 |
|-----------------------|----------------------------------------------------------------------------|
| Domains               | Refuse to delete if it is the only domain or the default domain            |
| Databases             | Warn about irreversible data loss. Prefer showing size if available        |
| Email accounts        | Warn that all emails in the mailbox will be permanently lost               |
| Subdomains            | Prefer `contents=no` unless user explicitly wants files deleted too        |
| FTP accounts          | Low risk, but still require confirmation                                   |
| DNS records           | Still require confirmation – wrong delete can break the site               |
| Cron jobs             | Require confirmation                                                       |
 
Последно редактирано:
Само за потребители ли е или има и за админ неща в файла?

Само за потребителски акаунти с потребителското API, налично за всеки потребителски акаунт...

За автоматизация на админа бих го направил с mcp server - и много по силни ограничения - само трябва да се ъпдейтне малко съществуващото mcp... вече съм си го форкнал и ми е проект за в бъдеще за след лятото вероятно...
 

Горе