Skip to content
Verified

External VPS

Connect a Linux server you already own, and drive its files, SSH access and services.

External VPS connects a Linux server you already own to Xuda over SSH, then lets you script against it instead of clicking through the dashboard: read its live metrics, drive its filesystem and services remotely, publish it on a public HTTPS URL, and mint tokenized developer SSH access. Thirty-four of its methods are reachable with an account API key, and the whole surface is available to an AI agent over MCP as well.

Working with the filesystem

vps_fs_list, vps_fs_read, vps_fs_write, vps_fs_write_batch, vps_fs_mkdir, vps_fs_rename, vps_fs_delete, vps_fs_search, vps_fs_disk_usage and vps_fs_tail run over SFTP against the connected box. Every path is absolute, and a write is an overwrite, not an append, so call vps_fs_mkdir first when the parent directory might not exist.

curl -s https://xuda.ai/cpi/vps_fs_write \
  -H 'content-type: application/json' \
  -d '{"api_key":"YOUR_API_KEY","app_id":"YOUR_APP_ID","path":"/var/www/site/index.html","content":"<h1>Hello</h1>"}'
const res = await fetch('https://xuda.ai/cpi/vps_fs_write', {
  method: 'POST',
  headers: { 'content-type': 'application/json' },
  body: JSON.stringify({
    api_key: 'YOUR_API_KEY',
    app_id: 'YOUR_APP_ID',
    path: '/var/www/site/index.html',
    content: '<h1>Hello</h1>',
  }),
});
const { code, data } = await res.json();
import requests

res = requests.post(
    'https://xuda.ai/cpi/vps_fs_write',
    json={
        'api_key': 'YOUR_API_KEY',
        'app_id': 'YOUR_APP_ID',
        'path': '/var/www/site/index.html',
        'content': '<h1>Hello</h1>',
    },
)
Uploading a folder

vps_fs_write_batch writes up to 128 files in one call over a single SFTP session, creating parent directories as needed, the fast path for a folder upload. It is not atomic: one failed file does not abort the rest, so read its failed count and the per-path results array rather than trusting a code: 1 envelope alone.

Publishing and access

vps_enable_web_url / vps_disable_web_url and vps_set_web_port put the box on a public HTTPS URL. vps_ssh_access_create mints one tokenized developer SSH credential at a time, _list, _update, _rotate, _set_status and _delete manage it afterward, and vps_ssh_session_events / vps_ssh_command_log read back what happened over it. agent_firewall_list / _open / _close manage the box's open ports, and agent_domain_connect (see Domains) points one of your domains at it.

Methods

The table below is the full app_module catalog, the same one Development Platform links: every VPS file, SSH and firewall method above is on it, alongside the rest of what that microservice does.

agent_domain_list / agent_domain_connect are on the Domains table and get_deploy_info is on the Deploy table, see Domains and Cloud Hosting. save_deploy_settings stays on this same table above, alongside the rest of app_module.