Configuring SSL in ML Studio with NGINX (Using PEM and KEY Files)
To enhance the security of your ML Studio installation, you can use your own SSL certificate with NGINX, supporting PEM, KEY, and other NGINX-compatible SSL formats.
This guide outlines the necessary steps to configure ML Studio with your SSL certificate.
Prerequisites
- Ensure you have your SSL certificate and private key files. Typically, you will have a .pem file (or .crt) and a .key file from your SSL provider.
- Familiarity with basic command line operations and Docker.
Step 1: Preparing SSL Certificate Files
Locate your SSL certificate and private key files. You should have something similar to:
your-site.pem (or your-site.crt)
your-site.key
Step 2: Placing SSL Files in the NGINX Directory
- Navigate to the xai-workbench-installation/nginx/https/ssl directory in your ML Studio installation.
- Replace the existing nginx-selfsigned.key and nginx-selfsigned.pem with your own SSL files: your-site.pem your-site.key
Step 3: Configuring NGINX
- Open the mlstudio.conf.template file located in xai-workbench-installation/nginx/https.
- Update the SSL configuration to point to your new SSL files: bash
- Copy the code:
ssl\_certificate /etc/ssl/certs/your-site.pem;
ssl\_certificate\_key /etc/ssl/certs/your-site.key;
- Replace your-site.pem and your-site.key with your actual file names.
Step 4: Update Environment Configuration
- Go to xai-workbench-installation/.env.
- Ensure the protocol is set to HTTPS: makefile
- Copy the code:
SIMMACHINES\_PROTOCOL=https
Step 5: Restart ML Studio
In the xai-workbench-installation directory, run:
docker-compose down
docker-compose up -d
This will restart ML Studio with your new SSL configuration.