Run Tailscale on a MikroTik router
RouterOS has no Tailscale package. Run the official container on RouterOS 7.25.2 with its state on USB, and reach your LAN from any device on your tailnet.
Can Tailscale run on a MikroTik router?
Yes. Tailscale runs on a MikroTik router as a container, using the official tailscale/tailscale image and the container feature of RouterOS 7. As of 27 November 2026 there is no native Tailscale package for RouterOS, so a container is the only way to put the router itself on your tailnet. The container then advertises your LAN as a subnet route, which means any device on the tailnet can reach your LAN with no Raspberry Pi and no port forward.
This guide pins two versions. On the router it is RouterOS 7.25.2, the stable release dated 20 November 2026. If you prefer the long-term channel, that is 7.24.7. MikroTik describes long-term as rare releases with only the most critical fixes, and stable as releases every few months with new features. For Tailscale it is the image tag v1.104.7, released 12 November 2026. Pin the tag instead of latest, so the router only changes version when you tell it to.
The RouterOS commands below follow MikroTik's container manual. Property names have changed between releases, so press Tab after a property to confirm the name your router uses before you press Enter. If you are new to tailnets, start with what Tailscale is and how a tailnet works.
Is there a native MikroTik Tailscale package?
No. MikroTik's package list has extras such as container and zerotier, and none of them is Tailscale. The same page says: "Packages are provided only by MikroTik, and no 3rd parties are allowed to make them." The changelogs for RouterOS 7.25 and 7.25.2 do not mention Tailscale. On the Tailscale side, the install docs cover Linux, macOS, Windows, Android, iOS, Chromebook, Apple TV and Amazon Fire devices. There is no RouterOS entry and no official MikroTik guide.
The zerotier package is native, but it joins a ZeroTier network, not a tailnet. If you need Tailscale on the router, you need the container.
Which MikroTik routers can run the Tailscale container?
Two things must match: the RouterOS container package and the Tailscale image.
MikroTik offers the container package for arm and arm64, and for x86 including CHR (Cloud Hosted Router). RouterOS also ships for mipsbe, mmips, smips, tile and ppc, and none of those builds is offered the container package. The Tailscale image v1.104.7 exists for amd64, arm64, 386 and arm v7. There is no arm v5 image.
That gap matters on one popular family. MikroTik's manual says that devices with the EN7562CT CPU, such as the hEX refresh, support only arm32v5 container images. The hEX refresh (E50UG) and the hEX S 2025 both use that CPU, so the official Tailscale image is not expected to run on them. The older hEX (RB750Gr3) is MMIPS, so it cannot install the container package at all.
What MikroTik's product pages list for common models:
- RB5009UG+S+IN: ARM 64-bit, 1 GB RAM, 1 GB NAND, one USB 3.0 port. A good fit.
- hAP ax³: ARM 64-bit, 1 GB RAM, 128 MB NAND, one USB 3.0 port. A good fit with a USB disk.
- hAP ax²: ARM 64-bit, 1 GB RAM, 128 MB NAND, and no USB port in its specifications. It has the CPU and memory, but nowhere to put an external disk.
- hAP ac²: 32-bit ARM, 128 MB RAM, 16 MB flash, one USB port. Pulling an image needs a lot of free RAM, and MikroTik suggests pre-built images on USB for 16 MB flash boards.
- hAP ax lite: 32-bit ARM, 256 MB RAM, 128 MB NAND, no USB port listed.
Check your own router before you start:
/system/resource/printRead board-name and architecture-name in the output, then compare them with the lists above.
Why the image and the state go on an external disk
The compressed Tailscale image is about 58 MB for arm v7 and 59 MB for arm64, before it is unpacked. Several of the routers above have 128 MB of NAND in total. MikroTik also says: "It's not recommended to use internal storage for Containers." Its recommendation is an external disk with at least 100 MB/s sequential speed and 10K random IOPS (input/output operations per second).
The disk holds a second thing that matters more than the image: Tailscale's state. Tailscale's docs say the state directory "must persist across container restarts or your container will appear as a new node each time." If TS_STATE_DIR is not set, the container keeps its state in memory, so every reboot of the router creates a new machine in your admin console.
Plug in a USB disk and find its name:
/disk printFormat it as ext4. This erases the disk.
/disk format usb1 file-system=ext4 mbr-partition-table=noOlder guides print /disk format-drive. RouterOS 7.19 renamed that command to format, so use the new name on 7.25.2.
Since RouterOS 7.21.2 a container does not start if any of its volumes is not mounted. That is useful here. If the USB disk fails to mount after a reboot, the container stays stopped, instead of starting with empty state and registering as a new node.
Step 1: install the container package
Upgrade the router to 7.25.2 first. Since RouterOS 7.18 you can then install an extra package from the router itself: check for updates, enable the package, then apply the change. Applying it reboots the router.
/system/package/update/check-for-updates
/system/package/enable container
/system/package/apply-changesIn WinBox or WebFig the same steps live under System, Packages. After the reboot, /system/package/print should list container. If the router has no internet access, download the extra packages archive for your architecture from MikroTik's download page, upload container to the router, and reboot.
Step 2: turn on container device-mode
Installing the package is not enough. RouterOS also locks containers behind device-mode, and containers are off by default in the advanced, home and basic modes. Check the current mode:
/system/device-mode/printIf container is not yes, request the change:
/system/device-mode/update container=yesThe change is not active yet. You must confirm it within 5 minutes, by pressing the reset or mode button on the router, or by a cold reboot, which means unplugging the power. On x86 use a cold reboot, and on CHR stop and start the virtual machine. A regular /system/reboot cancels the change. If nothing happens within 5 minutes, the request is cancelled too. You can make only three unconfirmed requests before someone has to press the button or cut the power, so be standing next to the router when you run this. After the confirmation the router reboots, and /system/device-mode/print should show container: yes.
Step 3: give the container its own network
A RouterOS container talks to the network through a veth (virtual Ethernet) interface. Put that interface on its own bridge with its own small subnet:
/interface/veth/add name=veth1 address=172.17.0.2/24 gateway=172.17.0.1
/interface/bridge/add name=containers
/ip/address/add address=172.17.0.1/24 interface=containers
/interface/bridge/port add bridge=containers interface=veth1The container gets 172.17.0.2, and the router is its gateway at 172.17.0.1.
Do not add the containers bridge to the LAN interface list. MikroTik's default firewall has the rule drop all not coming from LAN in the input chain, which drops traffic to the router itself from any interface outside the LAN list. That rule keeps the container away from the router's management services and its DNS service. Adding the bridge to LAN would give the container the same management access as your desktop.
The container still needs the internet, to reach Tailscale's coordination servers and relays. Look for the default masquerade rule:
/ip/firewall/nat/printA default configuration has defconf: masquerade with out-interface-list=WAN. That rule already covers traffic from 172.17.0.0/24. If your configuration has no such rule, add MikroTik's example rule for the container subnet:
/ip/firewall/nat/add chain=srcnat action=masquerade src-address=172.17.0.0/24No port forward is needed. Tailscale makes outbound connections, and the details of the ports and protocols it uses are in the ports and firewall rules Tailscale needs.
Step 4: prepare the tailnet policy and an auth key
Give the router a tag. A tag makes the router a device of the tailnet instead of a device owned by your user account. Tagged devices have key expiry disabled by default, which a router needs, because an expired node key cuts off the LAN route until someone logs in again. A tag must exist in the tailnet policy file before a device can use it.
Open the access controls in the admin console. Add a tag owner and an auto-approver for your LAN route, merging these two sections into your existing policy file:
{
"tagOwners": {
"tag:router": ["autogroup:admin"]
},
"autoApprovers": {
"routes": {
"192.168.88.0/24": ["tag:router"]
}
}
}192.168.88.0/24 is the LAN of a default MikroTik configuration, because the default bridge address is 192.168.88.1/24. Use your own subnet if you changed it. Add the auto-approver before the first start: Tailscale applies it only when it first receives the route advertisement.
Route approval and access rules are separate, and you need both. Approval puts the route in your clients' routing tables. Access rules decide which traffic may use it. A new tailnet starts with an allow-all policy, so this works at once. If you have already narrowed your policy, add a rule that lets your users reach 192.168.88.0/24.
Now open the Keys page of the admin console and select Generate auth key. Choose a one-off key. Tailscale revokes a one-off key after it is used, so a key that leaks later is worthless. Expiry can be 1 to 90 days, and one day is enough here. Copy the key at once, because you cannot view it again after you close the dialog.
If you skip the tag, the router becomes a device of your user, and its node key expires after 180 days by default. In that case open the router's menu on the Machines page after it joins and disable key expiry.
Step 5: set the environment and the state mount
Point the registry at Docker Hub and put the extraction directory on the USB disk. Since RouterOS 7.21.2 the default registry is already docker.io, so setting it again is harmless and makes the setup explicit.
/container/config/set registry-url=https://registry-1.docker.io tmpdir=usb1/tmpCreate one environment list for the container:
/container/envs/add list=ENV_TS key=TS_AUTHKEY value="PASTE-YOUR-AUTH-KEY"
/container/envs/add list=ENV_TS key=TS_HOSTNAME value=mikrotik
/container/envs/add list=ENV_TS key=TS_ROUTES value=192.168.88.0/24
/container/envs/add list=ENV_TS key=TS_STATE_DIR value=/var/lib/tailscale
/container/envs/add list=ENV_TS key=TS_AUTH_ONCE value=true
/container/envs/add list=ENV_TS key=TS_EXTRA_ARGS value="--advertise-tags=tag:router"What each one does:
TS_AUTHKEYis the key the container uses to log in.TS_HOSTNAMEis the machine name in your admin console.TS_ROUTESis the subnet the router advertises.TS_STATE_DIRis where Tailscale keeps its node key and state. It must match the mount below.TS_AUTH_ONCE=truelogs in only when the node is not already logged in. The default isfalse, which forces a new login on every start, and that fails once the one-off key is used up.TS_EXTRA_ARGSpasses extra flags to the firsttailscale up. Here it applies the tag.
Now map a directory on the USB disk to the state directory:
/container/mounts/add list=MOUNT_TS src=usb1/tailscale/state dst=/var/lib/tailscaleRouterOS 7.21 turned the old per-container mount setting into these mount lists. Older guides that attach a single named mount to the container describe the pre-7.21 form.
Step 6: pull and start the container
/container/add name=tailscale remote-image=tailscale/tailscale:v1.104.7 interface=veth1 root-dir=usb1/tailscale/root envlists=ENV_TS mountlists=MOUNT_TS dns=9.9.9.9 hostname=mikrotik start-on-boot=yes logging=yesThe parts that matter:
root-dirkeeps the unpacked image on the USB disk, not in internal storage.dnssets the resolver the container uses. Without it, the container uses the router's DNS server list, and since RouterOS 7.24 a container refuses to start if that list is empty and no override is set. Do not point it at172.17.0.1, because the default input rule drops DNS queries from thecontainersbridge. Any resolver the container can reach through the WAN works.start-on-boot=yesstarts the container after every router reboot.logging=yessends the container's output to the RouterOS log.
RouterOS does not start a new container by itself. Watch it download and unpack:
/container/printWhen the status reads stopped, the extraction is done. Start it:
/container/start tailscaleRead what it printed:
/log/print where topics~"container"Then open a shell in the container and ask Tailscale directly. The first line runs on the router. The second line runs inside the container shell.
/container/shell tailscale
tailscale --socket=/tmp/tailscaled.sock statusThe --socket flag matters. The container's start script puts the Tailscale socket at /tmp/tailscaled.sock, and the CLI looks in a different place by default, so a bare tailscale status cannot find the daemon. A healthy result lists the router with an address from 100.64.0.0/10, followed by your other devices. A login error in the log usually means the auth key was already used or was pasted wrong.
Step 7: approve the LAN route and test it
If you added the auto-approver before the first start, the route is already approved. If not, open the Machines page, find the router with the Subnets badge, open its Subnets section, select 192.168.88.0/24 and select Save.
Test from a device on the tailnet that is not on your LAN, for example a phone on mobile data. Open the web page of a printer or a NAS at its 192.168.88.x address, or ping it. Android, iOS, macOS, tvOS and Windows pick up new subnet routes on their own. A Linux client needs one command first:
sudo tailscale set --accept-routesWhat userspace mode changes for subnet routing
The Tailscale image runs in userspace networking mode by default. RouterOS does not force this: the image chooses it unless TS_USERSPACE=false is set. It changes how the subnet route behaves, in ways you will notice.
Only TCP, UDP and ping are carried. In userspace mode Tailscale terminates each TCP and UDP connection from the tailnet peer and opens a new connection to the target from the router. Other IP protocols, and other ICMP messages, are not supported. A tool that needs anything beyond TCP, UDP or ping fails across this route.
LAN hosts see the container as the source. Because the router opens a new connection, the printer or NAS sees traffic from 172.17.0.2, not from your laptop's 100.x address. If a LAN host has a firewall that allows only your LAN subnet, add 172.17.0.2 to it. Its logs will show that one address for every tailnet user.
The route works in one direction. Tailnet devices can reach the LAN. LAN devices cannot reach the tailnet through this container, because in userspace mode local programs reach the tailnet through a SOCKS5 or HTTP proxy, not through a network interface. A static route to 100.64.0.0/10 on the MikroTik does nothing useful. Tailscale's site-to-site setup, where LAN hosts on both sides reach each other, needs Linux subnet routers using kernel networking, so it is out of scope for this setup. If the other side is a separate tailnet rather than a separate LAN, see connecting two Tailscale tailnets.
Throughput is modest. Tailscale says userspace mode "should be more than sufficient for smaller numbers of users or low bandwidth," and recommends kernel mode for heavily used subnet routers. MikroTik and Tailscale publish no throughput figure for this setup, so measure your own.
Kernel mode is possible on paper. MikroTik's manual lists /dev/net/tun among the device nodes passed to containers, RouterOS 7.23 changed its permissions, and 7.24 added privileged containers. With TS_USERSPACE=false the image uses the TUN device and requires IP forwarding when routes are set. Neither MikroTik nor Tailscale documents that the firewall rules Tailscale installs in kernel mode work inside a RouterOS container, so this guide stays with the default.
Can the MikroTik container be an exit node?
Tailscale can run exit nodes in userspace mode, and the same limits apply: only TCP, UDP and ping leave through it. There is one trap with this setup. With TS_AUTH_ONCE=true, later starts re-apply settings such as the routes and the hostname, but not TS_EXTRA_ARGS. Adding --advertise-exit-node to TS_EXTRA_ARGS after the first login therefore does nothing. Set it from the container shell instead:
/container/shell tailscale
tailscale --socket=/tmp/tailscaled.sock set --advertise-exit-nodeThen approve the exit node on the Machines page. A home connection is often a poor exit, because its upload speed limits every client. For exit traffic you want to come from a data centre, an exit node on a VPS is the usual choice, and the router keeps only the LAN route.
Who owns the node: the threat model
The container holds the node key in its state directory on the USB disk, and the auth key sits in /container/envs. Anyone with admin access to RouterOS can open a shell in the container, read the state, change the advertised routes, or copy the node to another machine. In practice, whoever administers the router owns this tailnet node. MikroTik is blunt about it: "if you run container, there is no security guarantee of any kind," and "your RouterOS device is as secure as anything you run in container." It also warns that once the container feature is enabled, containers can be added, configured, started, stopped or removed remotely.
What follows from that:
- Treat RouterOS admin accounts as tailnet credentials. Use strong passwords and limit who has them.
- The USB disk carries the node identity. Someone who walks off with the disk has a copy of the node key.
- Use the tag in access rules, so
tag:routercan reach only what it must. Do not make it a source for your servers. - To cut the router off, delete it from the Machines page. Revoking an auth key does not remove nodes that already used it.
For what Tailscale's coordination server can and cannot see, read whether Tailscale is secure. If you want new nodes to need a signature from a device you trust, Tailnet Lock adds that check.
Updating and removing the route
To move to a newer Tailscale release, pick the tag from Tailscale's changelog and change the image:
/container/set tailscale remote-image=tailscale/tailscale:v1.104.7Replace v1.104.7 with the new tag. Since RouterOS 7.22 a change to remote-image makes RouterOS pull the new image and restart the container on its own. The state lives on the mount, so the router comes back as the same machine.
To stop advertising the LAN, set TS_ROUTES to an empty value and restart the container. An empty value, not a deleted entry, is what tells the start script to withdraw routes it advertised before.
/container/envs/set [find list=ENV_TS key=TS_ROUTES] value=""
/container/stop tailscale
/container/start tailscaleFor what more users or more devices cost once your tailnet grows, see what Tailscale costs once you add users.
When it does not work
The container stays stopped after a reboot. Check /disk print. Since 7.21.2 the container does not start if a volume is not mounted, so a USB disk that did not come up keeps it stopped.
The container refuses to start and mentions DNS. The router's default DNS list is empty and the container has no dns override. Set one with /container/set tailscale dns=9.9.9.9.
A new machine appears on every restart. The state is not persisting. Check that TS_STATE_DIR and the dst of the mount are the same path, and that the container's mountlists names MOUNT_TS.
The route shows in the console but nothing answers. In order: is the route approved; is the client a Linux machine without --accept-routes; does an access rule block it; does the LAN host's own firewall drop 172.17.0.2.
WinBox or WebFig on the router is unreachable from the tailnet. That is the default input rule doing its job: connections arrive from the containers bridge, which is not in the LAN list. If you want router management over the tailnet, add a narrow accept rule above the drop rule. Find the port of the service you use with /ip/service/print, put it in place of PORT, and run:
/ip/firewall/filter/add chain=input action=accept protocol=tcp src-address=172.17.0.2 dst-port=PORT place-before=0 comment="tailnet to router management"Remember the threat model when you do this: the container now has a path to your router's management service.
FAQ
Is there an official Tailscale package for MikroTik RouterOS?
No. As of 27 November 2026 MikroTik's package list has no Tailscale package, and MikroTik says only it may make RouterOS packages. Tailscale's install docs do not list RouterOS. The working route is Tailscale's official tailscale/tailscale container image, run with the RouterOS container package on a router whose CPU MikroTik supports for containers.
Why does my hEX not run the Tailscale container?
The older hEX (RB750Gr3) has an MMIPS CPU, and MikroTik does not offer the container package for MMIPS. The hEX refresh and the hEX S 2025 use the EN7562CT CPU, which supports only arm32v5 container images, while the official Tailscale image has no arm v5 build. A router such as the RB5009 or the hAP ax³, with ARM64 and a USB port, fits this setup.
Why does the MikroTik router appear as a new Tailscale machine after every reboot?
The container is keeping its state in memory. Set TS_STATE_DIR=/var/lib/tailscale and mount a directory on an external disk at that path with /container/mounts/add. Also set TS_AUTH_ONCE=true, because the default forces a new login on every start, which fails once a one-off auth key is used.
Can devices on my MikroTik LAN reach other Tailscale devices?
Not with this setup. The container runs Tailscale in userspace mode, where tailnet devices can reach the LAN but LAN devices have no route into the tailnet, because local programs reach it only through a SOCKS5 or HTTP proxy. Two-way site-to-site routing needs Linux subnet routers using kernel networking. Install Tailscale on each LAN device that must reach the tailnet itself.
Do I need to open a port on the MikroTik for Tailscale?
No. Tailscale makes outbound connections, so the default masquerade rule for the WAN is enough and no port forward is needed. Keep the container's bridge out of the LAN interface list, so the default firewall still blocks it from the router's own management services.