---
title: "Deploy Agent Artifact Engine"
description: "Self-hostable HTML and safe MDX artifact publishing for AI agents."
category: "Other"
url: https://railway.com/deploy/agent-artifact-engine
---

# Deploy Agent Artifact Engine

Self-hostable HTML and safe MDX artifact publishing for AI agents.

**[Deploy Agent Artifact Engine on Railway](https://railway.com/template/agent-artifact-engine)**

- **Creator:** Daniel L. Iser's Projects
- **Category:** Other
- **Total deploys:** 3

## Template content

### agent-artifact-engine

- **Source:** code-atlantic/agent-artifact-engine
- **Start command:** `npm start`
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host Agent Artifact Engine on Railway

Agent Artifact Engine is a self-hostable service for publishing immutable HTML and safe MDX artifacts from AI agents. It provides a simple publish API, public and unlisted viewer pages, private share links, sandboxed raw artifact rendering, and persistent file-backed storage without requiring a hosted SaaS platform.

## About Hosting Agent Artifact Engine

Hosting Agent Artifact Engine on Railway runs the Node/Fastify server with a persistent Railway Volume mounted at `/data`. Published artifacts, metadata, source files, and rendered HTML are stored on that volume so data survives deploys and restarts. Railway provides the public HTTP endpoint, health checks, restart handling, and environment variables. The template only requires a generated `PUBLISH_TOKEN`; optional settings can tune file size limits, script sandboxing, custom domains, and storage paths.

## Common Use Cases

- Publish and share AI-generated HTML reports, dashboards, demos, or documents.
- Host a private artifact vault for agent workflows, prototypes, and review links.
- Provide a lightweight self-hosted alternative to pastebins, markdown docs, or ad hoc static files.

## Dependencies for Agent Artifact Engine Hosting

- Node.js 22 runtime
- Railway Volume mounted at `/data`

### Deployment Dependencies

- GitHub repository: https://github.com/code-atlantic/agent-artifact-engine
- Railway Volumes: https://docs.railway.com/reference/volumes
- Railway Variables: https://docs.railway.com/guides/variables
- Agent Artifact Engine Railway docs: https://github.com/code-atlantic/agent-artifact-engine/blob/main/docs/railway.md

### Implementation Details

Required variable:

```sh
PUBLISH_TOKEN=${{ secret(64) }}
```

Optional variables:

```sh
DATA_DIR=/data
MAX_SOURCE_BYTES=1048576
ARTIFACT_ALLOW_SCRIPTS=false
PUBLIC_BASE_URL=https://custom-domain.example
ARTIFACT_BASE_URL=https://custom-domain.example
```

Recommended service settings:

```
HTTP networking enabled
Healthcheck path: /health
Volume mount path: /data
Restart policy: ON_FAILURE
Max retries: 3
```

Agent Artifact Engine automatically detects Railway’s public domain and mounted volume path. DATA_DIR=/data can be set explicitly, but is not required when the Railway Volume mount path is available.

## Why Deploy Agent Artifact Engine 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 Agent Artifact Engine 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.

## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — [Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/agent-artifact-engine
