Bob set to 0.0.0.0 for local network access

238 views
Skip to first unread message

Dave

unread,
Dec 19, 2018, 10:03:34 PM12/19/18
to TiddlyWiki
Hi,

I thought I'd try setting the host thingie in BobExe to 0.0.0.0 to see if my phone access works better that way than via just syncing files to my phone and using the termux node method.


But when I go to the address listed for me (192.168.0.119:8082)me , my phone just says "this site can't be reached"

I also tried :8080, 8081, and 8083 because Mark S mentioned something about numbers being off for him.


Is this possibly a filePathRoot thing?  Do I need to switch to the plugin method to do this (was thinking of doing that anyway)?



Thanks,
-Dave

TonyM

unread,
Dec 20, 2018, 12:26:51 AM12/20/18
to TiddlyWiki
Dave,

Try save config and reload bob to to ensure it sees any changes.

Is the phone on the same network such as via your wifi, can you access anything else in the network?

If you can see the phones ip address and its on the same network can you ping it from your computer?

Let us know, what you know about your setup at a high level so we can see what you already know, and help from there.

Regards
Tony

Dave

unread,
Dec 20, 2018, 12:52:26 AM12/20/18
to TiddlyWiki
* saving and reloading works
* I have Fing (android app) and I can ping successfully my computer with the Bob instance, and it accesses other stuff normally on the network
* I can also successfully ping the phone from the computer
* I also successfully switched from BobExe version to the plugin version, and I still can't access the wiki through the address on the phone
** the plugin version is asking to use 192.168.0.119:8080 this time, and it doesn't work, and neither does 8081 through 8084

Just to clarify, when this method works, its just the browser that you're viewing the TW with, and there's no need for Termux and node on the phone, right?

* I also tried it with both Chrome and Samsung Browser

P.S. I haven't deleted my Termux instance of Bob on the phone.  That shouldn't interfere with this, should it?

The reason I'm trying this is because I'm finding my plugin version on the phone via Termux keeps crashing (couple times a day) and I have to reload it 1-3 times to bring it back up.  I thought this way over the local network would (possibly) be more stable.

TonyM

unread,
Dec 20, 2018, 2:17:07 AM12/20/18
to TiddlyWiki
Dave,

Correct about Termux, thought trying the opposite way can help.

Can you turn off a firewall or other protection on your computer.

Sounds like you are doing it correctly.

Tony

Jed Carty

unread,
Dec 20, 2018, 4:28:46 AM12/20/18
to TiddlyWiki
The easiest thing that would be causing this is not having the settings save properly in Bob. When you stop and restart Bob one of the lines in the terminal should say Serving on 0.0.0.0:8080 (or which every port it is using), if it says 127.0.0.1:8080 instead than the settings aren't saving correctly.

If that happens than go to the Manual Settings tab under the Bob Setting control panel tab and make sure that in the ws-server section it has the host set to 0.0.0.0 and then click the update settings button. It should say Wrote settings file in the terminal.

If that is all working correctly than it is probably a network settings problem outside of Bob and Tony's suggestion is the way to go. There may also be some setting on your router that could cause trouble but I have never run into that problem so it is just a guess.

And as a note, the problem with the incorrect port being shown should be fixed. Even if it isn't the port that you use to access Bob on the computer running it is the same as the port you use on anything else on the network so you don't have to just blindly try ports and hope.

Dave

unread,
Dec 20, 2018, 12:17:58 PM12/20/18
to TiddlyWiki
I must not be restarting properly because when I repeat the startup commands:

yad --text="Bob coming up (in Chrome)" --timeout=1 --center ;cd /home/david/SyncthingFolders/Bob/TiddlyWiki5;node ./tiddlywiki.js Wikis/BobWiki  --wsserver


I can still see it at 127.0.0.1:8080

but not at 192.168.0.119:8080

even though this is in the settings (image)

Is there some specific process I should be pkilling first?
restartBob.bmp

Mark S.

unread,
Dec 20, 2018, 12:30:48 PM12/20/18
to TiddlyWiki
Check your processes to make sure "nw" is no longer running. I find that in various implementations with node that it doesn't always shut down.

-- Mark

Dave

unread,
Dec 20, 2018, 1:01:30 PM12/20/18
to tiddl...@googlegroups.com
it turned out it was node that I had to pkill:

david@lat:~$ pkill nw

david@lat:~$ pkill node

david@lat:~$ yad --text="Bob coming up (in Chrome)" --timeout=1 --center ;cd /home/david

/SyncthingFolders/Bob/TiddlyWiki5;node ./tiddlywiki.js Wikis/BobWiki  --wsserver



(yad:9798): Gtk-WARNING **: 10:57:06.377: Unable to locate theme engine in module_path:
"adwaita",



(yad:9798): Gtk-WARNING **: 10:57:06.381: Unable to locate theme engine in module_path:
"adwaita",

NodeSettings - Parsed raw settings.

Added route /^\/NewWiki\/?$/

Added route /^\/textAnalysis\/?$/

TiddlyWiki version 5.1.18 with Bob version 1.1.2

{ Error: listen EADDRINUSE 127.0.0.1:8080

    at
Object._errnoException (util.js:992:11)

    at _exceptionWithHostPort
(util.js:1014:20)

    at
Server.setupListenHandle [as _listen2] (net.js:1355:14)

    at listenInCluster
(net.js:1396:12)

    at doListen
(net.js:1505:7)

    at _combinedTickCallback
(internal/process/next_tick.js:141:11)

    at process
._tickCallback (internal/process/next_tick.js:180:9)

    at
Function.Module.runMain (module.js:695:11)

    at startup
(bootstrap_node.js:191:16)

    at bootstrap_node
.js:612:3

  code
: 'EADDRINUSE',

  errno
: 'EADDRINUSE',

  syscall
: 'listen',

  address
: '127.0.0.1',

  port
: 8080 }

 syncer-server-WebsocketAdaptor: Dispatching 'save' task: $:/StoryList  
david@lat:~/SyncthingFolders/Bob/TiddlyWiki5$



I think Jed might have made some suggestions about modifying text files in another thread - I'll look for that and try later unless there's an obvious answer you can see here.  Wondering about that EADDRINUSE error.

edit: nevermind about the other thread - it was about suppressing the browser automatically coming up...


Is there a way to force an address in the terminal command to start all this up?

Jed Carty

unread,
Dec 20, 2018, 3:25:22 PM12/20/18
to TiddlyWiki
The screenshot that you shared shows it saying that it isn't available on the local network. So the host setting isn't getting properly saved.

I don't know why the ports would be still in use. There were a few times when I ran into the ports not being freed after stopping the process but I thought it had to do with something I was doing wrong with the websockets that I fixed.

TonyM

unread,
Dec 20, 2018, 7:55:17 PM12/20/18
to TiddlyWiki
Restarting the PC is as you know the solution to many ills :)

Dave

unread,
Dec 20, 2018, 8:39:09 PM12/20/18
to TiddlyWiki
ha ha, yeah tried that...  I also tried pkilling syncthing, but that didn't work either.  Next I'll try looking at my router settings (although the same thing is happening (not happening) at both my work and home computers)

Jed Carty

unread,
Dec 21, 2018, 3:34:19 AM12/21/18
to TiddlyWiki
Dave,

Try simple first. Both the screenshot and the error you shared show that it isn't using 0.0.0.0 as the host. Open the settings.json file in a text editor and make sure that under the ws-server key you have host set to 0.0.0.0

And if you have other processes running that are taking ports that you are not sure of you can set it to autoincrement the port and it will use the first open port that is available.

Dave

unread,
Dec 21, 2018, 10:21:45 PM12/21/18
to TiddlyWiki
That worked! Thank you!! (I like simpler first too, ha ha)

Dave

unread,
Dec 21, 2018, 10:31:02 PM12/21/18
to TiddlyWiki
So for a next step... in order to access it this way (let's say I was able to install Bob on my raspberry pi)  how hard would it be to be able to access it this way from outside the network (e.g. in my car or out doing errands via mobile data)?

I'm guessing from some initial reading I've done that I'd have to set up a VPN to do that? (or are VPNs only for outgoing?)

I assume this ( https://github.com/OokTech/SecureWikiServer ) is the "blessed" way to do it, but that's above my proficiency...  Is there another way for amateurs like me?

Dave

unread,
Dec 21, 2018, 11:41:32 PM12/21/18
to TiddlyWiki
Ok, I think I got my router to allow a VPN, I have the username, password, and PSK for that.  On my android phone I set up the VPN connection to that info and it says "connected", but then what do I do next?  


I found out my external IP address from some website for that purpose, and inside my network Bob says the TW is at 192.168.0.119:8080. (that's what works inside the network)


But what do I do next? I tried (externalIPaddress):8080.  That didn't work.  I would imagine I'd have to do something like (externalIPaddress)/192.168.0.119:8080, but that doesn't work.

Has anyone successfully got something like this working?

Dave

unread,
Dec 22, 2018, 12:08:47 AM12/22/18
to TiddlyWiki
Getting closer...

I set my router so I can access the router itself from outside, so in the browser its (externalIPaddress):8080 and then you have to enter the router password etc

But how do I go from "(externalIPaddress):8080/homepage.html" to the BobTW address?

I tried tacking on "/192.168.0.119:8080" after the first "8080" to that, but it didn't work...

TonyM

unread,
Dec 22, 2018, 12:43:02 AM12/22/18
to TiddlyWiki
Dave,

I belive you need set a dmz or port forwarding on the router. Remember you pi the becomes the attack surface for any one or thing on the internet, and it is in your network once hacked.

Careful,

Do you have a synology nas at home?

Tony

Dave

unread,
Dec 22, 2018, 1:15:53 AM12/22/18
to TiddlyWiki
Ok I'll look up port forwarding, thanks - Yeah I definitely don't want to set up something stupidly vulnerable.

No synology, just a router and a NAS and a plex server on an Nvidea shield pointing to the NAS (Buffalo I think, not sure if that's important), and I'm playing around with connecting to the TW on my laptop.  If I can figure out how to do this safely I'll then set it up at my work network on a pi.

TonyM

unread,
Dec 22, 2018, 2:39:56 AM12/22/18
to TiddlyWiki
Dave

I mentioned the nas because I can intall apps on it. I can access it from the internet and with its two lan ports you can install firewall and proxy software and use this to strengthen and contol access I have not done it yet, but may open node js in a docker container running on the nas. I do not know your nas.

Best of luck
Regards
Tony

Dave

unread,
Dec 22, 2018, 10:17:05 AM12/22/18
to TiddlyWiki
Thanks for the info. I've heard of Synology NASs, and now I know why people like them :)

I was also thinking maybe this is an excuse to look in to a digital ocean droplet. I wonder if a Bob instance could easily be done there...

I guess I should really take the time to figure out that secure server thing that Jed provides on his GitHub. All that talk of private and public keys makes me pause... I guess if I can learn how to write a TW macro I should be able to learn that, ha ha.

Jed Carty

unread,
Dec 22, 2018, 10:56:35 AM12/22/18
to TiddlyWiki
The public and private key part is very simple to do. You run a command to generate the keys and it generates a file then you put the path to that file in the configuration file. I think that I even put the commands you need to type in to generate the keys. Getting a certificate from lets encrypt can give you free https if digital ocean doesn't provide that.

Dave

unread,
Dec 22, 2018, 2:42:34 PM12/22/18
to TiddlyWiki
Thank you Jed. I think that's what I'd like to do.

I'm on holiday now so if I have failure or success I'll probably post about it in a separate post later

Thanks again for making Bob :)

Btw, is Bob your uncle? (Ie where did the name come from?)

Jed Carty

unread,
Dec 22, 2018, 2:58:26 PM12/22/18
to TiddlyWiki
The name came from every time I have tried to use a descriptive name people have assumed that they understand everything about what I made. And then english speakers didn't like TiddlyFoule (in french foule means crowd or mob and is pronounced something like fool, so you could say TiddlyFoule like Mr. T, which I liked.). But after significant pushback about that I gave up and decided to go for the most generic thing I could come up with. When I code bob is my go to generic name for variables that I don't have a better name for so it became Bob.

Dave

unread,
Dec 22, 2018, 3:56:08 PM12/22/18
to TiddlyWiki
Ha ha too bad - the logo could have been Jack the cat with gold chains saying "I pity the foule!"

Dave

unread,
Dec 22, 2018, 4:29:30 PM12/22/18
to TiddlyWiki
Oh, one more thing...

I was listening to Destination Linux and one guy was taking about how there's an easy droplet you can get on digital ocean that's a Next Cloud instance that you can easily set up to be private and secure.

Is that something that you could plug in an instance of Bob into? I realize you can't know all there is available out there, but just thought I'd ask in case you're aware of Next Cloud. All I know about it is it's kind of a private dropbox but with calendar, file sync and maybe intra system messaging between people you've shared folders with (I think). Is avoided it so far and went with syncthing because I heard a while back that it can damage/lose large files, but I would think that's been fixed by now.

Jed Carty

unread,
Dec 22, 2018, 4:42:40 PM12/22/18
to TiddlyWiki
I had a local nextcloud server for a while. I am not sure what easy secure setup they use, but any secure setup on the internet is going to require pretty much the same things. You need a certificate for https and a private key for encryption, which can come with the certificate if you want to use that.

So I suspect that the nextcloud server isn't any easier to setup than the secure server I made, it just has better publicity. I have heard of some hosting companies that have the option to have an automatically set up nextcloud instance on a vps, but that just means someone else is doing the setup.
Reply all
Reply to author
Forward
0 new messages