---
title: "Deploy Strix AI Pentest Agent"
description: "Autonomous AI penetration-testing agent as a headless Railway worker."
category: "AI/ML"
url: https://railway.com/deploy/strix-ai-pentest-agent
---

# Deploy Strix AI Pentest Agent

Autonomous AI penetration-testing agent as a headless Railway worker.

**[Deploy Strix AI Pentest Agent on Railway](https://railway.com/template/strix-ai-pentest-agent)**

- **Creator:** wotonews
- **Category:** AI/ML

## Template content

### strix https://www.strix.ai/logo-transparent.png

- **Image:** wotonews/strix:v0.3.0

## Documentation

# Deploy and Host Strix with Railway

Deploy and host [Strix AI](https://github.com/usestrix/strix), an autonomous AI penetration-testing agent, as a headless, containerized worker on Railway. The image ships a full pentest toolchain (Subfinder, Nmap, Nuclei, SQLMap, TruffleHog, and more), and a registered `local` runtime backend (`STRIX_RUNTIME_BACKEND=local`) executes scan tools in-container — no Docker daemon required.

&gt; [!WARNING]
&gt; Only run Strix against systems you own or have explicit, written authorization to test. Unauthorized security testing is illegal in most jurisdictions.

---

## About Hosting Strix

Strix runs as an on-demand headless worker, not an HTTP server: the container stays resident (`sleep infinity`) and you launch scans through `railway ssh`. A volume at `/workspace` persists scan reports and workspace state across restarts and redeploys. Google Gemini powers the LLM reasoning loop via a single `GEMINI_API_KEY` variable.

## Why Deploy Strix on Railway?

- **No infrastructure to run locally** — the full Kali-based toolchain (10+ GB of scanners) lives in a prebuilt image, ready in about a minute.
- **Persistent workspace** — volumes keep scan reports, session state, and nuclei templates across redeploys.
- **On-demand usage** — pay only while the worker is up; scale down between engagement windows.
- **CLI-first operation** — trigger scans, fetch reports, and tail logs entirely from `railway ssh` / `railway logs`.

## Common Use Cases

- Authorized penetration tests and bug-bounty recon on assets you own or are contracted to test.
- Continuous security scanning of staging environments with AI-driven triage.
- Security research and tool experimentation without local toolchain setup.
- Ad-hoc vulnerability assessment by consultants who need a portable, reproducible pentest workstation.

## Dependencies for Strix Hosting

### Deployment Dependencies

- **Gemini API key** from [Google AI Studio](https://aistudio.google.com/app/apikey) — required; set as the `GEMINI_API_KEY` service variable.
- Docker image `wotonews/strix:v0.3.0` (public — no registry credentials needed).
- A Railway volume attached at `/workspace` for persistent scan storage.

---

## 📐 Architecture &amp; Components

```mermaid
graph TD
    Ops([Operator / Railway CLI]) --&gt; RW[strix Service]
    RW --&gt; Vol[(Volume at /workspace)]
    RW --&gt; LLM[Google Gemini API]
```

### 📦 Services &amp; Resources Included

| Component Name | Type | Source / Image | Persistent Volume | Public URL | Description |
| :--- | :--- | :--- | :---: | :---: | :--- |
| **`strix`** | Service | Docker image `wotonews/strix:v0.3.0` | Yes — `/workspace` | No | Headless Strix worker with full pentest toolchain. |

The service runs `sleep infinity`: it is an on-demand worker, not an HTTP server. Attach a Railway volume at `/workspace` after deployment so scan reports survive restarts and redeploys. Scan reports can contain sensitive target data — restrict project access and delete reports when they are no longer needed.

---

## ⚙️ Environment Variables Config

This template uses Google Gemini as its LLM provider.

### 🔑 Required Variables

| Variable Name | Default Value / Placeholder | Description | Security |
| :--- | :--- | :--- | :---: |
| **`GEMINI_API_KEY`** | user-supplied | Gemini API key. Create one in [Google AI Studio](https://aistudio.google.com/app/apikey). | Sensitive |
| **`STRIX_LLM`** | `gemini/gemini-3.1-pro-preview` | LiteLLM `provider/model` identifier. Gemini 3.1 Pro is currently in Public Preview. |
| **`STRIX_RUNTIME_BACKEND`** | `local` | Executes scan tools in-container via the SDK's Unix local sandbox. |
| **`STRIX_RUNTIME_BACKEND`** | `0` | Runs scan tools in-container without a Docker daemon.

### 🔩 Optional Configurations

| Variable Name | Default Value | Description |
| :--- | :--- | :--- |
| **`GEMINI_PROJECT_NAME`** | *(empty)* | Google Cloud project name, for accounts requiring project attribution. |
| **`GEMINI_PROJECT_NUMBER`** | *(empty)* | Google Cloud project number, for accounts requiring project attribution. |

---

## 🚀 Setup &amp; Deployment Guide

### Prerequisites
- [Railway CLI Installed](https://docs.railway.com/develop/cli) (`railway` on PATH)
- Logged in to your Railway account (`railway login`)
- A Gemini API key from [Google AI Studio](https://aistudio.google.com/app/apikey)

### Local Setup
The template ships as a prebuilt image. To run it locally:

```bash
docker pull wotonews/strix:v0.3.0
docker run --rm --env GEMINI_API_KEY=your-gemini-api-key wotonews/strix:v0.3.0 strix -n -t https://example.com
```

To develop against the source instead, build the image yourself:

```bash
docker build -t strix-template .
docker run --rm --env GEMINI_API_KEY=your-gemini-api-key strix-template strix -n -t https://example.com
```

### Shipping to Railway
Deploy the prebuilt image — no repository access needed:

```bash
# Link to your existing Railway project or initialize a new one
railway init

# Create the service from the published image
railway add --service strix --image wotonews/strix:v0.3.0

# Set the required secret
railway variable set --service strix "GEMINI_API_KEY=your-gemini-api-key"
```

Then in the Railway dashboard (or CLI), attach a volume to the `strix` service at `/workspace`.

---

## 🖥️ Executing Scans

Because the container runs completely headless, there is no public web service and intentionally no healthcheck endpoint. Run scans through the Railway CLI:

```bash
# 1. Open a shell into the running container
railway ssh

# 2. Run your Strix command
strix -n -t https://example.com
```

Or execute directly from your local terminal:

```bash
railway ssh -- "strix -n -t https://example.com"
```

Reports are written to `/workspace`. Retrieve them with:

```bash
railway volume browse /
railway volume files download  
```

---

## 🛠️ Available Tools

The environment includes Strix's sandbox dependencies pre-installed:
- **Reconnaissance**: Subfinder, Naabu, httpx, Katana, gospider, ffuf, Nmap
- **Scanners**: Nuclei, SQLMap, Wapiti, ZAP, Trivy
- **Secrets**: TruffleHog, Gitleaks
- **Static Analysis**: Semgrep, ast-grep, Bandit, ESLint
- **Web Testing**: Arjun, Dirsearch, wafw00f, jwt_tool

For custom instructions or advanced configuration, refer to the [Official Strix Documentation](https://docs.strix.ai/).


## 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/strix-ai-pentest-agent
