A Portable Tiddlywiki Node.Js on a Thumb Drive

302 views
Skip to first unread message

Mohammad

unread,
Apr 17, 2020, 3:41:12 PM4/17/20
to TiddlyWiki
You may like to have a Tiddlywiki on Node.js with all its features on a thumb drive!
Or a Plug and Play Tiddlywiki.

If so, this is a short instruction for Windows user. 

1. Download the portable Node.js:  (NodeJSPortable_6.14.2.zip)  from here

2. Unzip on your thumb drive in the folder of choice

3. Run NodeJSPortable.exe   

4. In the command window appears install Tiddlywiki with below command (you need internet access)
    npm install -g tiddlywiki

5. That's all


Make a test
1. Create a new wiki, by entering  below command
    tiddlywiki mynewwiki --init server

2. Run your wiki by entering  below command
    tiddlywiki mynewwiki --listen

3. Open a browser (FF, Chrome, Edge, Safari, ...) and
     visit http://127.0.0.1:8080/ in your browser


It has all the same features as Tiddlywiki on NodeJS, plus, it leaves no personal information behind on the machine you run it on, so you can take it with you wherever you go.


This is another journey in Tiddlywiki wonderland.

--Mohammad


Mark S.

unread,
Apr 17, 2020, 4:01:35 PM4/17/20
to TiddlyWiki
If you use "-g", isn't it putting the data down in your user drive? Or is it smart enough to put it all on the thumb drive ?

Plus, in the past, node had a habit of creating empty directories in the app/roaming directories even if you had specified specific local directories. This would be hard to detect unless you test on a machine that has never used node.js at all. That is, is it possible that bread crumbs are being left even if you use a portable device?

Arlen Beiler

unread,
Apr 17, 2020, 4:53:32 PM4/17/20
to TiddlyWiki
Another way is to download the zip file from NodeJS.org, and copy the node.exe file into the tiddlywiki folder, then (on windows) run "node.exe tiddlywiki.js". You can download the tiddlywiki folder from GitHub. It sounds like that is slightly more complicated than your method, but just thought I'd mention it. 

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/9bc1ec76-a308-472c-b99c-f66e5dd31519%40googlegroups.com.

TonyM

unread,
Apr 17, 2020, 6:31:41 PM4/17/20
to TiddlyWiki
Mohammad

Thanks for sharing this.

It can be quite common for a computer to have an app or server running on local host. In this case the 127.0.0.1:8080 may not be available. If your instructions do not work do you think you could add the ability to see the port used, set the port or use another local host address eg 127.0.1.1?

I like the clear simple instructions so please stick with that but perhaps add a post install check.

Regards
Tony

Mohammad

unread,
Apr 18, 2020, 3:31:20 AM4/18/20
to TiddlyWiki
Hi Mark,


On Saturday, April 18, 2020 at 12:31:35 AM UTC+4:30, Mark S. wrote:
If you use "-g", isn't it putting the data down in your user drive? Or is it smart enough to put it all on the thumb drive ?

It seems portable node.js smartly put Tiddlywiki in the right place : in App/node_modules folder on the thumb drive 

Plus, in the past, node had a habit of creating empty directories in the app/roaming directories even if you had specified specific local directories. This would be hard to detect unless you test on a machine that has never used node.js at all. That is, is it possible that bread crumbs are being left even if you use a portable device?

I did not test this! But I will make a test and let you know! 

Mohammad

unread,
Apr 18, 2020, 3:34:21 AM4/18/20
to TiddlyWiki
Hi Arlen,
 Many thanks for your input! Your method may results in a much smaller size!
 I will give a try!

The reason of portable Tiddlywiki + Node.js is to use the full power for busy or non-technical people!

Thank you!

--Mohammad
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.

TonyM

unread,
Apr 18, 2020, 3:41:01 AM4/18/20
to TiddlyWiki
Great idea Mohammad.

Perhaps make it a zip or an install batch that can be stored localy to the same effect.

Do consider an alternate local host address so it does not clash with typical uses of local host e.g. 127.0.1.100

Regards
Tony

Mohammad

unread,
Apr 18, 2020, 3:47:57 AM4/18/20
to TiddlyWiki
Tony,
 This is Node.js so what you can do with Node, you should be able to do with Protable TW+Node.js
 It seems both IP and port can be customized!

--Mohammad

Mohammad

unread,
Apr 18, 2020, 3:49:43 AM4/18/20
to TiddlyWiki
Tony, this seems possible and you can add your own settings!
 

Regards
Tony

Mohammad

unread,
Apr 18, 2020, 3:55:03 AM4/18/20
to TiddlyWiki


On Saturday, April 18, 2020 at 12:11:01 PM UTC+4:30, TonyM wrote:
Tony, have a look at this page and see how Node.js can be started on different IP. 

To my understanding 

tiddlywiki --server  9999


Starts node at localhost and port 9999 so, one needs to customize this.
 

Regards
Tony

Mohammad

unread,
Apr 19, 2020, 4:16:08 AM4/19/20
to TiddlyWiki
Further to the instruction by Arlen one can download simplesrv



and create a readonly webserver to fire any single .html Tiddlywiki.

So, it possible to have a portable webserver for Tiddlywiki (and holding plugin libraries) on a thumb drive
The size of server 14MB if one use Node.JS 6.x

In summary

1. Follow the instruction by Arlen above, lets you have a tiny NodeJS+Tiddlywiki server (read/write/save) + (Arlen may guide us to create backup)
2. Add the simpleserv above to have a readonly webserver on another port
3. Put all in folder on a thumb drive

The above setup is small and can be used on Raspberry Pi and similar device.

I am thinking  one can put whole of these on an old Android cell phone and setup a portable NodeJS+Tiddlywiki server



On Saturday, April 18, 2020 at 1:23:32 AM UTC+4:30, Arlen Beiler wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.

TonyM

unread,
Apr 19, 2020, 4:52:19 AM4/19/20
to TiddlyWiki
I had a look at the Twexe for windows it needs upgrading to 5.1.22 and I can't yet work out how to do this. It works as desired already.

Regards
Tony

Arlen Beiler

unread,
Apr 19, 2020, 8:47:54 AM4/19/20
to tiddl...@googlegroups.com
People have in the past had problems with memory consumption when using data folders and because TiddlyServer is intended to load data folders as faithfully as possible, Jed created Bob, which does things a little different but still works with almost all data folders. However the latest raspberry pi should have enough memory to be able to handle TiddlyServer quite easily. I’m assuming one would get the 4 GB version if you’re going to use it for a server anyway. So I’m guessing this isn’t as big of a problem as it used to be.

Single file wikis on the other hand shouldn’t take much memory. The TiddlyServer  documentation says how to enable back ups for single file wikis. And the WebDAV saver works as expected, unlike Apache. 
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/0e7967b9-7f71-4c0b-93cb-f6bd2a8e76ce%40googlegroups.com.

Arlen Beiler

unread,
Apr 19, 2020, 9:54:21 AM4/19/20
to TiddlyWiki
Ok, I ran top to see what the memory actually is. My computer is a 16 GB machine. TiddlyWiki on Node uses 150 MB. TiddlyServer used 100 MB per wiki (approximately), but less than 30 MB when no wikis were loaded (sorry, top only listed the first page of results). Now, given Node's memory management, I would guess that a more constrained environment would use less, so I'm curious what results other people get. 

In my mind, this is huge, so I'm not surprised people need a way around it, but I'm not sure what the culprit is. I'll do some digging. All I know is it's it's big on Node TiddlyWiki and on TiddlyServer both, so it's probably somewhere in TiddlyWiki.

Mohammad

unread,
Apr 19, 2020, 12:03:55 PM4/19/20
to TiddlyWiki
Hi Arlen,
 Many thanks for these useful inputs! So, one should make trade off between this flexibility and memory consumption!

Best
Mohammad


On Sunday, April 19, 2020 at 6:24:21 PM UTC+4:30, Arlen Beiler wrote:
Ok, I ran top to see what the memory actually is. My computer is a 16 GB machine. TiddlyWiki on Node uses 150 MB. TiddlyServer used 100 MB per wiki (approximately), but less than 30 MB when no wikis were loaded (sorry, top only listed the first page of results). Now, given Node's memory management, I would guess that a more constrained environment would use less, so I'm curious what results other people get. 

In my mind, this is huge, so I'm not surprised people need a way around it, but I'm not sure what the culprit is. I'll do some digging. All I know is it's it's big on Node TiddlyWiki and on TiddlyServer both, so it's probably somewhere in TiddlyWiki.

On Sun, Apr 19, 2020 at 8:47 AM Arlen Beiler <arle...@gmail.com> wrote:
People have in the past had problems with memory consumption when using data folders and because TiddlyServer is intended to load data folders as faithfully as possible, Jed created Bob, which does things a little different but still works with almost all data folders. However the latest raspberry pi should have enough memory to be able to handle TiddlyServer quite easily. I’m assuming one would get the 4 GB version if you’re going to use it for a server anyway. So I’m guessing this isn’t as big of a problem as it used to be.

Single file wikis on the other hand shouldn’t take much memory. The TiddlyServer  documentation says how to enable back ups for single file wikis. And the WebDAV saver works as expected, unlike Apache. 

Mohammad

unread,
Apr 19, 2020, 1:09:51 PM4/19/20
to TiddlyWiki
Arlen, 
I did some tests! I see around 40-55MB when node is idle and around 86-92MB when it is active (e.g TW is opened in browser and one edits it)

pic-33.png

So, node seems hungry and eats memory!

Amazingly TWexe assume 4MB per wiki and Apache when is used 33MB (16 + 18) but none have the feature you have on node.js
The Twexe and Apache serve single .html

Just for information

--Mohammad



On Sunday, April 19, 2020 at 6:24:21 PM UTC+4:30, Arlen Beiler wrote:
Ok, I ran top to see what the memory actually is. My computer is a 16 GB machine. TiddlyWiki on Node uses 150 MB. TiddlyServer used 100 MB per wiki (approximately), but less than 30 MB when no wikis were loaded (sorry, top only listed the first page of results). Now, given Node's memory management, I would guess that a more constrained environment would use less, so I'm curious what results other people get. 

In my mind, this is huge, so I'm not surprised people need a way around it, but I'm not sure what the culprit is. I'll do some digging. All I know is it's it's big on Node TiddlyWiki and on TiddlyServer both, so it's probably somewhere in TiddlyWiki.

On Sun, Apr 19, 2020 at 8:47 AM Arlen Beiler <arle...@gmail.com> wrote:
People have in the past had problems with memory consumption when using data folders and because TiddlyServer is intended to load data folders as faithfully as possible, Jed created Bob, which does things a little different but still works with almost all data folders. However the latest raspberry pi should have enough memory to be able to handle TiddlyServer quite easily. I’m assuming one would get the 4 GB version if you’re going to use it for a server anyway. So I’m guessing this isn’t as big of a problem as it used to be.

Single file wikis on the other hand shouldn’t take much memory. The TiddlyServer  documentation says how to enable back ups for single file wikis. And the WebDAV saver works as expected, unlike Apache. 

Arlen Beiler

unread,
Apr 20, 2020, 10:56:17 AM4/20/20
to TiddlyWiki
Node TiddlyWiki (which handles data folders) is responsible for the large memory consumption. As best as I can tell it's actually not something TiddlyServer can do anything about. Single file wikis on TiddlyServer should have similar memory consumption to the other products you mentioned that serve single file wikis. 

To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/4370f38d-0525-4c49-839b-3cad6df6bb19%40googlegroups.com.

Arlen Beiler

unread,
Apr 20, 2020, 10:58:10 AM4/20/20
to TiddlyWiki
In this test, was the wiki a single-file wiki or a data folder? And I'm assuming from the way you wrote it that you were running TiddlyServer, not Node TiddlyWiki (which would be a datafolder), right?

On Sun, Apr 19, 2020 at 1:09 PM Mohammad <mohammad...@gmail.com> wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/4370f38d-0525-4c49-839b-3cad6df6bb19%40googlegroups.com.

Mark S.

unread,
Apr 20, 2020, 11:34:11 AM4/20/20
to TiddlyWiki

I don't know about portable node.js, but I'm reasonably sure that node.js lifted from a zip deployment will leave crumbs in the operating system's directories. The thing I wonder is, if you tried this on a secure machine, whether it would send up some alarm because the disk is being written to.

Since the idea of a portable tiddlywiki is to not leave any traces, this is an important consideration.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscribe@googlegroups.com.

Arlen Beiler

unread,
Apr 20, 2020, 1:30:23 PM4/20/20
to TiddlyWiki
The node executable itself should never write to disk, unless instructed to do so with the fs module, and I'm not aware of any operations that write to a temp directory either. 

The npm installation is separate and definitely scatters files in quite a few places, although this can be restricted using npm settings. 

TiddlyServer may write to a temp directory if you upload files (it uses the formidable library) but then it moves the file to the correct directory using the rename command, so it would only be left there if the upload fails part way thorough. Other than that, TiddlyServer never writes to any directory not specified in settings.json (whether that's a tree path, backup directory, or log file). It does write to a file called uncaughtException.log if there is an uncaught exception, which is always in the installation directory. 

I am not aware that Node TiddlyWiki writes to anywhere outside of the data folder. But it would depend on which plugins are loaded. Each plugin has its own characteristics, but for the most part, it should not write anywhere outside the data folder. That should be true of all the stock plugins. 

Hope that helps. 

To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/a43e8862-e062-44a4-8618-e5c3a6020cc7%40googlegroups.com.

Mark S.

unread,
Apr 20, 2020, 1:59:15 PM4/20/20
to TiddlyWiki
My actual testing in the past indicates that directories get created down in the roaming data directories, whether you're using node.js or tiddlydesktop or tiddlyserver. What it "should" do is another issue. It would be interesting to know what happens if someone attempts to run on a secure computer. I suppose there's only a handful of people who will care about some obscure directory being written to, but it's a good thing to keep in mind.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscribe@googlegroups.com.

--
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+unsubscribe@googlegroups.com.

Mohammad

unread,
Apr 20, 2020, 2:57:58 PM4/20/20
to TiddlyWiki
Mark,
I tried it on another Windows, seems there is no trace. Also in the readme it claims there is no trace.
I just checked the temp folder and %appdata%

--Mohammad

Mohammad

unread,
Apr 20, 2020, 3:11:47 PM4/20/20
to TiddlyWiki
Hi Areln,


On Monday, April 20, 2020 at 7:28:10 PM UTC+4:30, Arlen Beiler wrote:
In this test, was the wiki a single-file wiki or a data folder? And I'm assuming from the way you wrote it that you were running TiddlyServer, not Node TiddlyWiki (which would be a datafolder), right?
I tested using  wiki folder. I used the portable Node.js + Tiddlywiki 5.1.22

--Mohammad

 

Arlen Beiler

unread,
Apr 20, 2020, 3:23:27 PM4/20/20
to TiddlyWiki
Interesting. My comments are based on my knowledge of TiddlyWiki and having written TiddlyServer myself. I've never audited NodeJS to find out what files it would write to. I'll have to do that sometime. By the way, here's a good tool that I use to check what programs are doing on Windows. It's what I would use for a thorough audit. 


To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

--
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.

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/ace3fe81-0b6c-49bc-b9dd-2ac3e25ad712%40googlegroups.com.

Mohammad

unread,
Apr 20, 2020, 3:29:25 PM4/20/20
to TiddlyWiki
Thanks for sharing this monitoring tool!

To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.

--
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 tiddl...@googlegroups.com.

--
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 tiddl...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages