Default autosave with Apache and node.js

Reading everything I could find over the past few hours has gotten me next to nowhere … I’m on essentialy a fresh install of debian > apache > nodejs > npm > tiddlywiki and able to access the tiddlywiki host externally but constantly receive this error from the tiddlyweb plugin. have found actually nothing helpful and no sort of generic troubleshooting has lead me anywhere. I just discovered tiddlywiki and feel like this is the last hurdle before I can actually use this amazing program… please help :frowning:

Sync error while processing save of '$:/StoryList': XMLHttpRequest error code: 404
Checking dirty status

I can’t help you much because I don’t have your environment and don’t use node too much, but reading your message it is the standard “not found” message, in this case when saving the $:/StoryList every time you open or close tiddlers. If it works “internally”, but not “externally” (I am not sure what you mean here), perhaps you do not have the permissions required. Search for “Authentication”.

Some wild guesses or troubleshooting;

  • Perhaps turn off autosave to see if this provides a different behaviour
  • Remove login requirements temporarily
  • Can you save other tiddlers?

Best of luck

1 Like

Hey thanks for the reply. By externally i mean from outside my home lan. ill dig into some authorization stuff looking for the problem but like i said this system is almost completely fresh with just a tiddlywiki installation from npm. What do u mean by save other tiddlers? When i open the wiki nothing saves. I cant change settings or anything. But none of the logs mention permissions nor does the installation guide

Tiddlywiki when installed on top of node is a “server wiki”, unlike single file wikis you arrive at it at a URL and whether or not the changes you make are going to be saved back to disk by the node server, is dependant on the server and if it trusts you, as far as it knows you are Just someone from the internet.

Using tiddlywiki on top of a node server is quite a large subject, especially when you want to access it on the public internet, I am not at all an expert on this having never done it.

  • One way is to use a VPN into the LAN so then you access it as if you are on the LAN.

Perhaps start with TiddlyWiki on Node.js if you have not already, but I expect you must have to get to this point.

Also consider looking at how you start the node server, it uses commands and specifically the ListenCommand and this includes;

  • credentials - pathname of credentials CSV file (relative to wiki folder)
  • anon-username - the username for signing edits for anonymous users
  • username - optional username for basic authentication
  • password - optional password for basic authentication
  • authenticated-user-header - optional name of header to be used for trusted authentication
  • readers - comma-separated list of principals allowed to read from this wiki
  • writers - comma-separated list of principals allowed to write to this wiki

Let us hope others can help.

1 Like

aye thank you. i’ve read and re-read everything i can find or imagine testing, kind of an absurd amount of time for something so simple really … i really wanted to use TW but oh well.

I think you jumped in the deep end, and I expect there is some little error or concept you missed. I expect someone may have an answer for you, its just many are still asleep. I am in Australia thus awake.

  • Download a single file wiki and you can create many things,
    • I recommend Timimi for local file saving and backups
  • Or get yourself an online private or public tiddlywiki at
  • Perhaps try bob.exe as a node implementation with multiuser services.
  • If you have an apache or cpanel host use tw receiver for an online wiki

I thought there was something little i missed too which is why ive redone everything so many times. none of the other options suit my needs, it has to be the autosave to server and hosted here on my home server. the installation guide for tw on nodejs implies this should work out of the box after a few apt installs and a minimal --listen command which is why im so confused. not to say i havent tried every --listen parameter as well

  • Are there any errors shown in the browser developer console when you get the sync error?
  • What is the exact command used to start the node.js sever?
  • What have you set the value of the $:/config/tiddlyweb/host tiddler to?
  • Please post your virtual host config for apache

Below is an example vhost configuration that I have used in the past, note the AllowEncodedSlashes directive.

<VirtualHost *:80>
ServerName domain.tld
AllowEncodedSlashes on
<Proxy *>
Order Deny,Allow
Allow from all
ProxyPreserveHost Off # default
ProxyPass /

I actually had some trouble with vhosts already setting up TW on a subdomain of mine but got that working

<VirtualHost *:443>
ProxyPass /
ProxyPassReverse /

i launch the tw server with : sudo tiddlywiki /var/www/pathto/wiki --listen host= port=1234

and can access it from external network via , just the constant error from tiddlyweb and nothing can save.

i think you’re on to something with vhost because while gives an unwriteable tw , 192.168.x.x:port works just fine

it looks like that tiddlyweb directory doesn’t even exist …

Please add this to the vhost.
Report back what, if any, errors there are in the developer console.

To find system tiddlers like $:/config/tiddlyweb/host you need to use the System tab of the Advanced Search. The tiddler may not exist, but if it does then please share the contents of the tiddler. Access Advanced Search by clicking the search button next to the standard search field in the sidebar.

1 Like

it’s not there. what’s it for?

no errors :blush: seems to be fine. thank you, you’re a saint!! man those apache docs got me messed up :sweat_smile:

I strongly recommend setting up SSL with Let’s Encrypt, see Certbot Instructions | Certbot

I have done that. Was required for the subdomain

1 Like