Windows
This section provides a step-by-step guide to installing Babel Licensing Service on Windows 11.
Follow these instructions to install and configure the Babel Licensing Service on Windows 11.
Prerequisites
To successfully install Babel Licensing Service on Windows 11, you will need to ensure that the following prerequisites are met.
- Ensure that Windows 11 has been updated to the latest version
- Microsoft SQL Server, or MySQL/MariaDB (the .NET 10 service is tested with MySQL 8.4 and MariaDB 11.4)
- The ASP.NET Core runtime that matches the service package (for example .NET 10 for
babel_service_net100_x.y.z.w.zip) - Babel Licensing Service ZIP package (e.g.,
babel_service_net100_x.y.z.w.zip). The same package serves both editions. - Babel Licensing Server or Data Center edition license file (
babel.licenses) - If running the install script, PowerShell version 7 or greater is required
Install Script
The BabelLicensingService.ps1 PowerShell script is designed to automate the installation and configuration process of the Babel Licensing Service on Windows environments described in this paragraph.
This script ensures prerequisites such as administrative privileges, correct PowerShell version, and the MariaDB CLI command are met before initiating the installation process. It lets you install the service and query its status.
During the installation, it handles tasks like extracting the installation ZIP, copying the license file, creating the database, modifying the appsettings.json for accurate connection strings, and installing the service with the correct configuration, so you avoid the errors of a manual setup.
To use the BabelLicensingService.ps1 script, follow the steps below:
Download the script
Download the script from this link.
Copy the script to a temporary folder
Copy the downloaded script into a temporary folder.
Add the service zip and the license file
Place the Babel service zip archive (named babel_service_net100_x.y.z.w.zip, where x.y.z.w is the version) and the license file (babel.licenses) in the same temporary folder as the script.
Run the script
Run the BabelLicensingService.ps1 script from the temporary folder to start the installation process.
When attempting to run the script, you may encounter the following error:
The file C:\Projects\BabelSvc\BabelLicensingService.ps1 is not digitally signed. You cannot run this script on the current system.To resolve this, you can modify the execution policy to a less restrictive one, allowing the script to run, by executing the following command:
Set-ExecutionPolicy -ExecutionPolicy UnrestrictedSetting the execution policy to Unrestricted can expose the system to security risks. Only run scripts from trusted sources, and consider resetting the policy to a more secure setting when the script has finished.
If you prefer not to use the BabelLicensingService.ps1 script, you can continue reading for step-by-step instructions on how to manually set up the service.
Setup Files
Setting up the Babel Licensing Service requires extracting the necessary service assemblies and configurations from the provided ZIP file, babel_service_net100_x.y.z.w.zip, to the appropriate directory on your Windows machine. Below are the step-by-step instructions to extract the ZIP file using Windows Explorer to the C:\BabelSvc directory.
In Windows Explorer, go to the folder where babel_service_net100_x.y.z.w.zip is saved.
Right-click the archive
Right-click on the babel_service_net100_x.y.z.w.zip file.
Choose Extract All
Select Extract All... from the context menu.
Set the destination folder
In the ‘Extract Compressed (Zipped) Folders’ dialog box, enter C:\BabelSvc as the destination folder.
Extract the files
Click Extract.
The Babel Licensing Service files from babel_service_net100_x.y.z.w.zip are now in the C:\BabelSvc directory.
License File
Copy the license file babel.licenses, into the extract folder. This step ensures that the service can access the required licensing information.
The license file sets the edition. With a Data Center license the web application is served at the service address. With a Server license that address shows an upgrade page with an edition comparison; the service, its API and Babel Desktop keep working. To upgrade, replace babel.licenses and restart the service; there is nothing to reinstall.
Creating Database
When setting up the Babel Licensing Service, creating a dedicated database and user is essential. Below are the step-by-step instructions for creating the Babel Licensing database with Microsoft SQL Server and MySQL MariaDB.
Microsoft SQL Server
To manage Babel Licensing Service licenses with SQL Server, setting up a dedicated database is essential. This guide provides steps to configure the database for seamless operation.
Launch SQL Server Management Studio (SSMS).
- Connect to your SQL Server instance.
- Open a new query window to execute the SQL commands.
Run the following SQL commands to create the database and configure the user
-- Create the licenses database
CREATE DATABASE licenses;
GO
-- Create a new SQL Server login for the Babel Licensing Service
CREATE LOGIN babel WITH PASSWORD = 'YourUniquePassword';
GO
-- Create a database user linked to the login
USE licenses;
CREATE USER babel FOR LOGIN babel;
GO
-- Grant the necessary privileges to the user
ALTER ROLE db_owner ADD MEMBER babel;
GOMySQL MariaDB
HeidiSQL, a powerful and easy-to-use open-source database management tool, can be used in conjunction with MariaDB to facilitate this process. Below are the step-by-step instructions to create a database using HeidiSQL and MariaDB.
Start by launching HeidiSQL and switch to the SQL tab to run the following SQL commands:
CREATE DATABASE licenses;
CREATE USER babel@localhost IDENTIFIED BY 'YourUniquePassword';
GRANT ALL PRIVILEGES ON licenses.* TO babel@localhost;
FLUSH PRIVILEGES;After executing the above steps, verify that the licenses database has been created successfully and that the babel user has the correct privileges assigned. You can do this by logging in with the babel user credentials and trying to access the licenses database.
Configuring Babel Licensing Service
Configuring the Babel Licensing Service is a crucial step to ensure its proper functionality and integration with your environment. This involves modifying the appsettings.json file located in the extracted folder and adjusting various settings to match your specific requirements.
Editing appsettings.json
Navigate to the extracted folder and locate the appsettings.json file. Open the file using your preferred text editor and update the database configuration to match the database server you selected for setting up the Babel Licensing database.
Microsoft SQL Server
To set up the Babel Licensing database on Microsoft SQL Server, please configure the Database Provider and SQLServer connection string as follows:
"Database": {
"Provider": "SQLServer"
},
"ConnectionStrings": {
"SQLServer": "Data Source=SQLSERVER_INSTANCE_NAME;User Id=babel;Password=YourUniquePassword;Encrypt=false;Initial Catalog=licenses",
"MySQL": "",
"SQLite": ""
},Replace SQLSERVER_INSTANCE_NAME with the name of your SQL Server instance as displayed in SQL Server Object Explorer or your SQL Server Management Studio (SSMS) connection.
Use YourUniquePassword as the password you set for the babel login in Microsoft SQL Server.
MySQL MariaDB
If you opted for MySQL and MariaDB when creating Babel Licensing database, configure the Database Provider and the MySQL connection string as follows:
"Database": {
"Provider": "MySQL"
},
"ConnectionStrings": {
"SQLServer": "",
"MySQL": "Server=127.0.0.1;User=babel;Password=YourUniquePassword;Database=licenses",
"SQLite": ""
},Here, ensure that the Provider under Database is set to MySQL, and the MySQL connection string is correctly configured with the appropriate server address, user, password, and database name. Replace YourUniquePassword with the actual password you’ve set for the babel user in MariaDB.
On .NET 10 the service uses the Microting.EntityFrameworkCore.MySql provider, an MIT-licensed fork of Pomelo with Entity Framework Core 10 support. Earlier frameworks use Pomelo. The MySQL provider name, connection string and schema are the same on every framework.
Configuring Kestrel
In the EndpointDefaults section, the Protocols is set to Http1AndHttp2, allowing the server to communicate using both HTTP1 and HTTP2 protocols, providing flexibility and compatibility with different types of clients.
"Kestrel": {
"EndpointDefaults": {
"Protocols": "Http1AndHttp2"
},
"Endpoints": {
"gRPC": {
"Url": "http://*:5005",
"Protocols": "Http2"
}
}
},The Endpoints section is where you define specific endpoints for the service. Here, an endpoint named gRPC is configured with the Url set to http://*:5005, allowing the service to listen on all available network interfaces on port 5005. The Protocols for this endpoint is specifically set to Http2, optimizing it for gRPC communication.
When configuring Kestrel, ensure that the specified URLs and protocols align with your service requirements and network environment, and adjust them as necessary to achieve the desired behavior and performance of your service.
Configuring Serilog
Further, configure the Serilog section to set up logging preferences:
"Serilog": {
"Using": ["Serilog.Sinks.Console", "Serilog.Sinks.File"],
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"System": "Warning",
"Grpc": "Warning"
}
},
"Enrich": ["FromLogContext", "WithMachineName", "WithThreadId"],
"WriteTo": [
{"Name": "Console"},
{
"Name": "File",
"Args": {
"path": "C:\\BabelSvc\\log.txt",
"rollingInterval": "Day"
}
}
]
},In this section, specify the full path to the log file, especially when running Babel Licensing Service as a Windows Service, to avoid any logging issues. For instance, "path": "C:\\BabelSvc\\log.txt" sets the log file to be stored in the C:\BabelSvc directory.
Application Settings
Lastly, under the Application section, specify the LicenseFile, SigningKey, and TokenExpiration values:
"Application": {
"AdminUsername": "your-admin-user",
"AdminEmail": "admin@example.com",
"AdminPassword": "<strong-initial-password>",
"LicenseFile": "babel.licenses",
"SigningKey": "Secret Token Key",
"TokenExpiration": "00:30:00"
},Here, LicenseFile should be set to babel.licenses. Customize the SigningKey by replacing Secret Token Key with your unique key, which will secure the communication between application clients and the Babel Licensing Service. Adjust the TokenExpiration value according to your requirements to set the token’s validity duration.
Since 11.7.0 — the service no longer ships with admin / admin default credentials, and SigningKey is no longer prefilled. Populate AdminUsername and AdminPassword before the first start to provision the initial administrator account (AdminEmail is optional but recommended); if either required value is empty the service still starts but no admin user is created, so the Web Application (Data Center) cannot sign in with that account and Babel Desktop has no administrator API key to connect with, until you set them and restart. If SigningKey is left empty, a random key is generated at startup, but it is regenerated at every restart and not shared across instances — for production, always set an explicit value (for example via the BABEL_SERVICE_APPLICATION__SIGNINGKEY environment variable).
Start Babel Licensing Service
To start the Babel Licensing Service using PowerShell, follow these steps:
Open PowerShell
Open PowerShell from the Start menu.
Navigate to the installation folder
Navigate to the directory where Babel.Licensing.Service.exe is located using the cd command, typically:
cd C:\BabelSvcRun the service executable
Run the executable with the following command:
.\Babel.Licensing.Service.exeCheck the output messages to confirm that the service starts without errors. If something goes wrong, see the service documentation for troubleshooting.
When starting the service, a Windows Firewall popup may appear, requesting permission for the service to communicate over the network. Choose ‘Allow access’, otherwise the service cannot communicate with other systems on the network or the internet.
Running as a Windows Service
To ensure Babel Licensing Service operates efficiently in the background and is available upon system startups, it is recommended to run it as a Windows service. Running as a service allows Babel Licensing Service to operate independently of user sessions, offering uninterrupted service availability and functionality.
To accomplish this, you can use PowerShell’s New-Service command, which is designed to create a new entry for a Windows service in the registry and the service database. Below is the adapted command using New-Service in PowerShell:
New-Service -Name "Babel.Licensing" -BinaryPathName "C:\BabelSvc\Babel.Licensing.Service.exe" -DisplayName "Babel Licensing" -StartupType "Automatic" -Description "Babel licensing and reporting network services."In this command:
-Name "Babel.Licensing"specifies the name of the service.-BinaryPathName ".\Babel.Licensing.Service.exe"defines the path to the service’s executable file, indicating the current directory.-DisplayName "Babel Licensing"assigns a display name to the service, which is how it will appear in the Services application or other user interfaces.-StartupType "Automatic"configures the service to start automatically with the system.-Description "Babel licensing and reporting network services."provides a description, offering insights into the service’s role and functionality.
This command should be run in a PowerShell session with administrative privileges to ensure the proper creation and configuration of the service. After executing the command, the Babel Licensing Service will be set up as a Windows service, ready to offer continuous operation and availability on the system.
Start the Service
Start-Service -Name "Babel.Licensing"Stop the Service
Stop-Service -Name "Babel.Licensing"Get Service Status
Get-Service -Name "Babel.Licensing" Uninstall the Service
Get-Service -Name "Babel.Licensing" | Remove-ServiceRemember to run these commands in a PowerShell session with administrative privileges to ensure they execute correctly.