
Deploy MLflow
MLflow 3.16 tracking server with login, Postgres and artifact storage.
Just deployed
/mlartifacts
Just deployed
/var/lib/postgresql/data
Deploy and Host MLflow on Railway
MLflow is the open-source platform for the machine learning and generative AI lifecycle. It tracks experiments, parameters, metrics and artifacts, manages models in a registry, traces LLM applications and evaluates their output. Python, R, Java and TypeScript clients log to a shared tracking server that the whole team can browse.
About Hosting MLflow
This template deploys the MLflow v3.16.1 tracking server from the official full image with a Railway Postgres database for runs and the model registry. Artifacts such as models and plots are stored on a Railway volume and served through the tracking server, so clients need no cloud storage credentials. The built-in basic-auth app is on: the admin account uses a generated password, and new users get read access by default. The server checks the Host header against your Railway domain. Artifacts can grow quickly, so watch the volume on the Hobby plan. Back up Postgres regularly.
Common Use Cases
- Tracking experiments and comparing training runs across a team
- A model registry for versioning and promoting models
- Tracing and evaluating LLM and agent applications
Dependencies for MLflow Hosting
ghcr.io/mlflow/mlflow:v3.16.1-full(official image)- Railway Postgres (
ghcr.io/railwayapp-templates/postgres-ssl:18) with a volume - A Railway volume at
/mlartifactsfor artifacts and the auth database
Deployment Dependencies
Implementation Details
| Service | Image | Networking | Storage |
|---|---|---|---|
| mlflow | ghcr.io/mlflow/mlflow:v3.16.1-full | public domain on 5000; private | volume at /mlartifacts |
| Postgres | Railway Postgres 18 | private only | volume |
import os, mlflow
os.environ["MLFLOW_TRACKING_USERNAME"] = "admin"
os.environ["MLFLOW_TRACKING_PASSWORD"] = ""
mlflow.set_tracking_uri("https://")
with mlflow.start_run():
mlflow.log_metric("accuracy", 0.93)
| Variable | Default | Purpose |
|---|---|---|
MLFLOW_ADMIN_USERNAME / MLFLOW_ADMIN_PASSWORD | admin / generated | Admin login |
MLFLOW_FLASK_SERVER_SECRET_KEY | generated | Required by the auth app for CSRF |
MLFLOW_ALLOWED_HOSTS | public, private and health-check hosts | Host header allow list |
Notes:
- Users and permissions live in
basic_auth.dbon the volume; the admin password is only applied when that database is first created. - The server listens on
0.0.0.0, so private clients connect over IPv4.
This is a community-maintained deployment package and does not imply affiliation with or endorsement by the MLflow project or its maintainers.
Why Deploy MLflow on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying MLflow on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
