Easy local saving with WebDav

969 wyświetleń
Przejdź do pierwszej nieodczytanej wiadomości

Joost

nieprzeczytany,
16 gru 2019, 04:12:0716.12.2019
do tiddl...@googlegroups.com

I hope sharing this info will help those who are looking for easy saving with a small system footprint and storage.

I use two small WebDav servers for saving, one for my Mac and one for my Windows devices. Both are free and have security features build in for access.

1. Windows

Software can be found at https://github.com/hacdias/webdav/

See readme for all options. For quick testing make a configuration file called "webdav.yaml" and add the following lines:

scope: .
modify: true
address: 0.0.0.0
port: 8080
tls: false
cert: cert.pem
key: key.pem
users:
  - username: admin
    password: admin

Put your wiki in the same directory as the program (just for the test)
Start with command: "webdav -c webdav.yaml" and go to http://localhost:8080/yourwiki.html in your browser and login with "admin" and "admin" (or with the credentials you used in your configuration file).

2. Mac

Go to the Mac App store and search for "WebDavNav Server". It is very easy to setup. Let me know if you encounter any problems.


I have used both tools for 6 months now on a daily basis and never had any problems.

Best regards,

Joost


Mohammad

nieprzeczytany,
16 gru 2019, 04:48:4916.12.2019
do TiddlyWiki
Love it!

Just download, create the .yaml and worked like a charm!
Small footprint, simple to use!

Info: windows 10, TW 5.1.22p, Edge Chromium 80

Note

users:
 
- username: admin
 
- password: admin



should be

users:
 
- username: admin
    password
: admin


Wonderful! Thank you very much Joost!

Joost

nieprzeczytany,
16 gru 2019, 04:55:3216.12.2019
do TiddlyWiki



Thanks Mohammad for your feedback and correction ;-)

Mohammad

nieprzeczytany,
16 gru 2019, 05:30:3216.12.2019
do tiddl...@googlegroups.com
This is amazing!
I have opened 10 wiki files at the same time the footprint for webdav is 4.1MB
so, it is great to be used on small and old machine like Raspberry Pi or an
old mobile phone with Android installed!

Suggestion
 - If it can create backup, it will be very useful for authoring
 - I shell script like (startServer.cmd) can be used and put as a shortcut on Desktop or anywhere to start the server


A startServer.cmd on Widows

REM Start WebDav Server


webdav
.exe -c webdav.yaml


--Mohammad

Mohammad

nieprzeczytany,
16 gru 2019, 05:34:2016.12.2019
do TiddlyWiki
Post edited!
See original

Mohammad

nieprzeczytany,
16 gru 2019, 05:35:0816.12.2019
do TiddlyWiki
Added to TW-Script (will be available on the next update)

Mohammad

nieprzeczytany,
16 gru 2019, 06:34:1816.12.2019
do TiddlyWiki
TW-Scripts solution to running webdav



Easy Local Saving with WebDav

Mohammad 16th December 2019 at 2:59pm
solution
RefJoost
Keywords  

The hacdias/webdav is a simple Go WebDAV server. It can be used to save Tiddlywiki single html file using any web browser (firefox, chrome, edge) even old browser like IE.

The webdav command line interface is really easy to use so you can easily create a WebDAV server for your own user.

How to use

  1. Simply download the suitable executable from https://github.com/hacdias/webdav/releases
    • for example for Windows 64bit downlaod windows-amd64-webdav.zip
  2. Unzip the file in the above step in your folder of choice
    • For demonstration purpose, C:\TW\Webdav is used here. This folder called webdav root folder.
  3. Create a folder in the root of webdav to put your wiki files there
    • In this demo it is C:\TW\Webdav\wikis
    • Copy some wiki files to wiki folder. For demo purpose here test.html has been put in this folder
  4. Create a configuration file in webdav root folder to setup the server as you like.
    • For demonstration purpose C:\TW\Webdav\webday.ymal is used here which is contains
      modify: true
      address: 127.0.0.1
      port: 8080
      tls: false
      cert: cert.pem
      key: key.pem
      users:
        - username: admin
          password: admin
          scope: ./wikis
      
  5. Create a shell script as below to fire up your server.
    • For demonstration it is called here C:\TW\Webdav\startServer.cmd containing the below script
    • REM Start WebDav Server
      webdav.exe -c webdav.yaml
      
  1. Fire up your server by run C:\TW\Webdav\startServer.cmd script (e.g double click on it)
  2. Go to your browser of choice and in address bar type http://localhost:8080/yourwiki.html and login with "admin" and "admin" (or with the credentials you used in your configuration file).

Remarks

  • The wiki folder can have any number of sub folders like
    • C:\TW\Webdav\wikis\work
    • C:\TW\Webdav\wikis\personal
  • There is no need for shell script and one can fire up durectly from the Windows powershell or command line e.g
    • webdav.exe -c webdav.yaml
  • The webdav server allows to add any number of users each with different wiki folder, credential and access level

References

TiddlyTweeter

nieprzeczytany,
16 gru 2019, 10:20:5116.12.2019
do TiddlyWiki
Could you use this approach Portably? 
What I mean is, does this system require you install something on the PC at a fixed address? 
Or could you install it on a usb-stick too?

Just wondering
Josiah

Joost

nieprzeczytany,
16 gru 2019, 10:33:1916.12.2019
do TiddlyWiki

You can use it on an USB stick too. You can set a fixed address as well, but you need to set a predefined port in the config file for that to work properly, otherwise the software picks a random one (the example has this already covered)

BR,

Joost

Mohammad

nieprzeczytany,
16 gru 2019, 10:33:3616.12.2019
do TiddlyWiki
Hi Josiah,

It is totally portable, put it on your thumb drive and fire up just by running the startServer.cmd as was explained in previous posts.

You can give access to several folders, but note to use the relative path for total portability!

--Mohammad

Mohammad

nieprzeczytany,
16 gru 2019, 10:36:5016.12.2019
do TiddlyWiki
Joost,
 Is it possible to have a landing page?

Also what do you think for making backup when saving over webdav?

--Mohammad

TiddlyTweeter

nieprzeczytany,
16 gru 2019, 10:48:2716.12.2019
do TiddlyWiki
That is VERY useful. Because it opens possibility you could wrap it into a app install.

I will play around a bit.

Tx!
TT


Joost wrote:
You can use it on an USB stick too. You can set a fixed address as well, but you need to set a predefined port in the config file for that to work properly, otherwise the software picks a random one (the example has this already covered)

Mark S.

nieprzeczytany,
16 gru 2019, 10:54:5516.12.2019
do TiddlyWiki
Would this be secure enough for the "coffee shop" scenario? I notice that it's set to use the local network.

Joost

nieprzeczytany,
16 gru 2019, 11:11:3916.12.2019
do TiddlyWiki

- Linking from a landing page works, if that is what you mean ;-)
- I use Syncthing with file versioning enabled for my wiki's (apart from my regular backup software).

Joost

nieprzeczytany,
16 gru 2019, 11:24:2216.12.2019
do TiddlyWiki

People might find your webdav server with some scanning tools..  Security you could consider:

For the software:

- Enable TLS (see readme)
- Use strong credentials/encyption (see readme)

Additional security you could consider:

- Only allow localhost for your device in your firewall or security tooling
- Consider using a VPN at the coffee shop ;-)

Mohammad

nieprzeczytany,
16 gru 2019, 11:24:4316.12.2019
do TiddlyWiki


On Monday, December 16, 2019 at 7:41:39 PM UTC+3:30, Joost wrote:

- Linking from a landing page works, if that is what you mean ;-)

I mean when you open localhost:8080 in browser have a landing page to select a
link to open a wiki. Right now I have to type each wiki in address bar like http://localhost:8080/test.html
 
- I use Syncthing with file versioning enabled for my wiki's (apart from my regular backup software).
Here I mean something like Timimi to be able to save and backup!

Joost

nieprzeczytany,
16 gru 2019, 11:33:3716.12.2019
do TiddlyWiki


On Monday, December 16, 2019 at 5:24:43 PM UTC+1, Mohammad wrote:


On Monday, December 16, 2019 at 7:41:39 PM UTC+3:30, Joost wrote:

- Linking from a landing page works, if that is what you mean ;-)

I mean when you open localhost:8080 in browser have a landing page to select a
link to open a wiki. Right now I have to type each wiki in address bar like http://localhost:8080/test.html

If you make a landing page with the right links will work, but there isn't a feature that will do that for you. The software doesn't has a feature for showing a directory structure with all relevant files as well (the Mac software I mentioned above do has that feature btw).
 
 
- I use Syncthing with file versioning enabled for my wiki's (apart from my regular backup software).
Here I mean something like Timimi to be able to save and backup!

I somehow did understand what you meant :-) but this is my current setup. I didn't test any scripts/plugins/tools for that purpose.. sorry ;-)

Mohammad

nieprzeczytany,
16 gru 2019, 11:46:4716.12.2019
do TiddlyWiki
Thanks Joost!
Based on your answer, I used a wiki for landing page!
So, I many create a tiddler to add wiki links from my working folder like this. Assuming I use 127.0.005:8080 as server address! as below


Tiddler
Title: Wiki links
Text: as below
<$list filter="[enlist{!!wikis}addprefix[http://127.0.0.5:8080/]addsuffix[.html]]">
<li><a href=<<currentTiddler>> target=_blank><$view tiddler=<<currentTiddler>> field=title/></a></li>
</$list>

Mark S.

nieprzeczytany,
16 gru 2019, 14:56:5016.12.2019
do TiddlyWiki
Added to toolmap under "Saving Tools"


On Monday, December 16, 2019 at 1:12:07 AM UTC-8, Joost wrote:

Mark S.

nieprzeczytany,
16 gru 2019, 15:04:2116.12.2019
do TiddlyWiki
Hi Mohammad,

On at least some WebDav installations, the modification date of the file is not maintained in Windows. This makes synchronization somewhat unreliable.

I'm curious, if you're running Windows, whether the modification date is being set correctly after changes.

Thanks!

Mohammad

nieprzeczytany,
16 gru 2019, 15:19:5416.12.2019
do TiddlyWiki
Hi Mark,
for me it works fine!

-tiddler modification date is correct
-wiki.html modification date is correct

Server had several starts and shutdowns!
(Windows 10, Edge Chromium 80, FF 71)

--Mohammad

TonyM

nieprzeczytany,
16 gru 2019, 23:39:4616.12.2019
do TiddlyWiki
Folks

Like other simple install and config tw server solutions there is room to develop an install script even a setup and config process. You could generate a config file for the webdav solution for private or lan use, We can do this easily if tiddlywiki has full local file access, but then if you are setting up a server to access your tiddlywiki you possibly do not have this. We seem slow close yet so far.

This makes me ask if the recently revisited twexe could have an embedded wiki that helps manage the installation and configuration of this webdav server, perhaps even launch it. You could even test if its the static ip address your lan issues and if not launch a local only config for the coffee shop.

The idea would be you install an os specific twexe which can guide the setup and options of the webdav including provide an index to wikis created and saved in the webdav folders. Access to online editions etc

If we can hand hold the whole way and design a smart wiki with design Choices config s etc we can add to over time with lessons learned we could make tiddly wiki adoption much easier.

Regards
Tony

TonyM

nieprzeczytany,
16 gru 2019, 23:53:2916.12.2019
do TiddlyWiki
In fact the twexe could guide the choice, install use and linking of any file saver or server config it documents.

Twexe can be the means not the end solution.

Regards
Tony

Mohammad

nieprzeczytany,
17 gru 2019, 00:19:0617.12.2019
do TiddlyWiki
Hi Tony!
Recently you have made a query on saving wiki folder and single file wiki!
It worth for future use to publish the result of this query!

It seems Tiddlywiki has got many solutions to overcome the saving barrier.

--Mohammad

Mohammad

nieprzeczytany,
17 gru 2019, 00:52:1517.12.2019
do TiddlyWiki
Tony!

Why none of these are listed on tiddlywiki.com?
It is a pity these amount of efforts were just buried in the forum!

--Mohammad

On Tuesday, December 17, 2019 at 8:23:29 AM UTC+3:30, TonyM wrote:

bimlas

nieprzeczytany,
26 gru 2019, 05:09:5426.12.2019
do TiddlyWiki

Florian Felix

nieprzeczytany,
29 mar 2021, 16:52:2729.03.2021
do TiddlyWiki
So I coud use this to save/sync via my nextcloud or another external webdav server? Has anyone tried that? would be great!
If not, there's rsync as a tool across devices, you just need to run it from the command line (and therefore termux on android)

Javier Eduardo Rojas Romero

nieprzeczytany,
29 mar 2021, 23:17:4129.03.2021
do 'Florian Felix' via TiddlyWiki
On Mon, Mar 29, 2021 at 01:52:26PM -0700, 'Florian Felix' via TiddlyWiki wrote:
> So I coud use this to save/sync via my nextcloud or another external webdav
> server? Has anyone tried that? would be great!

I use webdav, viannginx, both in a small VPS server that I rent, and in
a raspberry pi in the local network at home; both of those work just
fine.


Florian Felix

nieprzeczytany,
8 kwi 2021, 03:49:228.04.2021
do TiddlyWiki

Ok, but my Nextcloud is actually not local..
 I was looking at rsync before, especially because you can do so many services with it and even from android via termux. right now I’m just using syncthing though, it’s kind of cool 

PMario

nieprzeczytany,
8 kwi 2021, 08:32:388.04.2021
do TiddlyWiki
Hi Folks,
Hi Mohammad,

PLEASE DON'T use username: admin and password: admin in your examples without big red letters: Encrypt your passwords or you are f*&%$!

There are users out there, which copy/paste configuration examples and think they work. ... But they DON'T!.

Mohammand. You used address: 127.0.0.1 which is localhost. ... That's good!

The OP used address: 0.0.0.0, which is dangerous in production. It listens on every IP address the server can find. It's similar to "My house is wide open, take what you can!"

The orginal configuration examples contains several parameters that can increase security. ALL of them should be understood and configured!
eg: CORS settings should be disabled for local installation. CORS is only needed if the server faces the internet or is used in multi-user LAN. It should only be enabled, if you know, what you do!!


Just my thoughts!

have fun!
mario
PS: admin is probably one of the most tested usernames by hackers. and 123456 the password which opens the gates. 

Mohammad

nieprzeczytany,
8 kwi 2021, 08:53:138.04.2021
do TiddlyWiki
Hi Mario,
 Thanks for your hint! Yes the above was  a demo to instruct users how to setup a wbdav server.
  Yes, one should warn users about the credentials used here!

Thank you

Odpowiedz wszystkim
Odpowiedz autorowi
Przekaż
Nowe wiadomości: 0