XyNginC (Nginx Controller)

XyNginC (XyPriss Nginx Controller) is an official plugin that automates Nginx reverse proxy configuration and SSL certificate management. It eliminates manual Nginx editing, simplifying XyPriss deployment to just a few lines of TypeScript.

Reverse Proxy

Automated domain-to-port mapping with zero manual config.

One-Command SSL

Native Let's Encrypt and Certbot integration for HTTPS.

High Performance

Core logic executed via a high-speed Go-based CLI.

XyNginC is designed exclusively for Linux production servers (VPS or Dedicated). Windows and macOS are not supported.

Installation

Install the plugin via XFPM (recommended):

bash
xfpm install xynginc

For detailed requirements and manual installation, see the Installation Guide.

Quick Start

Basic Registration

Integrate XyNginC into your XyPriss server options:

typescript
import { createServer } from "xypriss";
import XNCP from "xynginc";

const app = createServer({
  plugins: {
    register: [
      XNCP({
        domains: [
          {
            domain: "api.example.com",
            port: 3000,
            ssl: true,
            email: "admin@example.com",
          },
        ],
      }),
    ],
  },
});

app.start();

Multiple Domains

Configure multiple environments or services simultaneously:

typescript
XNCP({
  domains: [
    { domain: "api.example.com", port: 3000, ssl: true, email: "admin@example.com" },
    { domain: "admin.example.com", port: 3001, ssl: true, email: "admin@example.com" },
    { domain: "dev.example.com", port: 3002, ssl: false },
  ],
  autoReload: true,
})

Architecture

XyNginC operates through a three-tier architecture ensuring high reliability:

1
TypeScript Plugin
The high-level wrapper that interfaces with your XyPriss app.
2
Go CLI Binary
A high-performance tool performing system-level operations (Nginx, Certbot).
3
Cloud Templates
Dynamically fetches optimized Nginx templates from GitHub.

Security Considerations

Elevated Privileges
XyNginC requires sudo privileges to write Nginx configurations and reload system services. Ensure your environment (e.g., PM2) is configured to handle these permissions safely.
Installation Guide

Learn how to properly set up XyNginC on your production server.