Deploy Toonflow v2 AI Short Drama and Video Studio
Write scripts, storyboard and generate images and video on one canvas.
Toonflow
Just deployed
Just deployed
Deploy and Host Toonflow with Railway
Toonflow is an open-source (MIT) AI studio for short dramas, animated comics and short videos: write scripts and storyboards, manage character and scene references, and generate images and video clips on one infinite canvas, using the model providers you choose. This community template runs Toonflow v2.0.8 behind a login on one HTTPS URL.
About Hosting Toonflow
Toonflow v2 is a single Bun server that serves the web UI and the API, stores settings, plugins and projects as files, and calls language, image and video model APIs on your behalf. Upstream publishes no container image and its server has no login of its own; it tells you to put an authenticated reverse proxy in front. This template builds the v2.0.8 release from source, keeps it on Railway's private network, and puts Caddy with HTTP basic auth and a generated password in front of it. Settings, API keys, plugins and generated media live on a persistent volume.
Common Use Cases
- Turn a story or novel chapter into a script, a shot list and storyboard frames with an LLM's help, then edit the results yourself
- Build consistent character, scene and prop reference sheets and reuse them across shots
- Generate short video clips from text plus reference images, then preview, arrange and download them for editing elsewhere
- Give a small team one shared studio, reachable from any browser, with the provider accounts managed in one place
- Prototype animated comics or social video ideas before committing to a full production
Dependencies for Toonflow Hosting
- Toonflow v2.0.8 server and web UI (built from the upstream release commit by this repository)
- Caddy 2.11 as the login gateway (built from this repository)
- A Railway volume (included) for settings, provider keys, plugins and projects
- At least one model provider account for the features you want to use (entered in the Toonflow UI, not in Railway): an LLM for scripts and the assistant, and an image and/or video generation service
Deployment Dependencies
- Toonflow source, releases and docs: https://github.com/HBAI-Ltd/Toonflow-app
- Toonflow user guide (Feishu): https://qcn7xdsqgc4z.feishu.cn/docx/RXFqdgR2Xo0dXZxGfd0cZCGgnwf
- TF-Router, Toonflow's own model gateway: https://api.toonflow.net/
- Toonflow plugin marketplace: https://api.toonflow.net/console/plugIn
- APIMart: https://apimart.ai
- CompShare (优云智算): https://www.compshare.cn
- Metaso MiniMax video: https://metaso.cn/minimax-h3
- Caddy basic auth: https://caddyserver.com/docs/caddyfile/directives/basic_auth
Implementation Details
| Service | Built from | Role | Public |
|---|---|---|---|
| Web | Caddy 2.11.7 (services/web) | Login, forwards every request to Toonflow, compresses the UI | yes |
| Toonflow | Toonflow v2.0.8 on Bun 1.4.3 + FFmpeg 7.1 (services/toonflow) | Web UI, API, agent, plugins, media handling; volume at /app/data | no |
No API key is needed to deploy. Provider keys are entered in the Toonflow UI and stored in settings.json on the volume.
First login
- Wait until both services are Active. The first Toonflow build installs the app's npm dependencies and builds the UI, server and plugins, so it takes several minutes.
- Open the Web service URL. Your browser asks for a user name and password: use
BASIC_AUTH_USERNAME(defaultadmin) andBASIC_AUTH_PASSWORDfrom the Web service variables. - The interface follows your browser language (21 languages, English included); change it in Settings.
- Follow the quick setup, add your providers and keys, then pick the server workspace
myProject(or create a new folder in the same dialog).
Model providers
- Language models (scripts, storyboards, assistant): any service that speaks the OpenAI Chat Completions, OpenAI Responses or Anthropic Messages API, configured with a base URL, key and model list. Presets: TF-Router and DeepSeek. Other examples: OpenAI, Anthropic, OpenRouter, Alibaba Cloud Model Studio (Qwen), or your own OpenAI-compatible server.
- Image and video generation (built-in adapters in v2.0.8): TF-Router (Seedance 2.0/2.5, Seedream 5.0, Wan 3.0, MiniMax H3, Seed Audio), APIMart (GPT Image 2, Nano Banana / Gemini image models, Seedance, Seedream, Wan 3.0, MiniMax H3), CompShare / 优云智算 (Seedance 2.0, Seedream 5.0, Qwen-Image, GPT Image 2, MiniMax H3) and Metaso / 秘塔 (MiniMax H3 video). More providers come from the plugin marketplace or custom provider adapters, including ComfyUI workflows you host yourself.
- TF-Router is the Toonflow team's own gateway; CompShare and Metaso are China-based services priced in CNY; APIMart lists prices in US dollars. Model names and prices change often, so check each provider's current list and terms.
What it costs
- Railway: roughly $3–5/month idle and $7–15/month in regular use for both services and a few GB of media (RAM, CPU and volume are billed by usage).
- Model usage is billed by your providers and is usually the larger part. Upstream's own example, a roughly 2-minute video made with Seedance 2.0, GPT Image 2 and Claude Opus 4.6, cost about ¥130 in API fees (≈ ¥120 video, ¥10 text, under ¥1 images). Sponsor prices listed upstream include MiniMax H3 video from ¥0.08–0.09 per second at 768p and GPT Image 2 from $0.006 per image; treat these as examples, not quotes.
- Generated media is stored on the volume and downloaded through Railway, so large projects also add volume and egress cost.
Security: Toonflow itself has no user accounts, and its API can spend your provider credits, install plugins and run MCP servers. Every page and API call therefore goes through the Web service's basic auth; API calls started by other websites are refused; the Toonflow service has no public URL and runs as an unprivileged user. Only /healthz answers without a password, plus MCP and A2A clients that present Toonflow's own bearer token once you enable those features in the app. Share the login only with people you trust to spend your credits. Change it by editing BASIC_AUTH_PASSWORD on Web and redeploying Web.
Privacy: like the upstream app, the web UI sends anonymous usage statistics (session duration, project and node counts, browser and language) to api.toonflow.net. Switch this off under Settings → Privacy. Provider model lists are also refreshed from the providers at start-up.
Not available on a server deployment: the mobile Device Link (upstream allows pairing only from the machine running Toonflow), the built-in browser tool, local folders outside the server workspace, and desktop updates.
MCP: enable MCP in Toonflow's settings, then point your client at https://{your-domain}/mcp with the header Authorization: Bearer {token}.
Custom domain: add it to the Web service; nothing else changes.
Scaling: keep Toonflow at one replica. It owns the volume and keeps agent sessions and tasks in memory. Give it more memory if you run long agent sessions or large FFmpeg exports. Web is stateless. Image and video generation runs at your providers, so Railway resources stay small.
Pinning and upgrading: the Toonflow release is pinned in services/toonflow/Dockerfile (UPSTREAM_VERSION and the matching UPSTREAM_COMMIT). To upgrade, set both to the new tag and its commit, and redeploy Toonflow. Data on the volume is kept; back up /app/data before major upgrades. Caddy and Bun images are pinned by tag.
This is a community template, not made, endorsed or supported by HBAI-Ltd. Toonflow is MIT-licensed and runs here unmodified.
Why Deploy Toonflow on Railway?
Railway gives Toonflow a password-protected HTTPS URL, private networking, a persistent volume and usage-based billing without a server to maintain. Your team can open the same studio from any browser while provider keys, projects and generated media stay in your own Railway project. You pay Railway only for the small server; the heavy image and video work runs at the providers you choose.
Template Content

