Advanced configuration
SSL certificate
Before you get started, you will need to choose and purchase a domain name for your server and get the SSL certificate for this domain name. Then you will need to create a DNS A record for the IP address where your VXG Server is installed.
VXG Server uses the certificate and private key located in the directory /ssl/.
Step 1: Replace the contents of the following files:
certificate.pem - must contain full certificate chain to the root CA in PEM format;
private_key.pem - must contain matching private key in PEM format.
Please contact your certificate issuer to get the full chain of certificates and the private key in the required formats.
Step 2: Restart server
Ports
VXG Server uses the following TCP ports:
Port | Description |
---|---|
80 | HTTP Access port |
83 | Web API HTTP port |
86 | Web API HTTPS port |
443 | HTTPS Access port |
1935 | RTMP streaming port |
1936 | RTMPS streaming port |
8080 | WebRTC insecure port |
8083 | WebRTC secure port |
8888 | WS camera protocol port |
8883 | WSS camera protocol port |
9000 | Storage server HTTP port |
9443 | Storage server HTTPS port |
12050 | Account server HTTP port. (Only if you are running on the compatibility mode with earlier versions of VXG Server) |
12443 | Account server HTTPS port. (Only if you are running on the compatibility mode with earlier versions of VXG Server) |
Please make sure that there are no conflicts with other services on the same machine.
You can configure ports used by the VXG server at the start.sh script.
Running server behind NAT
It's possible to run VXG Server behind NAT, but there's a restriction that NAT external and internal ports should match.
For example, if your server is configured to use port 1935 for RTMP you can forward to it only from port 1935 on your NAT device.
If you have some ports on NAT server already occupied for another service, you can just remap the ports that VXG Server is using.
Check the Ports section above for the list of used ports and instructions on how to remap them.
Backup and restore
To backup or restore VXG Server properly, you should first stop the server with stop.bat/stop.sh. This will guarantee consistency of the server's volumes.
To backup VXG Server to an OUTPUT_FILE run the following commands:
.\backup.sh OUTPUT_FILE
To restore VXG Server from a BACKUP_FILE run the following commands:
.\restore.sh BACKUP_FILE
Customize the storage directory
Step 1: Stop VXG Server
./stop.sh
Step 2: Create a directory to store video files
mkdir <PATH>
Step 3, optional: Copy your already recorded files there
sudo cp /var/lib/docker/volumes/vxg_server_record/_data/ <PATH>
Step 4: Remove old docker volume for recordings
docker volume rm vxg_server_record
Step 5: Edit /docker-compose.override.yml file:
version: "3.3"
volumes:
record:
driver_opts:
type: none
o: bind
device: <PATH>
Step 6: Start the server, the newly recorded files will be stored in the PATH
./start.sh
Command line commands
backup.sh / backup.bat OUTPUT_FILE
Makes a backup copy of server settings to the OUTPUT_FILE
cleanup.sh / cleanup.bat
Performs cleanup, removing VXG Server from your machine, along with your settings and recorded storage
docker_install.sh / docker_install.bat
Installs or upgrades the docker engine and docker-compose in your system
restore.sh / restore.bat BACKUP_FILE
Restores server settings from the BACKUP_FILE
start.sh / start.bat
Starts VXG Server
stop.sh / stop.bat
Stops VXG Server