= !TiddlyWiki on Tahoe-Lafs = [http://www.tiddlywiki.com TiddlyWiki] is a client-side wiki written purely in HTML/CSS and !JavaScript. [// Tahoe-LAFS] is a decentralized, secure storage grid. These go together like chocolate and peanut butter! We call the result a ''Server-Independent Wiki''. {{{#!comment Put this back! Figure out some way to deter people from using the public gateway for file-sharing their own files even though we use it for file-sharing this Server-Independent Wiki... For a hands on introduction here is an [http://pubgrid.tahoe-lafs.org/uri/URI%3ADIR2%3Afx7qhfvfrrm7um327ntkjwfu3m%3Atynsxdcwm5imqwqmdrv7wvwj2jupjlyt5pgnu4nmmct6vledgw2a/wiki.html Unhosted Wiki] you can play with. Follow the link, edit the Unhosted Wiki, and click "Save Changes"! :-) }}} == To Build a Tahoe-LAFS-Ready !TiddlyWiki (Server-Independent Wiki) == === You'll need tahoe-lafs: === Set up a tahoe-lafs web gateway on a '''secure''' machine which is controlled only by you following the {{{"}}}[//trac/tahoe-lafs/browser/trunk/docs/quickstart.rst quickstart]{{{"}}} and {{{"}}}[//trac/tahoe-lafs/browser/trunk/docs/running.rst running]{{{"}}} instructions. {{{#!comment Put this back! Figure out some way to deter people from using the public gateway for file-sharing their own files even though we use it for file-sharing this Server-Independent Wiki... If you do not have access to a different grid, then use the test grid. This is accomplished by following [http://tahoe-lafs.org/trac/tahoe-lafs/wiki/TestGrid these] instructions. }}} Now that you have a tahoe-lafs gateway running (on a machine under your own control, like your laptop) the next step is to pu''blish'' the tiddlywiki, through your personal gateway, onto the tahoe-lafs grid. === You'll need a tiddlywiki with a couple of plugins: === Use wget to get a copy of an empty tiddlywiki with the ''HTTPSavingPlugin'' and ''!TahoePlugin'' already installed: {{{wget https://tahoe-lafs.org/source/tiddly_on_tahoe/trunk/tahoe_tiddly/wiki.html}}} (Note: starting with this empty file that comes preloaded with the plugins is just for convenience—if you already have a tiddlywiki document that you want to publish on a tahoe-lafs grid, you can simply add the ''HTTPSavingPlugin'' and ''!TahoePlugin'' to your current file and then proceed with these instructions.) == You'll need to pu''blish'' the tiddlywiki to the grid: == Use the CLI described in the {{{"}}}[//trac/tahoe-lafs/browser/trunk/docs/running.rst running]{{{"}}} documentation. You need a tahoe-lafs directory to put the tiddlywiki in. You could accomplish this by running the following steps in order, but it's preferable to put it together in a single command as demonstrated below. === Stepwise === One, running: {{{tahoe mkdir}}} generates such a directory and prints the ''write capability'' to it on sdout. Two, running: {{{tahoe cp wiki.html }}}''write capability'' publishes the wiki.html to the directory you created in the previous step. It's critical that the write capability is stored somewhere you can reliably get to, as it is the only way to get write-access the tiddlywiki. Since this is the case I recommend the following single step publication... === Combined: === {{{tahoe cp wiki.html `tahoe mkdir | tee WRITECAPABILITY.txt`}}} You can now access your Unhosted Wiki by the URL that results from: {{{echo http://localhost:3456/uri/`cat WRITECAPABILITY.txt`/wiki.html}}} (That URL is assuming that your personal gateway is reachable at {{{http://localhost:3456/}}}. If your personal gateway is on a different port or a different host you'll have to adjust accordingly. Remember that if it is on a different host then someone else could sniff the connection from your local web browser to that gateway, unless you configure it to do {{{https}}} instead of {{{http}}}.) == You may want to share a read-only view of the tiddlywiki == If there is a publicly accessible gateway, you can give people a link to your tiddlywiki as served by that gateway. Click on the link at the top of the tiddlywiki page which is labelled "Click here for a __read-only view of this page__ ." to go to a read-only view of the wiki. Now edit the URL and replace {{{localhost:3456}}} with {{{http://$PUBLIC_GATEWAY}}}. The result is a URL that you can share with someone to give them read-only access to your wiki. Note that currently doing this also gives people the ability to upload their own files through that gateway to the grid. [//trac/tahoe-lafs/ticket/587 Ticket #587] is about making it possible to give someone download-only access to a gateway without necessarily giving them upload access. == Support == To report an issue, please use [// https://tahoe-lafs.org].