RouterOS /app YAML Editor
A browser-based editor for writing and validating RouterOS container app definitions.
Powered by Monaco (the VS Code editor engine) with live schema validation.
Contents
1. What is RouterOS /app?
RouterOS 7.22+ introduced /app — a YAML-based format for packaging
and deploying containerized applications directly on a MikroTik router. Think of it
as a lightweight docker-compose — but RouterOS-specific, with its own
networking model, placeholder system, and deployment lifecycle.
A single /app definition bundles everything a container needs: which
image to pull, which ports to expose, which volumes to mount, and optional metadata
like a name, description, category icon, and even a default web-UI page.
MikroTik ships a growing library of built-in apps (Home Assistant, code-server,
Pi-hole, and more) that can be explored and customized using this editor.
📖 Official reference: Containerized App management — MikroTik Help
The /app YAML format is not compatible with standard
docker-compose — the port notation, networking model, and placeholder
tokens are RouterOS-specific. This editor and schema are designed specifically
for the RouterOS dialect.
2. Getting Started
Open tikapp.html. On your very first visit (no saved session), the editor loads the code-server built-in example and opens the example picker automatically so you can browse all available apps.
- Browse examples — use the category and app dropdowns to explore built-in MikroTik apps. Switching app when the editor is unmodified loads it instantly.
- Customize — edit the YAML in the Monaco editor. Schema validation runs live. Errors appear below the editor.
- Deploy — copy the resulting YAML to your router via the Copy /app/add button, or download the file and use the RouterOS Files menu.
💡 RouterOS does not allow editing built-in apps directly
(/app set is read-only for built-ins). To customise one, copy
its YAML from the editor and import it as a new custom app via
/app add yaml="…".
3. Editor Interface
Toolbar (Line 1)
| Control | Description |
|---|---|
| Version | RouterOS schema version used for validation. Choose a specific version (e.g. 7.22) or latest. |
| app-store-urls= toggle | Switch between single /app schema and the array format used by app-store-urls=. See §5. |
| Examples | Opens/closes the example picker (line 2). Button fills in when picker is open; outlined when closed. |
| Recall Stash | Restore the most recently stashed YAML. |
| Import | Load a .yaml / .yml file from your computer into the editor. |
| New | Clear the editor to start from scratch (prompts if content would be lost). |
Example Picker (Line 2)
When the Examples button is active, a second row appears with a category dropdown and an app dropdown. Changing either when your current content is a clean (unmodified) example will immediately load the new example — no extra click needed. If you have edited the current example, the editor asks before replacing it. See §4 for full details.
Double-clicking an app name in the picker also loads it immediately.
Monaco Editor Controls
The editor is Monaco — the same engine that powers VS Code. All standard keyboard shortcuts work. Here are the most useful ones:
| Action | Windows / Linux | macOS |
|---|---|---|
| Save to file | Use the Download button instead (browser security) | |
| Undo | Ctrl+Z | ⌘+Z |
| Redo | Ctrl+Shift+Z | ⌘+Shift+Z |
| Paste from clipboard | Ctrl+V | ⌘+V |
| Select all | Ctrl+A | ⌘+A |
| Find / Replace | Ctrl+H | ⌘+H |
| Format document | Shift+Alt+F | ⇧+⌥+F |
| Trigger suggestions | Ctrl+Space | ⌃+Space |
| Go to line | Ctrl+G | ⌃+G |
| Toggle comment | Ctrl+/ | ⌘+/ |
| Indent selection | Tab | Tab |
| Fold region | Ctrl+Shift+[ | ⌘+⌥+[ |
🖱 YAML autocompletion is powered by the loaded JSON schema. Press Ctrl/⌘+Space anywhere to see available keys. Required fields sort to the top.
Browser differences: On some browsers (especially Firefox), Ctrl+W closes the tab instead of triggering an editor action — be careful. On macOS, ⌘ shortcuts are used instead of Ctrl.
Live Validation
Every change is validated against the JSON Schema for the selected RouterOS version. The validation summary below the editor turns green when valid, red when there are errors. Click the summary to expand the error list — click any error to jump to that line in the editor.
Action Bar (Bottom)
| Button | Description |
|---|---|
| 💾 Stash | Explicitly save the current YAML to a separate "stash" slot in browser storage. Warns before replacing an existing stash. |
| ⬇ Download | Download the YAML as a .tikapp.yaml or .tikappstore.yaml file. |
| 📋 Copy | Copy the raw YAML to your clipboard. |
| Copy /app/add | Copy a ready-to-paste RouterOS CLI command: /app add yaml="…". Disabled in app-store-urls= mode (array format is not supported by /app add). |
| 🔗 Share | Copy a shareable URL that encodes the current version, mode, and YAML content to your clipboard. Share the link — anyone who opens it gets the same editor state. |
| ✕ Clear | Clear the editor (prompts for confirmation). |
4. Examples, Stash & Dirty Editing
Understanding the dirty state model is the key to moving smoothly from browsing examples to editing your own app.
Clean vs. Dirty
The editor tracks whether the current content was loaded from a built-in example and whether it has been modified. Content is clean if it exactly matches the loaded example; it becomes dirty as soon as you make any change.
Browsing Examples (Clean State)
When the editor is in a clean example state — meaning you haven't edited anything yet — switching the app dropdown instantly loads the newly selected example. No extra click needed. This makes it easy to quickly preview any of MikroTik's built-in apps.
What Happens When You Edit an Example?
The moment you change anything, the status bar shows:
Editing 'code-server' example — changes not yet stashed. [Stash] [Discard]
- [Stash] — saves your changes to the stash slot, then clears the "example mode" so you can browse freely. If a stash already exists, you'll be asked to confirm before replacing it.
- [Discard] — reverts the editor back to the original example YAML, discarding your changes.
If you try to load a different example while the content is dirty, the same Load / Stash / Cancel choice appears:
'code-server' was edited — load 'pihole'? [Load] [Stash] [Cancel]
Stash — Your Scratch Pad
The stash is a single named slot in your browser's localStorage.
Use it to:
- Preserve work-in-progress while you quickly look at another example
- Temporarily park a half-finished custom app before browsing
- Keep a "last good" version handy while experimenting
Restore the stash at any time with Recall Stash in the toolbar. The stash persists across page reloads until you explicitly replace it. Stashing again when a stash already exists prompts for confirmation.
Autosave
Every keystroke is silently autosaved to a separate localStorage
key. On reload, your last session is restored automatically, so you never
lose unsaved work. This autosave is independent of the stash.
Going from Example to Custom App
A typical workflow for building a custom app from an existing example:
- Browse examples to find a similar app (e.g. code-server)
- Start editing — the dirty indicator appears
- Click [Stash] in the status bar to save a checkpoint
- Keep editing; use Recall Stash to roll back if needed
- When satisfied, use ⬇ Download or Copy /app/add to deploy
🔒 RouterOS does not allow editing built-in apps.
To deploy a customized version, use /app add yaml="…"
(not /app set). The Copy /app/add button generates
the correct command for you.
5. app-store-urls= Mode
RouterOS supports hosting a collection of app definitions on a web server and
referencing them with /app set app-store-urls=http://…. The store
file is an array of individual /app definitions in
a single YAML document.
The app-store-urls= toggle in the toolbar switches the editor between single-app mode and store mode. It does more than change the validation schema:
-
Toggling ON (single → store): if the current content is a
valid single
/appdefinition, it is automatically wrapped in a YAML array. If the content is not valid, you are offered the choice to Enable Anyway (schema only, no conversion) or Cancel. - Toggling OFF (store → single): if the store contains exactly one app, it is automatically unwrapped to a single definition. If it contains multiple apps, you are asked whether to disable just the schema (keeping the array content) or cancel.
🌐 app-store-urls= requires a web server.
The array YAML must be hosted at a URL accessible to the router. It cannot
be added with /app add (which only accepts a single definition).
The Copy /app/add button is disabled in store mode for this reason.
Filenames for download use .tikapp.yaml for single apps and
.tikappstore.yaml for store files. These extensions are recognised by
the VS Code YAML extension when the schemas are configured — see
README → VSCode setup.
7. Behind the Scenes — How the Schema Gets Here
The editor's live validation is powered by a JSON Schema that is generated automatically from a real RouterOS router. Here is how the pipeline works — a quick look behind the curtain.
The schema files at routeros-app-yaml-schema.latest.json and
routeros-app-yaml-store-schema.latest.json are also available
as stable public URLs, making them suitable for use with the
VS Code YAML extension and potentially
SchemaStore
(which would auto-apply the schema in editors without any configuration).
All of this infrastructure is open source in the tikoci/restraml repository. The project is not affiliated with MikroTik — it is a community tool built to make RouterOS app development more approachable.
🛠 Want to contribute or report an issue? Open a GitHub issue.