[TW5] Single executable version of tiddlywiki

489 views
Skip to first unread message

Jed Carty

unread,
Mar 11, 2018, 7:34:01 AM3/11/18
to TiddlyWiki
Some background:

I have been playing around with ways to make stand-alone executable files out of node programs for a while for my other work and I have found a few working options. The npm module pkg is currently the best out of what I have used. They allow you to take a program written in nodejs and convert it into a single executable file with no external dependencies. So you can run the node version of tiddlywiki without installing node.

Using the multi-user plugin you can start up the node version of tiddlywiki one time and it will serve as many wikis as you want and you can have it create single file versions of any of the wikis without the multi-user plugin once you are done editing them (this is how I have been making all of my single file wikis lately)

The result:

You just download the tiddlywiki program and start it up, then in your browser you open localhost:8080 (or wherever you set it to be hosted, I can make it so that when you start the program it automatically opens in your default browser also) and then from within that you can create your new wikis and edit them and all of them will have two-way syncing with the file system and can support multiple people editing at the same time (or one person in multiple browsers or tabs or computers)

And the question:

Is that something people are interested in? I got very little feedback about the multi-user plugin so I suspect that most people just use tiddlywiki in a single person or single file situation. I use what I described above but it isn't packaged in a way that is portable and making it portable will take a bit of work so I wanted to see if anyone would actually use it before bothering.

Ste Wilson

unread,
Mar 11, 2018, 8:32:57 AM3/11/18
to TiddlyWiki
It sounds great.
Perhaps you could get it onto portableapps.com as one of those ways of raising tiddlywiki profile that people keep taking about.
If there was a login function for editing I'd certainly be looking at trying this out at work, perhaps running from Linux.
I did try out your previous release. :)
I think as has been said before... There aren't many of us here :)

Jed Carty

unread,
Mar 11, 2018, 9:32:44 AM3/11/18
to TiddlyWiki
A portable app version sounds like a good idea. I need to look into what that requires.

Mark S.

unread,
Mar 11, 2018, 9:50:03 AM3/11/18
to TiddlyWiki
Since there seems to be a constant refrain that TW is too complicated, especially in terms of saving, perhaps this would provide the "one" easy-start entry that most resembles applications people are familiar with. Maybe. Could it be configured to provide coverage to everyone on the wifi network? That way it would take care of people using devices (assuming they had a laptop nearby).

-- Mark

Jed Carty

unread,
Mar 11, 2018, 11:53:09 AM3/11/18
to TiddlyWiki
What do you mean 'coverage to everyone on the wifi network'?

You can already serve wikis to everyone on the network by setting the host to 0.0.0.0, so anyone on the network can already use wikis being served (and with the multi-user plugin installed they can edit them simultaneously too).

Mark S.

unread,
Mar 11, 2018, 12:35:56 PM3/11/18
to TiddlyWiki
I just meant, will that be the default?

Although, just noticing, the tip about 0.0.0.0 doesn't seem to be in the TiddlyWiki.com node.js section. I assume you set that after --server ? But users of the exe will probably not want to think about.

-- Mark

Jed Carty

unread,
Mar 11, 2018, 1:57:27 PM3/11/18
to TiddlyWiki
By default it is only served on localhost because otherwise it is a huge security risk. Part of the multi-user plugin is moving configuration for the server into the wiki itself. You can go to the control panel and change everything.

Jed Carty

unread,
Mar 11, 2018, 2:00:26 PM3/11/18
to TiddlyWiki
The point of what I described is that you run an executable file and then a working wiki opens in your browser and you don't have to think about it. That is what I have set up and what I am asking about.

TonyM

unread,
Mar 11, 2018, 6:46:29 PM3/11/18
to TiddlyWiki
Jed,

I am really keen to see this working. I think the lack of response on muilti-user is not because there is no demand but because it has a number of pre-requisite knowledge to understand, and people have been struggling with it for some time.

I for one want it very much, only it needs to be lower on my to do list because of other priorities I have building TiddlyWiki solutions. Of course a multi-user tiddlywiki that is accessible on the Internet is also a big need.

Some unstructured thoughts

I feel the default port should be a little more unique as there are an increasing number of solutions appearing on ports 80 and 8080 out of the box including many nodeJS solutions such as TiddlyDesktop and TiddlyServer. eg perhaps 8087

The single executable would be great however could there be some customisation read from a settings file distributed with it, so It can be reconfigured with various defaults and even a default TiddlyWiki (not Empty). I am interested in being able to distribute solutions not only a tiddlywiki platform. Perhaps the executable could look for index.html and load that at the root address?

I have looked into portable apps and it can be simple if what you package is simple. However it is immensely configurable..

If we distributed solutions packaged with an executable it is foreseeable two executables would be installed, I wonder how these could interact. Or should solutions always be deployed seperately with your executable considered a platform?
Could subsequent executable s use the "next Port"?

Good work
Tony

Jed Carty

unread,
Mar 11, 2018, 7:07:42 PM3/11/18
to TiddlyWiki
By default it does make sure to use an open port, if 8080 is in use it increments until it finds an open one and uses that.

It has a configuration file, you can edit then settings.json file yourself or you can edit the settings from within the wiki.

Also while you can have multiple executables at the same time it includes the multiuser wiki which can server multiple wikis so you only need one.

Jed Carty

unread,
Mar 11, 2018, 7:22:30 PM3/11/18
to TiddlyWiki
And I am a bit confused. What prerequisites are there to understand it? It is a plugin on the node version of tiddlywiki and you install and use it the same way as the normal node version. It doesn't add anything more to understand. In fact it removes the concerns about being able to save and having to be careful to not edit the same wiki from multiple computer or tabs.

TonyM

unread,
Mar 11, 2018, 8:27:18 PM3/11/18
to TiddlyWiki
Jed,

Perhaps there are no prerequisites "to understand it?" because you have done a full and thorugh job.

Thanks for your other responses, cool.

Thanks heaps
Evaluating now
Tony

TonyM

unread,
Mar 11, 2018, 9:02:15 PM3/11/18
to TiddlyWiki
Jed,

My trial use notes
Any advice please?


Windows 10, FireFox latest, Also Running TiddlyServer on port 8080
Execute tiddlyWin.exe
Opens http://127.0.0.1:8080/ in default browser\ (A TiddlyServer hosted wiki lets call it MyLocalWiki - a folder install)
Console says
NodeSettings - Failed to load settings file.
NodeSettings - Parsed raw settings.
ws-server - Failed to load settings file.
Websockets listening on  8081
 syncer-server-WebsocketAdaptor: Dispatching 'save' task: $:/StoryList

Then change browser tab to http://127.0.0.1:8081/
Long period "Waiting for" above address.
Does not load \IndexWiki

Observed creation of \IndexWiki folder and contents

Closed TiddlyServer, Stopped load on boot

Restarted computer now no other server?

Execute tiddlyWin.exe

Browser opens http://127.0.0.1:8080 again? and showing MyLocalWiki (How unless tiddlyWin.exe is serving it)

http://127.0.0.1:8081/ in browser never loads (again)

NodeSettings - Failed to load settings file.
NodeSettings - Parsed raw settings.
ws-server - Failed to load settings file.
Websockets listening on  8081
 syncer-server-WebsocketAdaptor: Dispatching 'save' task: $:/StoryList


I can only see one instance of NodeJS running in Task manager.

Regards
Tony

Jed Carty

unread,
Mar 12, 2018, 3:47:53 AM3/12/18
to TiddlyWiki
Well, if you want to just try it out than turn off tiddlyserver to test it. I threw together the packaged version so people could use it because I got frustrated. By default the auto incrementing ports part is off because that was requested by someone on github. I will change that and upload a new version.

Jed Carty

unread,
Mar 12, 2018, 3:59:12 AM3/12/18
to TiddlyWiki
Or it is set to auto increment already. Your console should say 'Websockets listening on 8081" and under that say something like "Serving on 127.0.0.1:8082"

The second one is where it is serving it. I just didn't put the updated address in the part that opens the URL for the quick demo version.

TonyM

unread,
Mar 12, 2018, 5:09:10 AM3/12/18
to TiddlyWiki
Thanks,

Will review soon. I have tried every combination with and without other items running. I will try the new version.

I only Get  'Websockets listening on 8081" 
I am not getting under that say something like "Serving on 127.0.0.1:8082"
I have now tried incrementing by one the address with no luck, But I will reboot and check nothing else is loading on those ports.

Regards
Tony

Regards
Tony

Jed Carty

unread,
Mar 12, 2018, 5:38:09 AM3/12/18
to TiddlyWiki
Version 0.0.2 is up so you may have better luck with that. Also do you have the windows firewall blocking things automatically? I can't test on windows but you may have to tell it to allow the server to run or make an exception for node.

Jan

unread,
Mar 12, 2018, 6:31:55 AM3/12/18
to tiddl...@googlegroups.com
Hi Jed,
A portable app would be a great great improvement, I immediately marked this thread important.
 Is there a test version I could try? I have looked through your postings but could not find it...

Yours jan
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/282fd2fe-ed4d-4f28-8346-67d04ba22e4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

@TiddlyTweeter

unread,
Mar 12, 2018, 6:45:47 AM3/12/18
to TiddlyWiki
Jed, comments inserted below ...

Jed wrote:
... you ... take a program written in nodejs and convert it into a single executable file with no external dependencies.

The point of what I described is that you run an executable file and then a working wiki opens in your browser and you don't have to think about it. That is what I have set up and what I am asking about.

Right. And thank you! I think its an excellent approach. Especially if it could be made "portable" (see below).

If this could work in a way the user can just "install it and start working" it opens a lot of possibilities.

For instance, if portable, one could wrap it with a specific TiddlyWiki application so that a user gets a whole "package". They would have flexibility if they needed it, but at the start they could just start using without complications on saving, backup, platform concerns etc. 

Jed wrote:

A portable app version sounds like a good idea. I need to look into what that requires.

A few comments on this. Perhaps they are obvious. But perhaps helpful.

As far as I understand it to make an application portable requires mainly that its settings only ever use relative addressing.

PortableApps.com apps have a slightly more stringent approach that requires things like a working cache to also be relatively addressed (as opposed, say, to allowing the OS' designated area for User temp files).

Its worth noting that PortableApps menuing system (directly supported only in Windows, though is Wine compliant) can run any program. In my own case I run many applications that are "portable enough" through it (i.e. make no changes to registry but do use some OS' determined locations for temporary files).

Best wishes
Josiah

 

Jed Carty

unread,
Mar 12, 2018, 6:47:44 AM3/12/18
to TiddlyWiki
It is not packaged like the portableapps.com things but you can go here (https://github.com/OokTech/TW5-SingleExecutable/releases) and download the one for your system (tiddlyLInux for linux, tiddlyOSX for mac and tiddlyWin.exe for windows). Then you copy that into whatever folder you want and run it. On windows you may have to allow network access for it, it will probably show up as node if it asks.

When you run it it should open up a browser window with a wiki in it. If you want to make it accessible to other computers on the same network than you go to the Node Settings tab in $:/ControlPanel and where you see "host": "127.0.0.1" click on the "127.0.0.1" part and enter 0.0.0.0 instead (without quotes!) and click the 'Update Settings' button below. Then down lower click on the 'Shutdown Wiki' button. This will close the server. Restart the application (by opening up the same thing you downloaded) and it should open in the browser again and you should be able to open it up from other comptuers on the network from the url given in the Hello! tiddler. It should be the default tiddler.

Jed Carty

unread,
Mar 12, 2018, 7:00:58 AM3/12/18
to TiddlyWiki
I am going to start this by saying that I appreciate the feedback and I apologise if my tone is (or has been) a bit harsh, this has been very confusing for me.

@TiddlyTweeter try out the instructions from my last post, unless there is some bug that I haven't tracked down it should work the way you are describing as 'portable enough'
without any sort of configuration.

@TiddlyTweeter

unread,
Mar 12, 2018, 8:49:35 AM3/12/18
to TiddlyWiki
Jed Carty wrote:
@TiddlyTweeter try out the instructions from my last post, unless there is some bug that I haven't tracked down it should work the way you are describing as 'portable enough'
without any sort of configuration.

I tried the latest. Worked perfectly on first run. Fabulous!

Then I closed it (the server & webpage) but noticed that the server was still running in Windows and it would not activate properly a second time.



I will try pin down this "teething issue" so it can be replicated. Later.

Josiah
Auto Generated Inline Image 1

TonyM

unread,
Mar 13, 2018, 8:15:44 PM3/13/18
to TiddlyWiki
Jed,

Progress, looking great.

I could not get this working due to something neither of us were aware of, I had a windows app installed for NodeJS, So tiddlywiki.exe was opening that session in my browser and I never got to see the "

Welcome to the MultiUser TiddlyWiki."  Somehow they clash, I was not getting "under that say something like "Serving on 127.0.0.1:8080", only Websockets listening on  8081, nothing was found on 8082 or any other port.


Removing the nodeJS from windows Apps & Features resolved this. I can now experiment.

It is looking fantastic, I have observed the update of tiddlers across 2 browser sessions. 
I would like to understand how to break this so as to know how to avoid a clash it at all possible.

I am now looking into hosting exiting other wikis, the instructions read

Go to the Node Settings tab in the $:/ControlPanel and give the wiki a name and list its path in the wikis section like this:

'otherwiki': ~/Documents/TiddlyWiki/Wikis/MultiUser



 There is no apparent wikis section in the Node settings.

Can you please tell me what this looks like, and potentially update the instructions to make this clear?

I am guessing something like


What does "~" Refer to?, Most of my single file and NodeJS wikis are located under;
C:\Data\TW5\Folder
With tiddlywiki.exe installed in
C:\Data\TW5\TiddlyWIkiMU


Thanks in Advance
Tony

TonyM

unread,
Mar 13, 2018, 8:28:06 PM3/13/18
to TiddlyWiki
Jed/Josiah,

The solution is already very easy to distribute, and need not have a portableapps.com install, or it would be very easy to make one.

However If someone is trying to distribute a TiddlyWiki they built and want to host it through TiddlyWikiMU (my name for Jed's solution), it seems it would be simple to package it in a ZIP package, or installer that unpacks the folders that are created under the subfolder IndexWiki or any additional folders for other wikis.

PS Jed, I think your  settings.json editor is a leap ahead. Thanks

Regards
Tony

Jed Carty

unread,
Mar 14, 2018, 4:01:05 AM3/14/18
to TiddlyWiki
The way you listed the wiki is exactly how to do it. I keep forgetting people use windows, putting ~ in a path in linux or osx makes it start at that users home folder. For windows you just put the full path to the tiddlywiki.info file. I haven't set this up to server single file wikis yet so that won't work. Even if this does serve and let you save single file wikis it wouldn't let multiple people use them.


I should be able to make it convert a single file wiki into individual tiddler files and then add a button that will create a single file version of the wiki that you can use else where. So it wouldn't be multi-user single file wikis but you could kind of fake it.

Ste Wilson

unread,
Mar 14, 2018, 5:38:12 AM3/14/18
to TiddlyWiki
My portable Apps thought was as much about getting our wonderful Wiki some visability as anything else but I appericiate it's probably extra hassle.

@TiddlyTweeter

unread,
Mar 14, 2018, 7:12:21 AM3/14/18
to TiddlyWiki
Ciao Ste & Jed

Its early days but from the look of it it does look like it might be possible to make a legit portable app of the PortableApps.com type if someone wanted to. It wouldn't need to be Jed.

In terms of usability widely an issue would be how many folk run PortableApps.com system under Wine on non-Windows machines. I don't know the numbers. But its a factor with TW as lots of users and potential users are on non-Windows systems who'd need Wine to run it.

The advantage of PortableApps.com format, beyond its portability, is its simple install mechanism that gets it in the right place within the PA structure for programs. It makes managing programs really easy (as you know! :).

Best wishes
Josiah

Jed Carty

unread,
Mar 14, 2018, 7:15:50 AM3/14/18
to TiddlyWiki
I already have the executables for osx and linux. Packaging a version for distribution with the portable apps stuff wouldn't change that.

@TiddlyTweeter

unread,
Mar 14, 2018, 7:23:25 AM3/14/18
to TiddlyWiki
Ciao Jed

All is well. I'm testing it out various ways. I'll give more feedback when I can make it clear enough to be worth having.

I have one tech query. Am I right that "node.exe" remains in memory once started? Even if you close all wikis? I don't see it as a problem. I'd just like to know so I can be sure its working correctly

Best wishes
Josiah

Jed Carty

unread,
Mar 14, 2018, 7:27:12 AM3/14/18
to TiddlyWiki
That should not be happening, I am not sure that you should even see node.exe running as part of this. I am not sure how windows handles it. Are you running TiddlyServer or something else that uses Node?

@TiddlyTweeter

unread,
Mar 14, 2018, 7:38:20 AM3/14/18
to TiddlyWiki
Jed:
That should not be happening, I am not sure that you should even see node.exe running as part of this. I am not sure how windows handles it. Are you running TiddlyServer or something else that uses Node?

I'm not using other Node software at the same time. "node.exe *32" appears in Windows Task Manger when you start the program and persists until you force a manual terminate.
Message has been deleted

@TiddlyTweeter

unread,
Mar 14, 2018, 8:41:57 AM3/14/18
to TiddlyWiki
Jed

Update: Sorry. I may be wrong. It looks like there is some piece of software on the computer that is using node I was unaware of. I don't know what it is yet. Its a bit complicated to pin down but after a time it restarts node. So its difficult to know what your app does and what is being done by something else. I'll let you know when I have more info.

It may be that your app is nothing to do with it at all.

Josiah

On Wednesday, 14 March 2018 12:44:28 UTC+1, @TiddlyTweeter wrote:
Jed

FYI, Windows reads the tiddlyWin.exe "Original filename" as "node.exe". Here is a screen shot ...


@TiddlyTweeter

unread,
Mar 14, 2018, 9:01:59 AM3/14/18
to TiddlyWiki
Jed

I don't think the issue is anything to do with your program, so forget I ever said anything :-). The issue was Adobe Creative Cloud that uses node and restarts it when it wants to :-).

FWIW, I noticed that using TiddlyServer it creates a second instance of node that works fine alongside the Adobe version.

Best wishes
Josiah

Kevin Kleinfelter

unread,
Apr 4, 2018, 4:46:33 PM4/4/18
to tiddl...@googlegroups.com
The Command/Terminal window drives me nuts.  Both Windows and Mac offer ways to run programs without a Command/Terminal window.  If I were to run it invisibly, redirecting stdout and stderr to log files...

Does it have to have an orderly shutdown in order to save files?  If I waited 10 seconds after my last update, could I just kill the process, or would that lose critical data?


Kevin Kleinfelter

unread,
Apr 4, 2018, 5:02:15 PM4/4/18
to TiddlyWiki
And one more question:

Suppose I run it on my Mac for a few weeks and then decide to move it to my Linux server.  Can I just:
  • Recursively copy the directory containing tiddlyOSX.command to my Linux server
  • Replace tiddlyOSX.command with tiddlyLinux
  • Launch tiddlyLinux
and I'll have all my existing wiki data + config?

Jed Carty

unread,
Apr 5, 2018, 3:44:31 AM4/5/18
to TiddlyWiki
Kevin,

In order:

I am sure there is some way to make this run without a terminal opening, but I suspect that it would require an additional wrapper on the executable. I can look into it but I have the process for building these automated because I don't use them (I have my wikis running on a server I carry around) finding out the os-specific wrappers needed to suppress the terminal is going to be a low priority.

Tiddlers are saved individually right after editing them (but for now drafts are not saved), so unless you kill the server almost immediately after making a change everything should be saved, and even if you do kill the server right after making a change only that change would be lost.

Yes, it looks in the folder where the executable is. I have a usb stick with all there executables on it and can plug it into a computer with windows osx or linux and run it with the same wikis. The executable is just the node version of tiddlywiki with the multiuser plugin packaged into a single executable that give the wiki path as ./IndexWiki. There is a little bit more that creates the index wiki if it doesn't already exist and to open up the wiki automatically in the default browser, but as far as normal operation goes it is the same. And if you want to use the wikis the normal way using node they are just normal wikis.

TonyM

unread,
Apr 5, 2018, 7:10:08 AM4/5/18
to TiddlyWiki
Jed,

I think the feature "open up the wiki automatically in the default browser" is a great feature especially on first run. I know have this launched at login to my Windows Box and a pinned tab for the index wiki.

In fact one feature of multi-user is I can open a wiki when needed and need not worry about accidental duplicate opens. 

As a result of this frequent use I would like to disable this open in default browser, is it practical for me to do so? Perhaps this could be a feature/Setting in future releases.

Thanks in Advance
Tony

Jed Carty

unread,
Apr 5, 2018, 8:15:18 AM4/5/18
to TiddlyWiki
A setting to prevent the wiki from opening up automatically should be easy enough to add. I will add an issue on GitHub to add it.

And I am a bit surprised that anyone is using this consistently.

@TiddlyTweeter

unread,
Apr 5, 2018, 11:46:31 AM4/5/18
to TiddlyWiki
Jed

This is a great bit of kit!

Am I right in thinking that at the moment the wikis listed under "Wiki Edition" ...



... are compiled into the executable?

I was wondering if it would be possible to have a "Wiki Template Gallery" that is outside the executable to copy boilerplate wikis from? They would not need be in the default install, just IF the Wiki Edition drop down could detect they are there and copy over?

Why am I interested in that?

Because it helps support using your tool in many scenarios --- being able to provide "template TW" suited to different types of user group.

For instance, say I wanted to make a portable system for gamers, how can I give them some different types of game campaign structures to start from?

Basically, I think the integration of relevant "Wikis as templates" into tools like your multi-user, is exactly the way to go to connect with wider audiences.

I'd rather not have to compile them into an executable IF they could just be held in (an optional) sub-dir that the Wiki-Edition could detect?

This is just a thought. I hope I'm being clear enough.

Ask if there is ambiguity.

Best wishes
Josiah
Auto Generated Inline Image 1

@TiddlyTweeter

unread,
Apr 5, 2018, 12:34:06 PM4/5/18
to TiddlyWiki
Ciao Jed & Kevin

FWIW, its quite easy in Windows to achieve the minimalisation, or hiding, of the "console" window.

But I think Jed is right that this is an issue for O/S specific wrappers. I'm not sure it should be his problem. But, rather people who use it and re-wrap it to support specific TW apps they are promoting???

Best wishes
@TiddlyTweeter

Jed Carty

unread,
Apr 5, 2018, 3:55:59 PM4/5/18
to TiddlyWiki
The executable has everything that is in the repo on gitlab, so It has all the core plugins and editions available. The ones listed are just the ones I typed in before getting bored.

New wikis are made using the the createNewWiki message that uses a modified version of the builtin init command. You can set a path to look for more plugins using environment variables in the same way as with the normal node version. Fetching them from somewhere would probably be a plugin by itself but it is possible.

@TiddlyTweeter

unread,
Apr 5, 2018, 4:00:36 PM4/5/18
to TiddlyWiki
Your boredom level I'd rather not know about :-) It makes me slightly nervous as i am extremely boring.

@TiddlyTweeter

unread,
Apr 5, 2018, 5:22:17 PM4/5/18
to TiddlyWiki
thanks Jed. I think its an interesting idea to pursue. I see if can understand how to do it.

Best
Josiah

TonyM

unread,
Apr 5, 2018, 6:56:34 PM4/5/18
to TiddlyWiki
Jed, Mate,

It seems to be a constant attribute of yours to under estimate the value of your contributions and how much people use them. True there is minimal feedback and no quantification of who in and what the community is using. 

A proxy for this is people in the community talking about your tools and mentioning them in response to others questions. For members to do this it is clear your tools are on their mind and on their computers.

I for one love, depend on and are very impressed with Multi-user, Single Executable and GenTags to name a few currently on my mind.

Your contributions are certainly in the top 10 list of the best community contributions.

With respect i suggest you suspend your disbelief and assume we are using everyone of your tools consistently.

Yours Sincerly
Tony
Reply all
Reply to author
Forward
0 new messages