Hi heusmisch,

Regarding your second question, the fact that direct saving doesn't work
probably means that you don't serve your file with WebDav but standard
HTTP. If you don't use rclone, you need another tool that can serve through
the WebDav protocol.

Regarding your first question, I'm afraid I won't be able to help you
further. Linux and networking is a field in itself that goes far beyond the
topic of TiddlyWiki. I gave you some recipes that work in the very limited
context that I tried to describe, but if you depart from it, chances are
that it won't work...

-- Xavier

On Fri, Feb 11, 2022 at 11:00 PM 'heusmich' via TiddlyWiki <
tiddlywiki@googlegroups.com> wrote:

> Hi Xavier,
>
> Thanks again for that detailed guide. I really appreciate it.
>
> But I have two more questions:
>
> 1. How exactly can I secure the address of the wiki with a certificate?
> For my personal homepage I did this via "Let´s Encrypt", but until now I
> didn´t find a way to do it for the wiki address.
> In the guide that I used for securing my homepage I used the certbot to
> generate the certificate from "Let´s Encrypt", but when I try to use it for
> the wiki address, it doesn´t work.
> It only shows the addresses of my website name.
>
> Currently the address of my wiki looks like the following:
> http://<Public IP address of the server>:8998/empty.html
>
> Can you tell me what exactly I have to do to generate a certificate for
> the wiki?
>
>
> 2. What do I have to do to save the changes directly in the folder on the
> server? When I do some changes in the wiki and click on save, it always
> wants to download a file, but the wiki should save the changes on the
> server directly.
> Doesn´t make sense to download a file with the changes, I want to save
> them directly on the server to have the online wiki up to date.
>
>
> Sorry that I ask so many questions, but I love this wiki, in my opinion
> it´s the best.
> But I can´t get some things working by myself... :-(
>
>
>
> xca...@immateriel.fr schrieb am Donnerstag, 10. Februar 2022 um 12:43:12
> UTC+1:
>
>> Hi heusmisch,
>>
>> Indeed, "detaching from the console" after having issued a remote command
>> is a common need in networking. What you want is
>>
>>    1. making sure your command is run in the background. An '&' at the
>>    end of the command line will do the trick.
>>    2. making sure it is detached from the shell you are using, so that
>>    it doesn't get killed when you close the shell. You express this by
>>    wrapping your command with the nohup (aka No Hang Up) command.
>>
>> So,
>> nohup rclone serve webdav ~/public_html/wikis --htpasswd
>> ~/.myhtpasswd.txt --addr 0.0.0.0:8998 &
>>
>> The next question is "what if I want to kill this command, now that it is
>> detached ?"
>>
>> You'll first need to know the process identifier. pgrep is handy for
>> that: you give it a pattern to recognise the initial command, like so:
>>
>> pgrep -f webdav
>>
>> and it will respond with the process identifiers of all the commands
>> that contain the string *webdav*. You can then kill the command with:
>>
>> kill <my_process_id>
>>
>> Best,
>> Xavier.
>>
>> On Wed, Feb 9, 2022 at 8:26 PM 'heusmich' via TiddlyWiki <
>> tiddl...@googlegroups.com> wrote:
>>
>>> Hi Xavier,
>>>
>>> One question. I did the first two steps of your guide, so far it´s OK
>>> and working.
>>> But I have one problem. I connect via Putty to the server and start the
>>> WebDav with the command you provided. But as soon as I close Putty or press
>>> CTRL + C, the wiki is not reachable anymore.
>>> CTRL + A, CTRL + D like in Screen doesn´t work.
>>>
>>> Is it somehow possible to keep the WebDav open even when I close Putty?
>>>
>>> Best regards
>>> heusmich
>>>
>>>
>>> Xavier schrieb am Mittwoch, 9. Februar 2022 um 15:50:02 UTC+1:
>>>
>>>> Hi Heusmich,
>>>>
>>>> I think a first option could be to serve a tiddlywiki file via WebDav :
>>>> not only it can give access to the wiki from anywhere on your network, but
>>>> it will also handle the saver operations without any further configuration.
>>>> There are many WebDav services available for the Linux platform, but Rclone
>>>> is probably one of the most easy to use, yet very powerful.
>>>>
>>>> So a basic, unsecure, command for serving a TiddlyWiki file that
>>>> resides in your ~/public_html/wikis repository with Rclone (let's call
>>>> it mywiki.html) would be:
>>>>
>>>> rclone serve webdav ~/public_html/wikis/ --addr 0.0.0.0:8998
>>>>
>>>> That's it! As you guessed, it will make all the files present in 
>>>> ~/public_html/wikis/
>>>> available at the port 8998 on your Linux machine. So if your server has
>>>> the IP address 192.168.1.3 on your network, pointing a browser to
>>>> http://192.168.1.3:8998/mywiki.html will serve the file mywiki.html on
>>>> HTTP, and write any modifications directly on the same file.
>>>>
>>>> As Mario noted, such a simple setup means that you must really trust
>>>> your network. Even if you are the only person who uses it, some
>>>> applications running on your other machines can easily discover your W
>>>> ebDav service, and do whatever with your wiki file.
>>>>
>>>> The next step would thus be to add an authentication file with htpasswd.
>>>> The command "htpasswd -cB .myhtpasswd.txt me" would ask you a password
>>>> for the user *me*, then create the file .myhtpasswd.txt with that
>>>> password encrypted.
>>>>
>>>> Now you can reissue a slightly more secure command:
>>>>
>>>> rclone serve webdav ~/public_html/wikis --htpasswd ~/.myhtpasswd.txt
>>>> --addr 0.0.0.0:8998
>>>>
>>>> Each time someone wants to connect to http://192.168.1.3:8998, (s)he
>>>> will be asked for their credentials. But if an application is sniffing
>>>> your network, it will see the password as you type it.
>>>>
>>>> The next step would thus be to add a key and a certificate so that
>>>> rclone serves through HTTPS instead of HTTP.
>>>> https://tiddlywiki.com/#Using%20HTTPS explains how to generate the key
>>>> and the self-signed certificate.
>>>>
>>>> Once you have the cert and the key file, you can enhance the above
>>>> command by issuing:
>>>>
>>>> rclone serve webdav ~/public_html/wikis --htpasswd ~/.myhtpasswd.txt
>>>> --addr 0.0.0.0:8998 --cert ~/.tls/server.crt --key ~/.tls/key.pem
>>>>
>>>> This is more reasonable, although you'll notice that your browser
>>>> complains that the certificate is self-signed.
>>>>
>>>> Now you are ready to try a different approach, that is serving your
>>>> wiki through NodeJS. See the two tiddlers at
>>>> https://tiddlywiki.com/#WebServer:%5B%5BInstalling%20TiddlyWiki%20on%20Node.js%5D%5D%20WebServer
>>>>
>>>> Regards,
>>>> -- Xavier Cazin.
>>>>
>>>> --
>>> 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/3a311d49-5b25-4ac3-bdb9-ed740be8b58en%40googlegroups.com
>>> <https://groups.google.com/d/msgid/tiddlywiki/3a311d49-5b25-4ac3-bdb9-ed740be8b58en%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/c6afe296-0f00-4a1e-8fb3-1647333963b1n%40googlegroups.com
> <https://groups.google.com/d/msgid/tiddlywiki/c6afe296-0f00-4a1e-8fb3-1647333963b1n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CADeSwYOC8znann_T2DcHDQ1OGvUCZ5JRbcrX7b4mTrtmnKg49g%40mail.gmail.com.

Reply via email to