hosts_create
Create new hosts in Remnawave VPN panels by specifying addresses, ports, security configurations, and assigning nodes for network management.
Instructions
Create a new host in Remnawave
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| remark | Yes | Host remark/name | |
| address | Yes | Host address | |
| port | Yes | Host port | |
| configProfileUuid | Yes | Config profile UUID | |
| configProfileInboundUuid | Yes | Config profile inbound UUID | |
| path | No | URL path | |
| sni | No | SNI (Server Name Indication) | |
| host | No | Host header | |
| alpn | No | ALPN protocol | |
| fingerprint | No | TLS fingerprint | |
| isDisabled | No | Create in disabled state | |
| securityLayer | No | Security layer | |
| tag | No | Host tag | |
| serverDescription | No | Server description | |
| nodes | No | Array of node UUIDs to assign |
Implementation Reference
- src/tools/hosts.ts:91-123 (handler)Handler function for the hosts_create tool which constructs the body and calls client.createHost.
async (params) => { try { const body: Record<string, unknown> = { remark: params.remark, address: params.address, port: params.port, inbound: { configProfileUuid: params.configProfileUuid, configProfileInboundUuid: params.configProfileInboundUuid, }, }; if (params.path !== undefined) body.path = params.path; if (params.sni !== undefined) body.sni = params.sni; if (params.host !== undefined) body.host = params.host; if (params.alpn !== undefined) body.alpn = params.alpn; if (params.fingerprint !== undefined) body.fingerprint = params.fingerprint; if (params.isDisabled !== undefined) body.isDisabled = params.isDisabled; if (params.securityLayer !== undefined) body.securityLayer = params.securityLayer; if (params.tag !== undefined) body.tag = params.tag; if (params.serverDescription !== undefined) body.serverDescription = params.serverDescription; if (params.nodes !== undefined) body.nodes = params.nodes; const result = await client.createHost(body); return toolResult(result); } catch (e) { return toolError(e); } }, - src/tools/hosts.ts:42-90 (schema)Zod schema definition for the inputs of hosts_create tool.
{ remark: z.string().describe('Host remark/name'), address: z.string().describe('Host address'), port: z.number().describe('Host port'), configProfileUuid: z .string() .describe('Config profile UUID'), configProfileInboundUuid: z .string() .describe('Config profile inbound UUID'), path: z.string().optional().describe('URL path'), sni: z.string().optional().describe('SNI (Server Name Indication)'), host: z.string().optional().describe('Host header'), alpn: z .enum(['h3', 'h2', 'http/1.1', 'h2,http/1.1', 'h3,h2,http/1.1', 'h3,h2']) .optional() .describe('ALPN protocol'), fingerprint: z .enum([ 'chrome', 'firefox', 'safari', 'ios', 'android', 'edge', 'qq', 'random', 'randomized', ]) .optional() .describe('TLS fingerprint'), isDisabled: z .boolean() .optional() .describe('Create in disabled state'), securityLayer: z .enum(['DEFAULT', 'TLS', 'NONE']) .optional() .describe('Security layer'), tag: z.string().optional().describe('Host tag'), serverDescription: z .string() .optional() .describe('Server description'), nodes: z .array(z.string()) .optional() .describe('Array of node UUIDs to assign'), }, - src/tools/hosts.ts:39-41 (registration)Registration of the hosts_create tool.
server.tool( 'hosts_create', 'Create a new host in Remnawave',