routeros-app-yaml
RouterOS /app YAML format for container applications (7.21+ builtin app, 7.22+ custom YAML creation). Use when: writing or validating RouterOS /app YAML files, working with MikroTik container apps, building docker-compose-like definitions for RouterOS, creating /app store schemas, debugging /app validation errors, or when the user mentions /app, tikapp, or RouterOS container YAML.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o routeros-app-yaml.zip https://jpskill.com/download/20949.zip && unzip -o routeros-app-yaml.zip && rm routeros-app-yaml.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/20949.zip -OutFile "$d\routeros-app-yaml.zip"; Expand-Archive "$d\routeros-app-yaml.zip" -DestinationPath $d -Force; ri "$d\routeros-app-yaml.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
routeros-app-yaml.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
routeros-app-yamlフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 2
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
RouterOS /app YAML フォーマット (7.21+)
RouterOS 7.21 では、/app パス (組み込みアプリのリスト表示と管理) が導入されました。完全な YAML アプリ作成機能 (/app/add) は 7.22 (7.22beta5 で初登場) で登場しました。これは MikroTik の docker-compose に対する独自の代替手段と考えてください。ただし、docker-compose とは大きく異なるため、同一ではありません。
/app とは
/app サブシステムを使用すると、ユーザーは1つ以上のコンテナを YAML で単一の「アプリケーション」として定義できます。RouterOS は YAML を解析し、コンテナ、ボリューム、ネットワーク、設定ファイルを作成し、そのライフサイクルを管理します。
主要な概念:
- 各
/appは、サービス、設定、ボリューム、ネットワークを含む YAML ドキュメントによって定義されます。 - YAML は CLI (
/app/add yaml-url=...) または REST API を介して RouterOS にロードされます。 - 組み込みアプリは RouterOS に同梱されています (
GET /rest/appで表示可能)。 - カスタムアプリは URL またはインライン YAML から追加できます。
- アプリストア (
app-store-urls=) は厳選されたコレクションを提供します。
docker-compose との重要な違い
| 機能 | docker-compose | RouterOS /app |
|---|---|---|
| ポート形式 | host:container[/protocol] |
2つのスタイル (下記参照) |
| 環境変数 | KEY=value またはリスト |
同じですが、プレースホルダーが展開されます |
| ボリューム | 名前付きまたはバインドマウント | サブセット — バインドマウントオプションなし |
| ネットワーク | 完全な Docker ネットワークモデル | 簡素化 — 名前 + 外部 |
| ビルド | 完全な Dockerfile サポート | 最小限 (コンテキスト + dockerfile) |
| 設定 | Docker configs API | インライン content のみ |
| デプロイ/リソース | あり | なし — サポートされていません |
トップレベル version: |
非推奨 (必須でした) | 使用されません |
| ファイル拡張子 | .yml / .yaml |
.tikapp.yaml (慣例) |
トップレベルプロパティ
| プロパティ | 型 | 必須 | 説明 |
|---|---|---|---|
name |
string | いいえ | /app の一意の識別子 |
descr |
string | いいえ | アプリ UI に表示される人間が読める説明 |
page |
string (URI) | いいえ | プロジェクトのホームページ URL |
category |
string (enum) | いいえ | アプリストアの分類 |
icon |
string (URI) | いいえ | アイコン URL (show-in-webfig=yes で WebFig に表示されます) |
default-credentials |
string または null | いいえ | UI に表示される username:password |
url-path |
string | いいえ | ブラウザアクセス用の URL パスサフィックス (例: /admin) |
credentials |
string | いいえ | 認証情報のヒント (default-credentials の代替) |
option |
boolean | いいえ | アプリがオプションであるかどうか |
auto-update |
boolean | いいえ | 起動ごとにコンテナをプルして再起動します |
services |
object | はい | コンテナサービス定義 (1つ以上必須) |
volumes |
object | いいえ | 名前付きボリューム宣言 |
networks |
object | いいえ | ネットワーク宣言 |
configs |
object | いいえ | インラインコンテンツを含む設定ファイル宣言 |
カテゴリ値 (網羅的)
productivity, storage, networking, development, communication,
file-management, search, video, media, media-management,
home-automation, monitoring, database, automation, ai,
messaging, radio, security, business
新しいカテゴリは、MikroTik が組み込みアプリを追加する際に登場します。CI スキーマ検証でこれらが捕捉されます。
サービスプロパティ
services: の下の各キーは1つのコンテナを定義します。必須プロパティ: image。
| プロパティ | 型 | 説明 |
|---|---|---|
image |
string | コンテナイメージ (レジストリを省略すると /container/config の registry-url を使用します) |
container_name |
string | 明示的な名前; /container の下のファイルパスのベースとして使用されます |
hostname |
string | コンテナのホスト名 |
entrypoint |
string または string[] | デフォルトのエントリポイントを上書きします |
command |
string または string[] | デフォルトのコマンドを上書きします |
ports |
array | ポートマッピング (フォーマットセクションを参照) |
environment |
object または array または null | 環境変数 (KEY=value リストまたは {KEY: value} マップ) |
volumes |
array of strings | ボリュームマウント (例: my-vol:/data) |
configs |
array of objects | 設定ファイルの配置 ({source, target, mode}) |
restart |
enum | no, always, on-failure, unless-stopped |
depends_on |
array または object | サービス依存関係の順序付け |
devices |
array of strings | コンテナに渡されるデバイスマッピング |
user |
string | コンテナを実行するユーザー |
security_opt |
array of strings | セキュリティオプション |
shm_size |
string | 共有メモリサイズ |
stop_grace_period |
string または int | SIGKILL が送信されるまでの時間 |
ulimits |
object | リソース制限 (例: nofile: {soft: 65536, hard: 65536}) |
build |
object または string | ビルド設定 (コンテキスト、dockerfile、引数) |
healthcheck |
object | ヘルスチェック (test, interval, timeout, retries, start_period) |
stdin_open |
boolean | stdin を開いたままにします |
expose |
array | 内部ポート (ホストに公開されません) |
secrets |
array of strings | 公開するシークレット |
attach |
boolean | stdio にアタッチします |
ポートフォーマット — 2つのスタイル
RouterOS は2つのポートマッピング文字列フォーマットをサポートしています。どちらも有効ですが、7.23beta2+ 以降の新しいアプリではコロン形式が推奨されます。
古い OCI スタイル (7.23 以前)
[ip:]host_port:container_port[/tcp|/udp][:label]
例:
ports:
- "8080:80/tcp"
- "8443:443/tcp:https"
- "192.168.1.1:53:53/udp:dns"
新しい RouterOS スタイル (7.23+)
[ip:]host_port:container_port[:label][:tcp|:udp]
プロトコルはスラッシュではなくコロンで追加されます:
ports:
- "8080:80:web:tcp"
- "8443:443:https:tcp"
- "53:53:dns:udp"
長形式 (オブジェクト) 構文
ports:
- target: 80
published: 8080
protocol: tcp
name: web
app_protocol: http
ポート内の IP アドレスとプレースホルダー
ポート文字列には、リテラル IP またはプレースホルダー式を含めることができます:
ports:
- "[accessIP]:[accessPort]:80/tcp:web" # プレースホルダーを含む古いスタイル
- "[accessIP]:[accessPort]:80:web:tcp" # プレースホルダーを含む新しいスタイル
プレースホルダー
RouterOS はデプロイ時にこれらのプレースホルダーを展開します:
| プレースホルダー | 展開先 |
|---|---|
[accessIP] |
外部からアプリにアクセスするための IP アドレス |
[accessPort] |
外部アクセス用のプライマリホストポート |
[access |
(原文がここで切り詰められています) |
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
RouterOS /app YAML Format (7.21+)
RouterOS 7.21 introduced the /app path (built-in app listing and management). The full YAML app creation feature (/app/add) appeared in 7.22 (first seen in 7.22beta5). Think of it as MikroTik's opinionated alternative to docker-compose — but it is NOT docker-compose, with significant differences.
What /app Is
The /app subsystem lets users define one or more containers as a single "application" in YAML. RouterOS parses the YAML, creates containers, volumes, networks, and config files, then manages the lifecycle.
Key concepts:
- Each
/appis defined by a YAML document with services, configs, volumes, and networks - The YAML is loaded into RouterOS via CLI (
/app/add yaml-url=...) or REST API - Built-in apps ship with RouterOS (visible at
GET /rest/app) - Custom apps can be added from URLs or inline YAML
- App stores (
app-store-urls=) provide curated collections
Critical Differences from docker-compose
| Feature | docker-compose | RouterOS /app |
|---|---|---|
| Port format | host:container[/protocol] |
Two styles (see below) |
| Environment | KEY=value or list |
Same, but placeholders expand |
| Volumes | Named or bind mounts | Subset — no bind mount options |
| Networks | Full docker network model | Simplified — name + external |
| Build | Full Dockerfile support | Minimal (context + dockerfile) |
| Configs | Docker configs API | Inline content only |
| Deploy/resources | Yes | No — not supported |
Top-level version: |
Deprecated (was required) | Not used |
| File extension | .yml / .yaml |
.tikapp.yaml (convention) |
Top-Level Properties
| Property | Type | Required | Description |
|---|---|---|---|
name |
string | No | Unique identifier for the /app |
descr |
string | No | Human-readable description shown in app UI |
page |
string (URI) | No | Project homepage URL |
category |
string (enum) | No | App store classification |
icon |
string (URI) | No | Icon URL (shown in WebFig with show-in-webfig=yes) |
default-credentials |
string or null | No | username:password shown in UI |
url-path |
string | No | URL path suffix for browser access (e.g., /admin) |
credentials |
string | No | Credential hint (alternative to default-credentials) |
option |
boolean | No | Whether app is optional |
auto-update |
boolean | No | Pull and restart containers on every boot |
services |
object | Yes | Container service definitions (≥1 required) |
volumes |
object | No | Named volume declarations |
networks |
object | No | Network declarations |
configs |
object | No | Config file declarations with inline content |
Category Values (Exhaustive)
productivity, storage, networking, development, communication,
file-management, search, video, media, media-management,
home-automation, monitoring, database, automation, ai,
messaging, radio, security, business
New categories appear when MikroTik adds built-in apps. The CI schema validation catches these.
Service Properties
Each key under services: defines one container. Required property: image.
| Property | Type | Description |
|---|---|---|
image |
string | Container image (omit registry to use /container/config's registry-url) |
container_name |
string | Explicit name; used as base for file paths under /container |
hostname |
string | Container hostname |
entrypoint |
string or string[] | Override default entrypoint |
command |
string or string[] | Override default command |
ports |
array | Port mappings (see format section) |
environment |
object or array or null | Environment variables (KEY=value list or {KEY: value} map) |
volumes |
array of strings | Volume mounts (e.g., my-vol:/data) |
configs |
array of objects | Config file placements ({source, target, mode}) |
restart |
enum | no, always, on-failure, unless-stopped |
depends_on |
array or object | Service dependency ordering |
devices |
array of strings | Device mappings passed to container |
user |
string | User to run container as |
security_opt |
array of strings | Security options |
shm_size |
string | Shared memory size |
stop_grace_period |
string or int | Time before SIGKILL |
ulimits |
object | Resource limits (e.g., nofile: {soft: 65536, hard: 65536}) |
build |
object or string | Build configuration (context, dockerfile, args) |
healthcheck |
object | Health check (test, interval, timeout, retries, start_period) |
stdin_open |
boolean | Keep stdin open |
expose |
array | Internal ports (not published to host) |
secrets |
array of strings | Secrets to expose |
attach |
boolean | Attach to stdio |
Port Format — Two Styles
RouterOS supports two port mapping string formats. Both are valid; new apps from 7.23beta2+ prefer the colon style.
Old OCI-style (pre-7.23)
[ip:]host_port:container_port[/tcp|/udp][:label]
Examples:
ports:
- "8080:80/tcp"
- "8443:443/tcp:https"
- "192.168.1.1:53:53/udp:dns"
New RouterOS style (7.23+)
[ip:]host_port:container_port[:label][:tcp|:udp]
Protocol is appended with colon instead of slash:
ports:
- "8080:80:web:tcp"
- "8443:443:https:tcp"
- "53:53:dns:udp"
Long-form (object) syntax
ports:
- target: 80
published: 8080
protocol: tcp
name: web
app_protocol: http
IP Addresses and Placeholders in Ports
Port strings can include literal IPs or placeholder expressions:
ports:
- "[accessIP]:[accessPort]:80/tcp:web" # Old style with placeholders
- "[accessIP]:[accessPort]:80:web:tcp" # New style with placeholders
Placeholders
RouterOS expands these placeholders at deploy time:
| Placeholder | Expands to |
|---|---|
[accessIP] |
IP address for accessing the app from outside |
[accessPort] |
Primary host port for external access |
[accessPort2] |
Secondary host port |
[containerIP] |
IP address assigned to the container |
[routerIP] |
Router's own IP address |
Placeholders appear in port mappings, environment values, and config content.
Configs (Inline Files)
Top-level configs: declares config content; services reference them:
configs:
my-config:
content: |
server {
listen 80;
server_name [accessIP];
}
services:
web:
image: nginx:alpine
configs:
- source: my-config
target: /etc/nginx/conf.d/default.conf
mode: 0644
Volumes and Networks
volumes:
app-data: {} # Named volume (null or empty object)
networks:
app-net:
name: my-network
external: true # Use existing RouterOS network
Store Schema (app-store-urls)
RouterOS can load app collections from URLs configured via app-store-urls=. The store format is simply a YAML array of /app definitions:
- name: app-one
services:
web:
image: nginx:alpine
- name: app-two
services:
db:
image: postgres:16
Store files use the .tikappstore.yaml extension by convention.
REST API for /app
// List all /app entries (built-in + custom)
const apps = await fetch(`${base}/app`, auth).then(r => r.json());
// Each entry has: .id, name, yaml (raw YAML string), and metadata
// The 'yaml' field is a RouterOS string containing the full YAML document
// Add a custom /app from URL
await fetch(`${base}/app`, {
method: "PUT",
...auth,
body: JSON.stringify({ "yaml-url": "https://example.com/my-app.tikapp.yaml" }),
});
Note: The /app endpoint requires the container extra package to be installed.
JSON Schema for Validation
Two schema variants exist for each /app document:
| Schema | Purpose | Port validation | Env var names |
|---|---|---|---|
*.latest.json |
CI/strict validation | Regex patterns enforced | ^[A-Z_][A-Z0-9_]*$ only |
*.editor.json |
Editor/SchemaStore UX | No regex (allows autocompletion) | Case-insensitive |
The strict schema has regex pattern on port strings which prevents VSCode autocompletion — the YAML extension won't suggest values for fields with patterns. The editor variant removes these patterns.
VSCode Integration
Add to VSCode settings for YAML autocompletion:
{
"yaml.schemas": {
"https://tikoci.github.io/restraml/routeros-app-yaml-schema.latest.json": "*.tikapp.yaml",
"https://tikoci.github.io/restraml/routeros-app-yaml-store-schema.latest.json": "*.tikappstore.yaml"
}
}
Use .editor.json URLs for better autocompletion at the cost of less strict validation.
Version History
- 7.22: Initial /app support with basic service properties
- 7.23beta2: New colon-style port format (
:tcp/:udpsuffix) - 7.23+: Additional service properties (
devices,expose,secrets,attach)
Common Mistakes
- Assuming docker-compose compatibility — not all properties are supported, some behave differently
- Using
version:key — RouterOS ignores it; not needed - Mixing port format styles in a single entry — each port string must use ONE style exclusively
- Uppercase env var names required in strict validation — use
*.editor.jsonfor mixed case - Forgetting the container package —
/appreturns 404 without thecontainerextra package - Using
deploy:orresources:— not supported by RouterOS
Additional Resources
- For RouterOS fundamentals, CLI syntax, REST API: see the
routeros-fundamentalsskill - For running CHR in QEMU (needed to test /app): see the
routeros-qemu-chrskill - MikroTik forum reference: https://forum.mikrotik.com/t/amm0s-manual-for-custom-app-containers-7-22beta/268036/22
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (10,241 bytes)
- 📎 references/examples.md (3,755 bytes)