Files
XC_VM/docs/en/administration/ssl-generation.md
T
Divarion-D 040143215a docs: Full Docsify documentation (EN + RU) and migration replacement
Full bilingual documentation for XC_VM has been added
with Docsify SPA and the outdated database migration has been replaced.

## Docsify

- docs/index.html — SPA entry point: en-us/ru-ru routing,
search, syntax highlighting (bash, PHP, SQL, nginx, JSON)

## EN Documentation

- docs/en/info/faq.md — FAQ (12 questions: streams, access, database, SSL, updates, permissions)
- docs/en/info/migration_guide.md — migration guide from other systems
- docs/en/info/update.md — step-by-step update via the web panel
- docs/en/info/watch_folder.md — Watch Folder: workflow, PTN/guessit parsers, configuration
- docs/en/updates_checklist.md — release preparation checklist

## RU Documentation (fully localized)

- docs/ru/README.md — Main Page
- docs/ru/_sidebar.md — Sidebar Navigation
- docs/ru/administration/ssl-generation.md — Self-Signed SSL Generation
- docs/ru/administration/update-system.md — Update Mechanism (PHP → Python → Post-Update)
- docs/ru/api/playlist.md — Playlist API with Error Codes
- docs/ru/api/system_api.md — System API (13 endpoints)
- docs/ru/api/xtreamcodes_api.md — XtreamCodes API (Authorization, Live, VOD, TV Series, EPG)
- docs/ru/builds/build_binaries.md — nginx build, nginx_rtmp, PHP-FPM, network
- docs/ru/builds/build_ffmpeg.md — Building FFmpeg 8.0 with NVENC/CUDA
- docs/ru/builds/build_system.md — MAIN vs. LB build system
- docs/ru/development/cli-tools.md — CLI: 26 commands, 25 crons, 8 daemons, database migrations
- docs/ru/info/faq.md — FAQ (12 questions)
- docs/ru/info/migration_guide.md — Migration guide
- docs/ru/info/update.md — Updating via the control panel
- docs/ru/info/watch_folder.md — Watch Folder
- docs/ru/updates_checklist.md — Release checklist

## Migrations

- Removed: 001_drop_watch_folders_plex_token.sql (Deprecated)
- Added: 001_update_crontab_filenames.sql — removes the .php suffix from filenames in the crontab table (switches to console.php commands)
2026-03-15 00:02:19 +03:00

4.1 KiB

Generating SSL Certificate for Nginx in XC_VM

This guide explains how to create a self-signed SSL certificate to enable secure HTTPS connections for the built-in Nginx server in the XC_VM project.


Navigation


Introduction

SSL (Secure Sockets Layer) encrypts the connection between client and server, ensuring data confidentiality and user trust.
This tutorial shows how to create a self-signed SSL certificate for the embedded Nginx server in the XC_VM project.


Configuration Location

All SSL-related files (key, certificate, and config) are stored in:

/home/xc_vm/bin/nginx/conf

Navigate to this directory before proceeding:

cd /home/xc_vm/bin/nginx/conf

Step 1. Generate Private Key

Generate a 2048-bit RSA private key:

openssl genrsa -out server.key 2048

After execution, the file server.key will appear — this is your private key.
Keep it strictly confidential — it is used to sign the SSL certificate.


Step 2. Create server.cnf Configuration File

Create a configuration file containing certificate parameters:

cat > server.cnf << EOF
[req]
distinguished_name = req_distinguished_name
x509_extensions = v3_req
prompt = no

[req_distinguished_name]
C = RU
ST = Moscow
L = Moscow
O = XC_VM
OU = XC_VM
CN = XC_VM

[v3_req]
keyUsage = keyEncipherment, dataEncipherment
extendedKeyUsage = serverAuth
subjectAltName = @alt_names

[alt_names]
DNS.1 = XC_VM
EOF

Parameter explanation:

Field Value Purpose
C RU Country
ST Moscow State/Province
L Moscow City/Locality
O XC_VM Organization
OU XC_VM Organizational Unit
CN XC_VM Common Name (primary hostname)
DNS.1 XC_VM Subject Alternative Name (SAN)

Tip: For real domain names, replace DNS.1 = XC_VM with your actual domain (e.g., DNS.1 = panel.example.com) to avoid browser warnings.


Step 3. Generate Self-Signed SSL Certificate

Generate the certificate using the private key and configuration file:

openssl req -new -x509 -key server.key -out server.crt -days 3650 -config server.cnf

Explanation:

  • -new -x509 — creates a new self-signed certificate
  • -days 3650 — certificate validity period (10 years)
  • -config server.cnf — uses the custom configuration
  • Result: server.crt file containing the public certificate

Final Files

After completing all steps, the following files should be present in /home/xc_vm/bin/nginx/conf:

File Purpose
server.key Private key
server.crt Self-signed SSL certificate
server.cnf Certificate configuration file

Result

Your XC_VM Nginx server is now accessible via HTTPS using the newly created self-signed certificate.
Browsers will display a “not trusted” warning — this is expected behavior for self-signed certificates.


Notes

  • Self-signed certificates are suitable for internal use or testing only.
  • For public-facing domains, use certificates from trusted CAs (e.g., Let's Encrypt).
  • If you change the domain/hostname (CN or DNS.1), you must regenerate the certificate.
  • To inspect the generated certificate:
openssl x509 -in server.crt -text -noout