Deployment guide

MLflow

Overview

MLflow is the widely adopted open-source platform for managing the end-to-end machine learning lifecycle. It covers experiment tracking for parameters, metrics and artifacts, a model registry to version and stage models, and tools to package and deploy them.

This SecureAnyCloud image installs MLflow 3.13 in a Python virtual environment at /opt/mlflow on Python 3.12, run by an unprivileged mlflow system account. An nginx reverse proxy on TCP 80 fronts it, all data lives on a dedicated Azure data disk, and every VM generates its own unique admin password on first boot.

The tracking server listens on the loopback address 127.0.0.1:5000 and is never exposed directly. nginx fronts it on port 80 with HTTP Basic Authentication. The unauthenticated /health probe stays open for load balancers, and everything else requires the admin password.

What you get:

  • MLflow 3.13 tracking server and web UI in a Python venv at /opt/mlflow
  • An nginx reverse proxy on :80 in front of the tracking server (bound to loopback :5000)
  • A dedicated Azure data disk at /var/lib/mlflow holding the SQLite backend store (experiments, runs, registered models) and the artifact store, separate from the OS disk and re-provisioned with every VM
  • A per-VM admin password (MLFLOW_ADMIN_PASSWORD) generated at first boot and stored in a root-only file
  • mlflow.service and nginx.service as enabled, active systemd units
  • 24/7 SecureAnyCloud support

Prerequisites

You need an active Azure subscription, an SSH key pair, and a VNet with a subnet in the target region.

Standard_B2ms (2 vCPU / 8 GiB RAM) is a good starting size. Scale up for larger experiment volumes or heavier UI use.

Configure the network security group (NSG) to allow inbound 22/tcp from your management network and 80/tcp from the clients and browsers that reach MLflow. For public exposure, front port 80 with TLS, as described under Enabling HTTPS.

Step 1 - Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for MLflow by SecureAnyCloud, and select Create.

On the Basics tab, pick your subscription, resource group, region and size. Under Administrator account, choose SSH public key and paste your key. Under Inbound port rules, allow SSH (22) and HTTP (80).

Review the dedicated data disk on the Disks tab, then select Review + create and Create.

Step 2 - Deploy from the Azure CLI

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:mlflow-ubuntu-24-04:default:latest
az vm create \
  --resource-group <your-rg> \
  --name mlflow \
  --image sac1647283583153:mlflow-ubuntu-24-04:default:latest \
  --size Standard_B2ms \
  --admin-username azureuser \
  --ssh-key-values ~/.ssh/id_ed25519.pub \
  --vnet-name <your-vnet> --subnet <your-subnet> \
  --public-ip-sku Standard
az vm open-port --resource-group <your-rg> --name mlflow --port 80 --priority 1010

Step 3 - Connect to your VM

ssh azureuser@<vm-public-ip>

Step 4 - Confirm the services are running

systemctl is-active mlflow.service nginx.service curl -s http://127.0.0.1/health

Both services report active, and the /health endpoint returns OK.

Step 5 - Retrieve your admin password

Your VM generated a unique admin password on first boot and wrote it to a root-only file. Read the file with sudo:

sudo cat /root/mlflow-credentials.txt

The MLFLOW_ADMIN_PASSWORD value is the password. Sign in as admin with it.

Step 6 - Open the MLflow UI

Browse to http://<vm-public-ip>/ and sign in as admin with the password from Step 5.

Step 7 - Log an experiment from the MLflow client

Install the client, point it at the VM with the admin credentials, and log a run. Replace <vm-public-ip> and <password> with your values:

pip install mlflow export MLFLOW_TRACKING_URI=http://<vm-public-ip>/ export MLFLOW_TRACKING_USERNAME=admin export MLFLOW_TRACKING_PASSWORD=<password> python3 - <<'PY' import mlflow mlflow.set_experiment("demo") with mlflow.start_run(): mlflow.log_param("alpha", 0.5) mlflow.log_metric("rmse", 0.27) PY

The run, its parameters, metrics and artifacts appear in the UI. Register a model from a run to version and stage it in the model registry. The backend store and artifacts persist on the dedicated data disk at /var/lib/mlflow.

You can also call the REST API directly with the admin credentials:

PASS=$(sudo grep '^MLFLOW_ADMIN_PASSWORD=' /root/mlflow-credentials.txt | cut -d= -f2-)
curl -s -o /dev/null -w '%{http_code}\n' -u "admin:$PASS" \
  'http://127.0.0.1/api/2.0/mlflow/experiments/search?max_results=1'

A 200 confirms that the authenticated REST API is serving.

Step 8 - Confirm the runtime

/opt/mlflow/venv/bin/pip show mlflow | grep ^Version

The command prints Version: 3.13.0.

Production scale - PostgreSQL and Azure Blob Storage

The image defaults to a SQLite backend store and a local artifact store on the data disk. For team scale, repoint both in /etc/mlflow/mlflow.env:

MLFLOW_BACKEND_STORE_URI=postgresql://user:password@your-db-host:5432/mlflow MLFLOW_ARTIFACTS_DESTINATION=wasbs://your-container@your-account.blob.core.windows.net/mlflow

Then restart MLflow with sudo systemctl restart mlflow.service. Grant the VM's managed identity access to the storage account.

Enabling HTTPS

For production, terminate TLS at nginx with a real domain pointed at the VM's public IP. Install certbot and request a certificate, replacing the domain with your own:

sudo apt-get update && sudo apt-get install -y certbot python3-certbot-nginx
sudo certbot --nginx -d your-domain.example.com

certbot edits the nginx site at /etc/nginx/sites-available/sac-mlflow to add the TLS listener and arranges automatic renewal.

Backup and maintenance

All MLflow state lives on the dedicated data disk at /var/lib/mlflow. That covers the SQLite backend store mlflow.db and the artifacts directory. Snapshot that disk in Azure to back up experiments, runs and registered models.

Keep the OS patched with sudo apt update && sudo apt upgrade.

The admin password is in the nginx htpasswd file /etc/nginx/.mlflow.htpasswd. Rotate it with sudo htpasswd /etc/nginx/.mlflow.htpasswd admin.

Restart the server cleanly with sudo systemctl restart mlflow.service. Read its logs with sudo journalctl -u mlflow.service.

Support

This image is backed by 24/7 SecureAnyCloud support. Contact us by email or chat for help with experiment tracking, the model registry, backend and artifact store configuration, scaling, TLS and backups.

All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.

Deploy on Azure

Launch MLflow on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure