---
title: "Deploy Slurm on Railway"
description: "Play with a real Slurm scheduler on Railway"
category: "AI/ML"
url: https://railway.com/deploy/slurm-on-railway
---

# Deploy Slurm on Railway

Play with a real Slurm scheduler on Railway

**[Deploy Slurm on Railway on Railway](https://railway.com/template/slurm-on-railway)**

- **Creator:** Antvirf's Projects
- **Category:** AI/ML
- **Total deploys:** 2

## Template content

### slurm-on-railway

- **Source:** https://github.com/Antvirf/slurm-on-railway

## Documentation

# Slurm on Railway

Why? Why not. POC of running Slurm controller + container-local worker nodes on Railway. Only local dependencies are `railway` CLI and `docker`.

## Deployment

1. Deploy with railway template - be patient, the build takes about 10 minutes but subsequent deployments will be faster.
2. Create `railway.env` file with your project info:

```bash
# After deploying the template, you can get these from the URL:
https://railway.com/project/$PROJECT_ID/service/$SERVICE_ID?environmentId=$ENVIRONMENT_ID
export RAILWAY_PROJECT_ID=xxx
export RAILWAY_ENVIRONMENT_ID=xxx
export RAILWAY_SERVICE_ID=xxx
```

3. From the `Settings` tab of your project, get your public domain and port - e.g. `interchange.proxy.rlwy.net:59019`
4. Auth your Railway CLI with `railway login`
5. Run commands using the `client.sh` wrapper:

```bash
chmod +x client.sh
./client.sh  

# example
./client.sh interchange.proxy.rlwy.net:59019 scontrol ping -vvvv
Using Project: xxx
Using Environment: xxx
Using Service: xxx
--- Building Local Slurm Image ---
sha256:639351c1520234413d42a3df8b0230e3a04e317af4a1e305bbc35e775e750759
--- Syncing with Railway ---
Warning: Received unknown message type: stand_by
Remote hostname detected: 8f524205061f
Warning: Received unknown message type: stand_by
--- Launching Client Container ---
scontrol: debug2: _sack_connect: connected to /run/slurm/sack.socket
Slurmctld(primary) at 8f524205061f is UP
```

## Client script

1. Builds a local Docker image `slurm-railway`.
2. Fetches the authentication key (created at build-time) and hostname (set by Railway at runtime) from Railway
3. Launch a background `sackd` (Slurm Auth and Cred Kiosk) daemon inside the container to handle the `auth/slurm` handshake.
4. Run given command / drop into bash

# Deploy and Host

One-click deploy.

## About Hosting

One-click deploy

## Why Deploy

Play with Slurm :)

### Common Use Cases

Play with Slurm :)

## Dependencies for

None

### Deployment Dependencies

None


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/slurm-on-railway
