Can't sync Anytype in local-only mode

Devices

Desktop (Qubes OS 4.2.4)

  • appVM with Anytype (vault with data)
  • sys-firewall
  • sys-net (wireless connection to the router)

Router

Smartphone

  • Anytype (empty; I scan the QR code here to pair with the vault from the desktop, download data, and sync it later)

Both Anytype apps use local-only mode for syncing (P2P over local network).

Problem localization

I can sync Anytype in local-only mode on another OS on my desktop, so the problem lies with Qubes OS.

Guesses

Looks like any-sync uses mDNS to find another peers (I’m not sure). And there’s something with mDNS in Qubes OS (according to topics from this forum). However, I’m afraid that all solutions described here won’t work for me (it’s mainly about finding printers from sys-net).

In total, there’s something with the firewall or between AppVMs.

Request

Has anyone tried syncing Anytype on Qubes OS in local-only mode?

How can I solve my problem?

Thanks

In general it should be possible to use mDNS with Qubes in a qube other than sys-net but it’s going to be very difficult and I haven’t really managed to do it myself.

This guide by @solene could come in handy, though:

I haven’t been able to get mdns to work outside sys-net, I think I found someone’s snippet to make it work for Qubes os, but I forgot where and didn’t try it :disappointed:. I have some hints where to find it though, I’ll come back with the link if I can figure where I found it.

There is a comment in the script in this PR that mentions converting broadcast packets to unicast to make forwarding work. Didn’t try if it works.

1 Like

Oh, @Atrate, @solene, thanks for the quick reply.

It looks like opening port 5353 will allow Mobile Anytype to find Desktop Anytype.

You know… I have a feeling you’re talking about more steps than just running the script for 5353 and trying to sync again :slight_smile:

Anyway, I wouldn’t bother you with every little thing.

Thanks, I’ll try that later.

That’s really only what you need if you are fine with running the software in sys-usb :slight_smile:

1 Like

I did it!

  1. I copied nat.sh by Solene. Thanks that it’s short and I can quickly review it.

qvm-run --pass-io source-vm 'cat /path/to/file/in/source/vm' > /path/to/file/in/dom0

  1. I run
    ./nat.sh anytypeAppVM 5353 udp
    in dom0.

  2. I logged in Anytype on my smartphone. (Both devices are connected to the same local network of course.)

The synchronization does not occur when I use Wi-Fi Hotspot from the smartphone, though. It doesn’t matter now, so the problem is solved.

I was surprised when it worked immediately after I entered the script. It usually takes a few days to find a solution in Qubes OS cases…

:fireworks:

2 Likes