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.
Installation
Install the plugin via XFPM (recommended):
xfpm install xyngincFor detailed requirements and manual installation, see the Installation Guide.
Quick Start
Basic Registration
Integrate XyNginC into your XyPriss server options:
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:
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:
Security Considerations
sudo privileges to write Nginx configurations and reload system services. Ensure your environment (e.g., PM2) is configured to handle these permissions safely.Learn how to properly set up XyNginC on your production server.
