https://wiki.diasporafoundation.org/api.php?action=feedcontributions&user=Briano&feedformat=atomdiaspora* project wiki - User contributions [en]2024-03-28T09:20:14ZUser contributionsMediaWiki 1.39.3https://wiki.diasporafoundation.org/wiki/index.php?title=Tools_to_use_with_Diaspora&diff=10418Tools to use with Diaspora2019-03-07T01:38:40Z<p>Briano: /* Post RSS feeds to a Diaspora* account */</p>
<hr />
<div>{{Note|1=If you notice any of these tools is not working with recent versions of diaspora* anymore, please remove it from this list and/or leave a message [[Talk:Tools to use with Diaspora|on the talk page]]. If you know the author of the dead tool you can also notify them directly, so they can possibly update their tool!}}<br />
<br />
If you're looking for information about how to add Diaspora* related functionality to your web site, you might want to look at the [[FAQ For Web Developers|FAQ for web developers]].<br />
<br />
== Browser add-ons and scripts==<br />
<br />
=== Sharing extensions (instantly share on diaspora the page you're visiting) ===<br />
<br />
==== All browsers ====<br />
* [http://diasporapictureshare.blogspot.com/ Diaspora* Picture Share] - a modified sharing bookmarklet to quickly share pictures on Diaspora*<br />
<br />
==== Firefox ====<br />
* [https://activations.cdn.mozilla.net/en-US/diaspora.html Share Service for Firefox] Service to be used with the browsers build-in [https://developer.mozilla.org/de/docs/Social_API Social API].<br />
* [https://addons.mozilla.org/en-US/firefox/addon/diaspora-easyshare/?src=search Diaspora* Easyshare] Addon to share a page in a nice graphical way: image+text+tags. More infos [http://arlogn.github.io/easyshare/ here]<br />
* [https://addons.mozilla.org/en-US/firefox/addon/diaspora-advanced-sharer/ Diaspora* Advanced Sharer] Addon to share the current page to any Diaspora pod. Grabs title, URL and selected part of page which is converted from HTML to Markdown (images, lists, urls, etc work).<br />
<br />
==== Chrome ====<br />
* [https://chrome.google.com/webstore/detail/pgblolfhnddeobmfgjhckddncbbfnlim Diaspora* Publisher] - Allows you to share your favorite pages with your friends; you can also select and share a specific part of the page.<br />
* [http://soycodigo.wordpress.com/diaspost/ Diaspost] - Quickly share webpages to Diaspora<br />
<br />
==== Opera ====<br />
* [http://my.opera.com/coreymwamba/blog/2011/09/07/diaspora-opera-sharing-extension Diaspora* Opera sharing extension] Quickly share webpages to Diaspora<br />
<br />
=== More cool stuff (scripts and add-ons to make your diaspora experience smarter) ===<br />
<br />
These scripts ''require'' a userscript manager, such as [https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/ Greasemonkey] (Firefox), [https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en Tampermonkey] (Chrome), or [https://en.wikipedia.org/wiki/Greasemonkey#Equivalents_for_other_browsers equivalents]. Greasemonkey scripts will work immediately on several pods, but not all. You may have to [http://i.imgur.com/zQQiz2y.png add your own pod to the list of "Included Pages" (in Settings)].<br />
<br />
==== Sharing diaspora posts ''on'' diaspora: quotes, comments and links ====<br />
* [https://github.com/DeusFigendi/Userscripts/tree/master/Diaspora Quote Post] ([http://userscripts-mirror.org/scripts/show/171283 previous version]) - (script). An additional resharing option that quotes the post and allows to add your comments to it. <small>By DeusFigendi</small><br />
* [https://github.com/meitar/cross-pod-links/ Cross-pod Links] - Click a Diaspora post's permalink to copy a server-relative URL to your clipboard. Makes it easy to write links in your Diaspora posts that will work across pods when the people you are sharing with are on a different pod than you.<br />
* [https://github.com/DeusFigendi/Userscripts/raw/master/Diaspora/Add_podsavelink.user.js Add podsavelink] ([http://userscripts-mirror.org/scripts/show/151334.html previous version]) - (script) Provides a universal, pod-independent link for diaspora posts, for pasting in your messages and posts. This [http://www.webreference.com/html/tutorial2/3.html relative link], found [https://wiki.diasporafoundation.org/images/a/a7/Addpodsavelink_example.png at the top of a post (screenshot)], will open posts in your recipient's pod <small>(if this post has been [http://geexxx.fr/2013/07/23/comment-ca-marche-la-federation-de-diaspora/#english federated])</small>. <small>By DeusFigendi</small><br />
<br />
==== Editing (markdown) tools ====<br />
* [https://addons.mozilla.org/en-US/firefox/addon/its-all-text/ It's All Text!] - (Firefox add-on) Opens your desktop text editor from any text box, so you can easily format and include images, links, etc. Saving the document sends the code to the text box, no copying+pasting required.<br />
* [http://markitdown.medusis.com/ Mark It Down: convert rich text to Markdown]. (online; [https://diasp.org/posts/2a3a87e077620132b36000259069449e note for firefox users]) Paste or drag and drop content from a webpage to convert to Markdown. Converts images, links, linked images and all usual formatting. Works best on Chrome. ([https://diasp.org/uploads/images/scaled_full_7411ef4b315c323ad0a0.gif demo])<br />
* [https://github.com/chitsaou/copy-as-markdown/ Copy as Markdown] (Chrome & Firefox). A right click provides a formatted web page link or the code to embed an image. Use Addpodsavelink (above) for diaspora posts.<br />
* [http://markdownpad.com Markdown Pad] - (Windows, browser-independent) A popular Markdown editor. <br />
* [http://sourceforge.net/projects/retext/ ReText] - (Linux, browser-independent) A simple but efficient PyQT based Markdown, ReText and HTML editor; includes live preview.<br />
* [http://enki-editor.org/ Enki] - (Linux, MacOSX and Windows, browser-independent) A text editor with markdown support (incl. preview). (Ubuntu- & Debian packages available)<br />
<br />
==== Enhancing and customizing the streams ====<br />
<br />
* [https://github.com/Faldrian/diasporaAutoUpdate Diaspora AutoUpdate] - (script). Automatically updates the stream (like Twitter does in its Webinterface). <small>By Faldrian</small><br />
* [https://github.com/SansPseudoFix/diaspora-public-posts Diaspora Public Posts] - (script). Post with '''Public''' aspect by default. '''Useless if your pod is running diaspora >= 0.6.1.0'''. <small>By SpF</small><br />
<br />
==== Accessibility ====<br />
* [https://addons.mozilla.org/en-us/firefox/addon/toggle-animated-gifs/ Toggle animated GIFs] (Firefox add-on). Disable GIF animations by default.<br />
<br />
==== ''Should be updated:'' ====<br />
* [https://addons.mozilla.org/en-US/firefox/addon/lowenzahn/?src=api Löwenzahn] - (Firefox add-on) This addon showed notifications for new Diaspora messages or notifications. (Not compatible with recent versions of Firefox)<br />
* [http://sourceforge.net/projects/diasporatools/ Diaspora Tools] - (Firefox add-on) Share webpages and images to Diaspora, translate text on Diaspora. (Not compatible with recent versions of Firefox)<br />
* [http://userscripts.org/scripts/show/117102 Tag Filter] - [http://userscripts-mirror.org/scripts/show/117102.html mirror] - (script) Allowed to filter postings in the stream by tags, can replace all inline-images and iFrames (Videos) by a textlink or icon (or hides it total), helps to add tags you often use. <small>By DeusFigendi</small> (Not fully compatible with recent versions of diaspora*.)<br />
* [https://github.com/diasporg/Diaspora-Translate Diaspora Translate] - (script) Translates posts in your stream, also offers hiding non-ssl images. (A required include url is broken, and Google Translate API is now paid-only)<br />
<br />
== Mobile applications ==<br />
=== Android ===<br />
* [https://github.com/Diaspora-for-Android/dandelion Dandelion] - Android client that adds a bunch of features. Available on the [https://f-droid.org/packages/com.github.dfa.diaspora_android/ FDroid app store].<br />
<br />
== Useful links ==<br />
* [http://dia.so dia.so] - A profile shortener so people on other pods get you on their pod and A url shortener all pod admins can use.<br />
* [http://jenseitsderfenster.de/diasporavisual/ Diaspora Reshare Visualiser] - A Javascript tool to display a flow chart of reshares of a particular post. <br />
* [http://rsv.diapod.net Diaspora Reshare Graph] - A D3.js implementation of Reshare Visualizer, includes handy bookmarklet for Single Post View.<br />
* [https://github.com/rivendale2010/diaspora-source-finder/wiki/Diaspora-Source-Finder Diaspora Source Finder] - A Bookmarklet for the Single Post View to source the originating server and thread. Works across diaspora and compatible networks.<br />
* [http://unicode-table.com/en/ Unicode Character Table] - Not specific to Diaspora but a very hand for including Unicode like ★ ☂ ☯ ♫ ❤ in your diaspora posts. <br />
* [https://picup.it PicUp] - Free Image / Photography Hosting Platform (with some Diaspora unique features - like sharing or generating markdown links). Comes with an easy API and the Karma reputation system.<br />
<br />
==For websites==<br />
=== Share on diaspora* buttons ===<br />
<br />
* [http://sharetodiaspora.github.io/about/ Diaspora* Advanced Sharer] - To add a "Share on diaspora*" button to your website.<br />
* [https://github.com/sebastienadam/simple_diaspora_sharing_button/ Diaspora* Simple Sharer] - To add a simple "Share on diaspora*" button to your website.<br />
<br />
More buttons and tips on [[FAQ for web developers]]<br />
<br />
=== WordPress Plugins ===<br />
* [https://wordpress.org/plugins/diasposter Diasposter] -- Diasposter cross-posts your WordPress entries to Diaspora. Changes to your WordPress posts are reflected in your Diaspora posts. <br />
* [https://wordpress.org/plugins/wp-to-diaspora WP to Diaspora] -- automatically share your WordPress posts on Diaspora*<br />
* [https://wordpress.org/plugins/share-on-diaspora Share on Diaspora] -- adds a Share on D* button at the bottom of WordPress posts.<br />
* [https://wordpress.org/extend/plugins/webfinger-profile/ Webfinger Profile Plugin for 'Join me' widget] -- displays a widget on your WordPress blog with your profile information from Diaspora, [http://blog.duthied.com/2011/08/30/webfinger-profile-plugin/ more info]. Unsupported, last updated on 2011-9-23.<br />
* [https://github.com/diaspora/wp-post-to-diaspora Wordpress plugin: wp-post-to-diaspora] when you make a new blog post, this plugin will post a link to it to your diaspora account. Abandoned, last updated on 2011-9-30.<br />
* [http://gattonero.me/1041CdI Sociable] -- a WordPress plugin customized for share content also on Diaspora*. In [http://wordpress.org/plugins/sociable/ latest versions], Diaspora support was dropped.<br />
<br />
== Programmer Tools ==<br />
<br />
* [http://freeshell.de/~mk/projects/cliaspora.html Cliaspora] (package [https://aur.archlinux.org/packages/cliaspora/ Aur]) - A command-line client for Diaspora* [discontinued]<br />
* [https://github.com/marekjm/diaspy Diaspy] - Unofficial Python API for Diaspora<br />
* [https://github.com/produnis/pic2fediverse/blob/master/pic2diaspora.py pic2diaspora.py], a simple picture posting Bot that uses Diaspy<br />
* [https://github.com/jaywink/diaspora-tools diaspora tools] - Allows you to migrate your contacts from one pod to another. Based on diaspy<br />
* [https://notabug.org/uzver/diclish diclish] - CLI bash script for posting/reading on Diaspora*.<br />
* [https://notabug.org/uzver/diclipy diclipy] - CLI Python script for posting/reading/commenting on Diaspora* written around Diaspy API.<br />
<br />
== Applications ==<br />
<br />
=== Migration between pods ===<br />
* [https://github.com/jaywink/diaspora-tools Diaspora Tools] - Python pod2pod contacts and aspects migration script.<br />
<br />
=== Import/export and syndication tools ===<br />
<br />
==== Post RSS feeds to a Diaspora* account ====<br />
* [https://gitlab.com/brianodonnell/pod_feeder_v2 pod_feeder_v2] is a feature-rich bot script that posts RSS/Atom feeds to D*<br />
* [https://github.com/hanumanum/RSS-To-Diaspora From RSS To Diaspora*] is a bash script that makes use of the [[#Programmer_Tools|cliaspora programmer tool]].<br />
* [https://github.com/Javafant/rss2diaspora-hs rss2diaspora-hs] is a Haskell implementation of an RSS bot.<br />
* [https://debakel.github.io/feedDiasp/ feedDiasp*] let's you publish posts from facebook or an RSS-feed to Diaspora*.<br />
* [https://mrtz.me/feedDiasp/ feedDiasp* (webservice)] is a third-party Web-based service that accepts an RSS feed and posts to a Diaspora* handle. (''Only use this for bot accounts, as you are giving the third-party service your password when you use this tool.'')<br />
* [https://github.com/fourier/rss-bot-diasp rss-bot-diasp] RSS bot based on [https://github.com/debakel/feedDiasp feedDiasp*] supporting multiple accounts in the same database. Using Python, SQLite<br />
* [https://github.com/svbergerem/fefebot fefebot] is a bot based on diaspy<br />
* [https://github.com/dkodnik/paperbod PaperboD*] is a famous bot<br />
<br />
== Gnu/Linux Command Line Voodoo ==<br />
If you want to change your Pod you may need a list of your contacts. This shell command may be useful for you. Export your Data via "Settings - Account - Export Data - Profile" and rename this file to "d-exported-in.json.gz".<br />
<br />
Then run this shell script (you need [https://stedolan.github.io/jq/ jq] to parse the json):<br />
<br />
<pre>zcat d-exported-in.json.gz | jq '.user.contacts[] | select(.followed).account_id' -r | sort | tee d-contacts-out.txt<br />
</pre><br />
<br />
You'll get the file "d-contacts-out.txt" which is a list of all your contacts.<br />
<br />
== Podmin tools ==<br />
* [https://github.com/SuperTux88/munin-plugins/blob/master/diaspora_ Diaspora Munin-plugin] - Munin plugin that uses data from the pods [https://nodeinfo.diaspora.software/ NodeInfo]<br />
<br />
[[Category:Community]]</div>Brianohttps://wiki.diasporafoundation.org/wiki/index.php?title=Tools_to_use_with_Diaspora&diff=10417Tools to use with Diaspora2019-03-07T01:37:36Z<p>Briano: /* Post RSS feeds to a Diaspora* account */</p>
<hr />
<div>{{Note|1=If you notice any of these tools is not working with recent versions of diaspora* anymore, please remove it from this list and/or leave a message [[Talk:Tools to use with Diaspora|on the talk page]]. If you know the author of the dead tool you can also notify them directly, so they can possibly update their tool!}}<br />
<br />
If you're looking for information about how to add Diaspora* related functionality to your web site, you might want to look at the [[FAQ For Web Developers|FAQ for web developers]].<br />
<br />
== Browser add-ons and scripts==<br />
<br />
=== Sharing extensions (instantly share on diaspora the page you're visiting) ===<br />
<br />
==== All browsers ====<br />
* [http://diasporapictureshare.blogspot.com/ Diaspora* Picture Share] - a modified sharing bookmarklet to quickly share pictures on Diaspora*<br />
<br />
==== Firefox ====<br />
* [https://activations.cdn.mozilla.net/en-US/diaspora.html Share Service for Firefox] Service to be used with the browsers build-in [https://developer.mozilla.org/de/docs/Social_API Social API].<br />
* [https://addons.mozilla.org/en-US/firefox/addon/diaspora-easyshare/?src=search Diaspora* Easyshare] Addon to share a page in a nice graphical way: image+text+tags. More infos [http://arlogn.github.io/easyshare/ here]<br />
* [https://addons.mozilla.org/en-US/firefox/addon/diaspora-advanced-sharer/ Diaspora* Advanced Sharer] Addon to share the current page to any Diaspora pod. Grabs title, URL and selected part of page which is converted from HTML to Markdown (images, lists, urls, etc work).<br />
<br />
==== Chrome ====<br />
* [https://chrome.google.com/webstore/detail/pgblolfhnddeobmfgjhckddncbbfnlim Diaspora* Publisher] - Allows you to share your favorite pages with your friends; you can also select and share a specific part of the page.<br />
* [http://soycodigo.wordpress.com/diaspost/ Diaspost] - Quickly share webpages to Diaspora<br />
<br />
==== Opera ====<br />
* [http://my.opera.com/coreymwamba/blog/2011/09/07/diaspora-opera-sharing-extension Diaspora* Opera sharing extension] Quickly share webpages to Diaspora<br />
<br />
=== More cool stuff (scripts and add-ons to make your diaspora experience smarter) ===<br />
<br />
These scripts ''require'' a userscript manager, such as [https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/ Greasemonkey] (Firefox), [https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en Tampermonkey] (Chrome), or [https://en.wikipedia.org/wiki/Greasemonkey#Equivalents_for_other_browsers equivalents]. Greasemonkey scripts will work immediately on several pods, but not all. You may have to [http://i.imgur.com/zQQiz2y.png add your own pod to the list of "Included Pages" (in Settings)].<br />
<br />
==== Sharing diaspora posts ''on'' diaspora: quotes, comments and links ====<br />
* [https://github.com/DeusFigendi/Userscripts/tree/master/Diaspora Quote Post] ([http://userscripts-mirror.org/scripts/show/171283 previous version]) - (script). An additional resharing option that quotes the post and allows to add your comments to it. <small>By DeusFigendi</small><br />
* [https://github.com/meitar/cross-pod-links/ Cross-pod Links] - Click a Diaspora post's permalink to copy a server-relative URL to your clipboard. Makes it easy to write links in your Diaspora posts that will work across pods when the people you are sharing with are on a different pod than you.<br />
* [https://github.com/DeusFigendi/Userscripts/raw/master/Diaspora/Add_podsavelink.user.js Add podsavelink] ([http://userscripts-mirror.org/scripts/show/151334.html previous version]) - (script) Provides a universal, pod-independent link for diaspora posts, for pasting in your messages and posts. This [http://www.webreference.com/html/tutorial2/3.html relative link], found [https://wiki.diasporafoundation.org/images/a/a7/Addpodsavelink_example.png at the top of a post (screenshot)], will open posts in your recipient's pod <small>(if this post has been [http://geexxx.fr/2013/07/23/comment-ca-marche-la-federation-de-diaspora/#english federated])</small>. <small>By DeusFigendi</small><br />
<br />
==== Editing (markdown) tools ====<br />
* [https://addons.mozilla.org/en-US/firefox/addon/its-all-text/ It's All Text!] - (Firefox add-on) Opens your desktop text editor from any text box, so you can easily format and include images, links, etc. Saving the document sends the code to the text box, no copying+pasting required.<br />
* [http://markitdown.medusis.com/ Mark It Down: convert rich text to Markdown]. (online; [https://diasp.org/posts/2a3a87e077620132b36000259069449e note for firefox users]) Paste or drag and drop content from a webpage to convert to Markdown. Converts images, links, linked images and all usual formatting. Works best on Chrome. ([https://diasp.org/uploads/images/scaled_full_7411ef4b315c323ad0a0.gif demo])<br />
* [https://github.com/chitsaou/copy-as-markdown/ Copy as Markdown] (Chrome & Firefox). A right click provides a formatted web page link or the code to embed an image. Use Addpodsavelink (above) for diaspora posts.<br />
* [http://markdownpad.com Markdown Pad] - (Windows, browser-independent) A popular Markdown editor. <br />
* [http://sourceforge.net/projects/retext/ ReText] - (Linux, browser-independent) A simple but efficient PyQT based Markdown, ReText and HTML editor; includes live preview.<br />
* [http://enki-editor.org/ Enki] - (Linux, MacOSX and Windows, browser-independent) A text editor with markdown support (incl. preview). (Ubuntu- & Debian packages available)<br />
<br />
==== Enhancing and customizing the streams ====<br />
<br />
* [https://github.com/Faldrian/diasporaAutoUpdate Diaspora AutoUpdate] - (script). Automatically updates the stream (like Twitter does in its Webinterface). <small>By Faldrian</small><br />
* [https://github.com/SansPseudoFix/diaspora-public-posts Diaspora Public Posts] - (script). Post with '''Public''' aspect by default. '''Useless if your pod is running diaspora >= 0.6.1.0'''. <small>By SpF</small><br />
<br />
==== Accessibility ====<br />
* [https://addons.mozilla.org/en-us/firefox/addon/toggle-animated-gifs/ Toggle animated GIFs] (Firefox add-on). Disable GIF animations by default.<br />
<br />
==== ''Should be updated:'' ====<br />
* [https://addons.mozilla.org/en-US/firefox/addon/lowenzahn/?src=api Löwenzahn] - (Firefox add-on) This addon showed notifications for new Diaspora messages or notifications. (Not compatible with recent versions of Firefox)<br />
* [http://sourceforge.net/projects/diasporatools/ Diaspora Tools] - (Firefox add-on) Share webpages and images to Diaspora, translate text on Diaspora. (Not compatible with recent versions of Firefox)<br />
* [http://userscripts.org/scripts/show/117102 Tag Filter] - [http://userscripts-mirror.org/scripts/show/117102.html mirror] - (script) Allowed to filter postings in the stream by tags, can replace all inline-images and iFrames (Videos) by a textlink or icon (or hides it total), helps to add tags you often use. <small>By DeusFigendi</small> (Not fully compatible with recent versions of diaspora*.)<br />
* [https://github.com/diasporg/Diaspora-Translate Diaspora Translate] - (script) Translates posts in your stream, also offers hiding non-ssl images. (A required include url is broken, and Google Translate API is now paid-only)<br />
<br />
== Mobile applications ==<br />
=== Android ===<br />
* [https://github.com/Diaspora-for-Android/dandelion Dandelion] - Android client that adds a bunch of features. Available on the [https://f-droid.org/packages/com.github.dfa.diaspora_android/ FDroid app store].<br />
<br />
== Useful links ==<br />
* [http://dia.so dia.so] - A profile shortener so people on other pods get you on their pod and A url shortener all pod admins can use.<br />
* [http://jenseitsderfenster.de/diasporavisual/ Diaspora Reshare Visualiser] - A Javascript tool to display a flow chart of reshares of a particular post. <br />
* [http://rsv.diapod.net Diaspora Reshare Graph] - A D3.js implementation of Reshare Visualizer, includes handy bookmarklet for Single Post View.<br />
* [https://github.com/rivendale2010/diaspora-source-finder/wiki/Diaspora-Source-Finder Diaspora Source Finder] - A Bookmarklet for the Single Post View to source the originating server and thread. Works across diaspora and compatible networks.<br />
* [http://unicode-table.com/en/ Unicode Character Table] - Not specific to Diaspora but a very hand for including Unicode like ★ ☂ ☯ ♫ ❤ in your diaspora posts. <br />
* [https://picup.it PicUp] - Free Image / Photography Hosting Platform (with some Diaspora unique features - like sharing or generating markdown links). Comes with an easy API and the Karma reputation system.<br />
<br />
==For websites==<br />
=== Share on diaspora* buttons ===<br />
<br />
* [http://sharetodiaspora.github.io/about/ Diaspora* Advanced Sharer] - To add a "Share on diaspora*" button to your website.<br />
* [https://github.com/sebastienadam/simple_diaspora_sharing_button/ Diaspora* Simple Sharer] - To add a simple "Share on diaspora*" button to your website.<br />
<br />
More buttons and tips on [[FAQ for web developers]]<br />
<br />
=== WordPress Plugins ===<br />
* [https://wordpress.org/plugins/diasposter Diasposter] -- Diasposter cross-posts your WordPress entries to Diaspora. Changes to your WordPress posts are reflected in your Diaspora posts. <br />
* [https://wordpress.org/plugins/wp-to-diaspora WP to Diaspora] -- automatically share your WordPress posts on Diaspora*<br />
* [https://wordpress.org/plugins/share-on-diaspora Share on Diaspora] -- adds a Share on D* button at the bottom of WordPress posts.<br />
* [https://wordpress.org/extend/plugins/webfinger-profile/ Webfinger Profile Plugin for 'Join me' widget] -- displays a widget on your WordPress blog with your profile information from Diaspora, [http://blog.duthied.com/2011/08/30/webfinger-profile-plugin/ more info]. Unsupported, last updated on 2011-9-23.<br />
* [https://github.com/diaspora/wp-post-to-diaspora Wordpress plugin: wp-post-to-diaspora] when you make a new blog post, this plugin will post a link to it to your diaspora account. Abandoned, last updated on 2011-9-30.<br />
* [http://gattonero.me/1041CdI Sociable] -- a WordPress plugin customized for share content also on Diaspora*. In [http://wordpress.org/plugins/sociable/ latest versions], Diaspora support was dropped.<br />
<br />
== Programmer Tools ==<br />
<br />
* [http://freeshell.de/~mk/projects/cliaspora.html Cliaspora] (package [https://aur.archlinux.org/packages/cliaspora/ Aur]) - A command-line client for Diaspora* [discontinued]<br />
* [https://github.com/marekjm/diaspy Diaspy] - Unofficial Python API for Diaspora<br />
* [https://github.com/produnis/pic2fediverse/blob/master/pic2diaspora.py pic2diaspora.py], a simple picture posting Bot that uses Diaspy<br />
* [https://github.com/jaywink/diaspora-tools diaspora tools] - Allows you to migrate your contacts from one pod to another. Based on diaspy<br />
* [https://notabug.org/uzver/diclish diclish] - CLI bash script for posting/reading on Diaspora*.<br />
* [https://notabug.org/uzver/diclipy diclipy] - CLI Python script for posting/reading/commenting on Diaspora* written around Diaspy API.<br />
<br />
== Applications ==<br />
<br />
=== Migration between pods ===<br />
* [https://github.com/jaywink/diaspora-tools Diaspora Tools] - Python pod2pod contacts and aspects migration script.<br />
<br />
=== Import/export and syndication tools ===<br />
<br />
==== Post RSS feeds to a Diaspora* account ====<br />
* [https://gitlab.com/brianodonnell/pod_feeder_v2 pod_feeder_v2] is a feature-rich bot script that posts RSS/Atom/Twitter feeds to D*<br />
* [https://github.com/hanumanum/RSS-To-Diaspora From RSS To Diaspora*] is a bash script that makes use of the [[#Programmer_Tools|cliaspora programmer tool]].<br />
* [https://github.com/Javafant/rss2diaspora-hs rss2diaspora-hs] is a Haskell implementation of an RSS bot.<br />
* [https://debakel.github.io/feedDiasp/ feedDiasp*] let's you publish posts from facebook or an RSS-feed to Diaspora*.<br />
* [https://mrtz.me/feedDiasp/ feedDiasp* (webservice)] is a third-party Web-based service that accepts an RSS feed and posts to a Diaspora* handle. (''Only use this for bot accounts, as you are giving the third-party service your password when you use this tool.'')<br />
* [https://github.com/fourier/rss-bot-diasp rss-bot-diasp] RSS bot based on [https://github.com/debakel/feedDiasp feedDiasp*] supporting multiple accounts in the same database. Using Python, SQLite<br />
* [https://github.com/svbergerem/fefebot fefebot] is a bot based on diaspy<br />
* [https://github.com/dkodnik/paperbod PaperboD*] is a famous bot<br />
<br />
== Gnu/Linux Command Line Voodoo ==<br />
If you want to change your Pod you may need a list of your contacts. This shell command may be useful for you. Export your Data via "Settings - Account - Export Data - Profile" and rename this file to "d-exported-in.json.gz".<br />
<br />
Then run this shell script (you need [https://stedolan.github.io/jq/ jq] to parse the json):<br />
<br />
<pre>zcat d-exported-in.json.gz | jq '.user.contacts[] | select(.followed).account_id' -r | sort | tee d-contacts-out.txt<br />
</pre><br />
<br />
You'll get the file "d-contacts-out.txt" which is a list of all your contacts.<br />
<br />
== Podmin tools ==<br />
* [https://github.com/SuperTux88/munin-plugins/blob/master/diaspora_ Diaspora Munin-plugin] - Munin plugin that uses data from the pods [https://nodeinfo.diaspora.software/ NodeInfo]<br />
<br />
[[Category:Community]]</div>Brianohttps://wiki.diasporafoundation.org/wiki/index.php?title=Tools_to_use_with_Diaspora&diff=4722Tools to use with Diaspora2016-02-25T21:28:39Z<p>Briano: /* Post RSS feeds to a Diaspora* account */</p>
<hr />
<div>{{Languages}}<br />
<br />
If you're looking for information about how to add Diaspora* related functionality to your web site, you might want to look at the [[FAQ For Web Developers|FAQ for web developers]].<br />
<br />
== Browser add-ons and scripts==<br />
<br />
=== Sharing extensions (instantly share on diaspora the page you're visiting) ===<br />
<br />
==== All browsers ====<br />
* [http://diasporapictureshare.blogspot.com/ Diaspora* Picture Share] - a modified sharing bookmarklet to quickly share pictures on Diaspora*<br />
<br />
==== Firefox ====<br />
* [https://activations.cdn.mozilla.net/en-US/diaspora.html Share Service for Firefox] Service to be used with the browsers build-in [https://developer.mozilla.org/de/docs/Social_API Social API].<br />
* [https://addons.mozilla.org/en-US/firefox/addon/diaspora-easyshare/?src=search Diaspora* Easyshare] Addon to share a page in a nice graphical way: image+text+tags. More infos [http://arlogn.github.io/easyshare/ here]<br />
* [https://addons.mozilla.org/en-US/firefox/addon/diaspora-advanced-sharer/ Diaspora* Advanced Sharer] Addon to share the current page to any Diaspora pod. Grabs title, URL and selected part of page which is converted from HTML to Markdown (images, lists, urls, etc work).<br />
<br />
==== Chrome ====<br />
* [https://chrome.google.com/webstore/detail/pgblolfhnddeobmfgjhckddncbbfnlim Diaspora* Publisher] - Allows you to share your favorite pages with your friends; you can also select and share a specific part of the page.<br />
* [http://soycodigo.wordpress.com/diaspost/ Diaspost] - Quickly share webpages to Diaspora<br />
<br />
==== Opera ====<br />
* [http://my.opera.com/coreymwamba/blog/2011/09/07/diaspora-opera-sharing-extension Diaspora* Opera sharing extension] Quickly share webpages to Diaspora<br />
<br />
=== More cool stuff (scripts and add-ons to make your diaspora experience smarter) ===<br />
<br />
These scripts ''require'' a userscript manager, such as [https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/ Greasemonkey] (Firefox), [https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en Tampermonkey] (Chrome), or [https://en.wikipedia.org/wiki/Greasemonkey#Equivalents_for_other_browsers equivalents]. Greasemonkey scripts will work immediately on several pods, but not all. You may have to [http://i.imgur.com/zQQiz2y.png add your own pod to the list of "Included Pages" (in Settings)].<br />
<br />
==== Sharing diaspora posts ''on'' diaspora: quotes, comments and links ====<br />
* [http://userscripts-mirror.org/scripts/show/171283 Quote Post] - (script). An additional resharing option that quotes the post and allows to add your comments to it. <small>By DeusFigendi</small><br />
* [https://github.com/meitar/cross-pod-links/ Cross-pod Links] - Click a Diaspora post's permalink to copy a server-relative URL to your clipboard. Makes it easy to write links in your Diaspora posts that will work across pods when the people you are sharing with are on a different pod than you.<br />
* [https://github.com/DeusFigendi/Userscripts/raw/master/Diaspora/Add_podsavelink.user.js Add podsavelink] ([http://userscripts-mirror.org/scripts/show/151334.html previous version]) - (script) Provides a universal, pod-independent link for diaspora posts, for pasting in your messages and posts. This [http://www.webreference.com/html/tutorial2/3.html relative link], found [https://wiki.diasporafoundation.org/images/a/a7/Addpodsavelink_example.png at the top of a post (screenshot)], will open posts in your recipient's pod <small>(if this post has been [http://geexxx.fr/2013/07/23/comment-ca-marche-la-federation-de-diaspora/#english federated])</small>. <small>By DeusFigendi</small><br />
<br />
==== Editing (markdown) tools ====<br />
* [https://addons.mozilla.org/en-US/firefox/addon/its-all-text/ It's All Text!] - (Firefox add-on) Opens a markdown [https://en.wikipedia.org/wiki/WYSIWYG WYSIWYG] editor from any text box, so you can easily format and include images, links, etc. Saving the document sends the code to the text box, no copying+pasting required.<br />
* [http://markitdown.medusis.com/ Mark It Down: convert rich text to Markdown]. (online; [https://diasp.org/posts/2a3a87e077620132b36000259069449e note for firefox users]) Paste or drag and drop content from a webpage to convert to Markdown. Converts images, links, linked images and all usual formatting. Works best on Chrome. ([https://diasp.org/uploads/images/scaled_full_7411ef4b315c323ad0a0.gif demo])<br />
* [https://github.com/chitsaou/copy-as-markdown/ Copy as Markdown] (Chrome & Firefox). A right click provides a formatted web page link or the code to embed an image. Use Addpodsavelink (above) for diaspora posts.<br />
* [http://markdownpad.com Markdown Pad] - (Windows, browser-independent) A popular Markdown editor. <br />
* [http://sourceforge.net/projects/retext/ ReText] - (Linux, browser-independent) A simple but efficient Markdown and HTML editor; includes live preview.<br />
* [http://enki-editor.org/ Enki] - (Linux, MacOSX and Windows, browser-independent) A text editor with markdown support (incl. preview). (Ubuntu- & Debian packages available)<br />
<br />
==== Enhancing and customizing the streams ====<br />
<br />
* [https://github.com/Faldrian/diasporaAutoUpdate Diaspora AutoUpdate] - (script). Automatically updates the stream (like Twitter does in its Webinterface). <small>By Faldrian</small><br />
* [https://github.com/SansPseudoFix/diaspora-public-posts Diaspora Public Posts] - (script). Post with '''Public''' aspect by default. <small>By SpF</small><br />
<br />
==== Accessibility ====<br />
* [https://addons.mozilla.org/en-us/firefox/addon/toggle-animated-gifs/ Toggle animated GIFs] (Firefox add-on). Disable GIF animations by default.<br />
<br />
==== ''Should be updated:'' ====<br />
* [https://addons.mozilla.org/en-US/firefox/addon/lowenzahn/?src=api Löwenzahn] - (Firefox add-on) This addon showed notifications for new Diaspora messages or notifications. (Not compatible with recent versions of Firefox)<br />
* [http://sourceforge.net/projects/diasporatools/ Diaspora Tools] - (Firefox add-on) Share webpages and images to Diaspora, translate text on Diaspora. (Not compatible with recent versions of Firefox)<br />
* [http://userscripts.org/scripts/show/117102 Tag Filter] - [http://userscripts-mirror.org/scripts/show/117102.html mirror] - (script) Allowed to filter postings in the stream by tags, can replace all inline-images and iFrames (Videos) by a textlink or icon (or hides it total), helps to add tags you often use. <small>By DeusFigendi</small> (Not fully compatible with recent versions of diaspora*.)<br />
* [https://github.com/diasporg/Diaspora-Translate Diaspora Translate] - (script) Translates posts in your stream, also offers hiding non-ssl images. (A required include url is broken, and Google Translate API is now paid-only)<br />
<br />
== Useful links ==<br />
* [http://dia.so dia.so] - A profile shortener so people on other pods get you on their pod and A url shortener all pod admins can use.<br />
* [http://jenseitsderfenster.de/diasporavisual/ Diaspora Reshare Visualiser] - A Javascript tool to display a flow chart of reshares of a particular post. <br />
* [http://rsv.diapod.net Diaspora Reshare Graph] - A D3.js implementation of Reshare Visualizer, includes handy bookmarklet for Single Post View.<br />
* [https://github.com/rivendale2010/diaspora-source-finder/wiki/Diaspora-Source-Finder Diaspora Source Finder] - A Bookmarklet for the Single Post View to source the originating server and thread. Works across diaspora and compatible networks.<br />
* [http://unicode-table.com/en/ Unicode Character Table] - Not specific to Diaspora but a very hand for including Unicode like ★ ☂ ☯ ♫ ❤ in your diaspora posts. <br />
* [https://picup.it PicUp] - Free Image / Photography Hosting Platform (with some Diaspora unique features - like sharing or generating markdown links). Comes with an easy API and the Karma reputation system.<br />
<br />
==For websites==<br />
=== Share on diaspora* buttons ===<br />
<br />
* [http://sharetodiaspora.github.io/about/ Diaspora* Advanced Sharer] - To add a "Share on diaspora*" button to your website.<br />
* [https://github.com/sebastienadam/simple_diaspora_sharing_button/ Diaspora* Simple Sharer] - To add a simple "Share on diaspora*" button to your website.<br />
<br />
More buttons and tips on [[FAQ for web developers]]<br />
<br />
=== WordPress Plugins ===<br />
* [https://wordpress.org/plugins/diasposter Diasposter] -- Diasposter cross-posts your WordPress entries to Diaspora. Changes to your WordPress posts are reflected in your Diaspora posts. <br />
* [https://wordpress.org/plugins/wp-to-diaspora WP to Diaspora] -- automatically share your WordPress posts on Diaspora*<br />
* [https://wordpress.org/plugins/share-on-diaspora Share on Diaspora] -- adds a Share on D* button at the bottom of WordPress posts.<br />
* [https://wordpress.org/extend/plugins/webfinger-profile/ Webfinger Profile Plugin for 'Join me' widget] -- displays a widget on your WordPress blog with your profile information from Diaspora, [http://blog.duthied.com/2011/08/30/webfinger-profile-plugin/ more info]. Unsupported, last updated on 2011-9-23.<br />
* [https://github.com/diaspora/wp-post-to-diaspora Wordpress plugin: wp-post-to-diaspora] when you make a new blog post, this plugin will post a link to it to your diaspora account. Abandoned, last updated on 2011-9-30.<br />
* [http://gattonero.me/1041CdI Sociable] -- a WordPress plugin customized for share content also on Diaspora*. In [http://wordpress.org/plugins/sociable/ latest versions], Diaspora support was dropped.<br />
<br />
== Programmer Tools ==<br />
<br />
* [http://freeshell.de/~mk/projects/cliaspora.html Cliaspora] (package [https://aur.archlinux.org/packages/cliaspora/ Aur]) - A command-line client for Diaspora* <br />
* [https://github.com/marekjm/diaspy Diaspy] - Unofficial Python API for Diaspora<br />
* [https://github.com/jaywink/diaspora-tools diaspora tools] - Allows you to migrate your contacts from one pod to another. Based on diaspy<br />
<br />
== Applications ==<br />
<br />
=== Migration between pods ===<br />
* [https://github.com/jaywink/diaspora-tools Diaspora Tools] - Python pod2pod contacts and aspects migration script.<br />
<br />
=== Import/export and syndication tools ===<br />
<br />
==== Post RSS feeds to a Diaspora* account ====<br />
* [https://github.com/hanumanum/RSS-To-Diaspora From RSS To Diaspora*] is a bash script that makes use of the [[#Programmer_Tools|cliaspora programmer tool]].<br />
* [https://github.com/Javafant/rss2diaspora-hs rss2diaspora-hs] is a Haskell implementation of an RSS bot.<br />
* [https://debakel.github.io/feedDiasp/ feedDiasp*] let's you publish posts from facebook or an RSS-feed to Diaspora*.<br />
* [https://mrtz.me/feedDiasp/ feedDiasp* (webservice)] is a third-party Web-based service that accepts an RSS feed and posts to a Diaspora* handle. (''Only use this for bot accounts, as you are giving the third-party service your password when you use this tool.'')<br />
* [https://github.com/fourier/rss-bot-diasp rss-bot-diasp] RSS bot based on [https://github.com/debakel/feedDiasp feedDiasp*] supporting multiple accounts in the same database. Using Python, SQLite<br />
* [https://github.com/svbergerem/fefebot fefebot] is a bot based on diaspy<br />
* [https://github.com/dkodnik/paperbod PaperboD*] is a famous bot<br />
* [https://github.com/rev138/pod_feeder pod_feeder] is a feature-rich bot script that posts RSS/Atom/Twitter feeds to D*<br />
<br />
== Gnu/Linux Command Line Voodoo ==<br />
If you want to change your Pod you may need a list of your contacts. This shell command may be useful for you. Export your Data via "Settings - Account - Export Data - download my xml" and rename this file to d-exported-in.xml<br />
Then run this shell script:<br />
<br />
<pre>grep 'diaspora_handle' d-exported-in.xml | cut -d '>' -f 2 | cut -d '<' -f 1 | sort | uniq | tee d-contacts-out.txt<br />
</pre><br />
<br />
you'll get the file "d-contacts-out.txt" which is a list of all your contacts.<br />
<br />
== Podmin tools ==<br />
* [https://github.com/SuperTux88/munin-plugins/blob/master/diaspora_ Diaspora Munin-plugin] - Munin plugin that uses data from the pods statistics.json <br />
<br />
[[Category:Community]]<br />
[[Category:Github transfer done]]</div>Brianohttps://wiki.diasporafoundation.org/wiki/index.php?title=FAQ_for_pod_maintainers&diff=4442FAQ for pod maintainers2016-01-13T19:16:44Z<p>Briano: Added "How can I run multiple load-balanced instances of diaspora*?"</p>
<hr />
<div>{{Languages}}<br />
We've started adding questions that we're frequently asked to this page, but it doesn't cover everything.<br />
If you have other questions, the best way to get an answer quickly is to visit us in our [[How we communicate#IRC|IRC channel]].<br />
<br />
== Installation ==<br />
<br />
=== What are the general system requirements? ===<br />
<br />
Running diaspora* requires resources depending on how many users use the installation and how much traffic the installation receives from other pods. Generally it is recommended that at least 1 Gig of memory should be available for even small instances.<br />
<br />
For pods with more users the amount of memory available to diaspora* and the background jobs it needs is higher depending on the amount of users actively using the instance. As the database grows, more memory will be needed to compensate.<br />
<br />
Since diaspora* requires quite a lot of different components to be installed, generally shared hosting servers are not sufficient. Any VPS or dedicated server with a suitable amount of memory will suffice. <br />
<br />
=== Do you have a detailed installation guide? ===<br />
<br />
Yes. [[Installation|Check it out!]] It will probably be more up-to-date than this page, in general.<br />
<br />
=== What ports does diaspora* need open for communication? ===<br />
<br />
Since we recommend running on HTTPS you should only need to open the standard port for it: 443. You should have a reverse proxy listening there that forwards the requests to the application server that diaspora* starts, on port 3000 by default. You can use your existing Nginx or Apache to do that. While we don't recommend it, you can run on plain HTTP with its standard port 80 too. Just never let diaspora* listen on these ports directly. You don't need to open the application server port, 3000, it's for internal communication only.<br />
<br />
=== Can I use Apache to run diaspora*? ===<br />
<br />
Yes: diaspora* is a standard Rails application, so you can run it with [https://www.phusionpassenger.com/ Passenger], or doing the more common setup which is to use a reverse proxy configuration. Check [https://gist.github.com/719014 this example] on how to configure that setup.<br />
<br />
=== I installed diaspora* on my machine, went to <nowiki>http://localhost:3000</nowiki> and signed up. But my friends can't add me! ===<br />
<br />
You set "localhost" as your address, but this is not a valid external address. You first need an<br />
externally accessible address - either a domain name or an IP address. Once you have that<br />
working, you need to clear your database (`$ bundle exec rake db:drop db:create db:schema:load`) and re-register, coming in via the external URL. Note that if your externally accessible address changes, you need to start over. diaspora* is designed as a server application to run all day and night.<br />
<br />
=== I get 'command not found' if I run bundle install ===<br />
<br />
Make sure RVM is loaded and the correct Ruby version and gemset are activated. The output of the <tt>rvm info</tt> and <tt>gem env</tt> commands can be helpful in that. Run <tt>gem install bundler</tt> to reassure bundler is actually installed.<br />
<br />
If you don't use RVM, a common issue is that Debian-based distributions, including Ubuntu, don't add gem executables to the search path. Read up on the <tt>PATH</tt> environment variable on how to solve that.<br />
<br />
=== How do I get past the sign-in page to create a new account? ===<br />
<br />
To create a new account, go to <nowiki>http://yourdiasporainstance.tld/users/sign_up</nowiki><br />
(replacing ''yourdiasporainstance.tld'' with the host name of your pod).<br />
<br />
=== I installed diaspora* on my machine, but when I load the site there are no images and the layout looks horrible! ===<br />
<br />
You most likely started diaspora* in production mode and accessed the application server directly and not through your reverse proxy. In production mode we expect your reverse proxy to serve the static content since it does the job way better than anything else. If you did access diaspora* through a reverse proxy, make sure it has no configuration issues, has the <tt>public/</tt> directory as document root and is set to look up if requested files are found there before directing the request to the application server.<br />
<br />
Also make sure you ran <tt>bundle exec rake assets:precompile</tt>.<br />
<br />
If you need to work around this requirement you can turn <tt>environment.assets.serve</tt> to <tt>true</tt> in <tt>config/diaspora.yml</tt>.<br />
<br />
=== There are no uploaded images on my pod ===<br />
<br />
First make sure other static content is working, as described in the previous section. We embed uploaded images with their full URL, this has to do with the way diaspora* makes sure your images can be seen by users on other pods. A common problem here is that <tt>environment.url</tt> in <tt>config/diaspora.yml</tt>, from which diaspora* constructs the full URL, is set to an incorrect value.<br />
<br />
=== Do I need a commercial SSL certificate? / Can I use CAcert certificates? ===<br />
<br />
If you plan on running your pod over HTTPS (yes, [http://stackoverflow.com/a/4495612/1489738 you should]!) then yes you will need a valid commercial SSL certificate. By design, federation will not work with pods that have self-signed or invalid SSL certs installed. We do this to ensure that all users in the network are able to use diaspora* without suffering from constant security warnings related to 'invalid' certs.<br />
<br />
For more information see [https://www.loomio.org/d/E1gZuhs3/do-we-need-valid-ssl-certificates this] and [https://www.loomio.org/d/RxIjdKFZ/make-cacert-a-valid-certificate-authority-now?proposal=XSOgCzqI this] discussion.<br />
<br />
There '''are''' free commercial certificates around - check [https://letsencrypt.org/ Let's Encrypt] or [http://www.startssl.com/ StartSSL] for example.<br />
<br />
=== I can't find anybody on another pod / I am receiving posts but nobody is receiving mine ===<br />
<br />
If you're having problems, make sure to search for people by their full diaspora* ID. Check that your Sidekiq worker is running. Check Sidekiq's retry queue for error messages. Check that the <tt>environement.certificate_authorities</tt> setting is correct.<br />
<br />
=== I can't find myself from another pod / I am not receiving any posts but everybody is receiving mine ===<br />
<br />
Check that your SSL setup is correct, use [http://www.sslshopper.com/ssl-checker.html sslshopper], [https://www.ssllabs.com/ssltest/ ssllabs] or [https://www.htbridge.com/ssl/ High-Tech Bridge] to test your configuration. Make sure it's all green, no yellow, no red.<br />
<br />
=== I'm getting the warning "... in production without Sidekiq workers" ===<br />
<br />
[http://sidekiq.org/ Sidekiq] is the backend we use for processing background jobs. Normally, Sidekiq is spawned as a separate process, but in this case you have configured diaspora* to run the jobs in the same process as the application. This is normally used for development or testing purposes, but if used in production, it can bring major performance penalties. Thus you should always run Sidekiq in its own process, by setting <tt>environment.single_process_mode</tt> to <tt>false</tt> in your <tt>config/diaspora.yml</tt> and starting the Sidekiq process with<br />
<br />
<syntaxhighlight lang="bash"><br />
RAILS_ENV=production bundle exec sidekiq<br />
</syntaxhighlight><br />
<br />
In case you are using <tt>script/server</tt> to start diaspora*, then you don't have to manually start the workers! This is already done by the script.<br />
<br />
=== How can I troubleshoot my email configuration? ===<br />
<br />
Use the following command to send an email and get the exceptions right on your console:<br />
<br />
<syntaxhighlight lang="bash"><br />
RAILS_ENV=production rails runner 'Notifier.admin("test message", User.where(username: "your_username")).each(&:deliver)' <br />
</syntaxhighlight><br />
<br />
Make sure to restart diaspora* once you successfully receive the test message.<br />
<br />
=== I'm getting a 500 error page ===<br />
<br />
Oh noes, you might have hit a bug in diaspora*! But this can also be caused by setup issues, like a incorrectly setup custom landing page, an old Redis version or database connectivity issue.<br />
<br />
# Make sure you found a reliable way to reproduce the issue.<br />
# Run <tt>tail -f log/production.log</tt>. Watch the output closely as you reproduce the issue.<br />
# If you can't make sense out of the actual error message, reach out to us, see [[How we communicate]]. When doing so provide the steps you have taken to produce the error page as well as the full output from the log while reproducing it.<br />
# If told to open an issue, go to https://github.com/diaspora/diaspora/issues. Again make sure to provide the steps to reproduce the problem as well as the log output.<br />
<br />
=== How can I run multiple load-balanced instances of diaspora*? ===<br />
Multiple diaspora* instances for the same "pod" must share SQL and Redis databases, and ''public/uploads'' directories. There are many possible ways to accomplish this, but perhaps the most classical scenario would be to configure all the nodes to point at a central database server for MySQL/Postgres and Redis, and share the uploads directory from a file server via NFS. To avoid problems with schema changes, it would be desirable to keep all of the instances running the same version of diaspora* at all times.<br />
<br />
Load-balancing of the instances can be accomplished with any TCP load balancer that supports session stickiness (such as [https://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html Apache] or [http://nginx.org/en/docs/http/load_balancing.html nginx], among others).<br />
<br />
== Upgrading ==<br />
<br />
=== Is there anything I should do before upgrading my installation? ===<br />
<br />
Yes, read our [[Updating|notes for updating]].<br />
<br />
=== How do I roll back my installation if an update breaks it? ===<br />
<br />
First, try to fix your installation; as always our [[How we communicate#IRC|IRC channel]] should be helpful for getting help with this.<br />
<br />
To roll back, just do: <tt>git checkout ref</tt> Where ''ref'' is the identifier of the commit to go back to. It's a long string of letters and numbers. You can find the ''ref'' by doing a <tt>git log</tt>, eyeballing the commit dates, and figuring out where you were before you pulled. Of course it's best if you keep track of that ''ref'' before you update.<br />
<br />
You can also checkout a particular version with <tt>git checkout v0.3.0.1</tt>, replacing the version of course.<br />
<br />
After that just follow the same procedure that you would to update your installation.<br />
<br />
=== What if there were database migrations in the code I am rolling back? ===<br />
<br />
Then you also need to roll those back separately. You need to do this '''before''' you roll back the code. Look in the <tt>db/migrate</tt> directory and figure out which files are new since the last time you pulled - i.e., which migration your database should be on. They are in timestamp order in that directory. Then do:<br />
<tt>bundle exec rake db:rollback</tt> and look at the output. It will tell you which migration you are now on. It rolls back one each time you run it. Run it until you're on the right migration and then roll back the code as described above.<br />
<br />
Also be aware that database rollbacks can fail - they depend on the migration author writing the correct code to roll back. So in this case it's generally much easier to seek help to fix your current setup than to roll it back.<br />
<br />
== General ==<br />
<br />
=== Am I alone here? (Establish connections with other pods) ===<br />
<br />
Once you set up your pod, you should add some contacts to start receiving content from other pods.<br />
It's a good idea to add some active diaspora* people to your contacts, because they almost all run their own pod,<br />
so your pod will be known by them and you will be easily findable from there.<br />
<br />
Here is a small list:<br />
<br />
* Official account of the project: diasporahq[at]joindiaspora.com<br />
* Sean Tilley: deadsuperhero[at]joindiaspora.com<br />
* Jonne Haß: mrzyx[at]social.mrzyx.de<br />
* Florian Staudacher: raven24[at]pod.fulll.name<br />
* Jason Robinson: jaywink[at]iliketoast.net<br />
* The Geraspora team: team[at]pod.geraspora.de<br />
* Fla: fla[at]diaspora-fr.org<br />
* Diaspora*UK: podmin[at]joindiaspora.co.uk<br />
<br />
After you added a few contacts it's a good idea to make a '''public''' post containing the <tt>#newhere</tt> tag, announcing your new pod, to get even more contacts.<br />
<br />
=== Can I make my pod private/isolated/not communicate with other pods? ===<br />
<br />
No. diaspora* is built around the idea of a distributed social network. We want to build one network, not enable special interest communities or companies to host their own social network (We do welcome you on diaspora* though!). A large amount of the development effort goes into making that one network possible and the whole user experience is designed around it. This not only means that other existing solutions often have feature-sets way better suited to that usecase, but also that if we did implement a switch to turn off communication with other pods, there would be many broken ends in the user interface, which would lead to a bad user experience.<br />
<br />
=== Can I modify the code? ===<br />
<br />
Yes. But keep in mind that diaspora* is licensed under the AGPLv3, that means you must<br />
make the currently running source code available to your users. For legal advice beyond<br />
that, please contact your lawyer.<br />
<br />
=== Will a pod eventually receive federated posts that it misses while being offline/down? ===<br />
<br />
Possibly. We retry the delivery three times at one hour intervals.<br />
<br />
=== I've got my pod running. How do I disable outside logins? ===<br />
<br />
Set <tt>settings.enable_registrations</tt> to <tt>false</tt> in your <tt>config/diaspora.yml</tt> and then restart diaspora*.<br />
<br />
=== How do I back up my pod? ===<br />
<br />
You should do backups of all user data, that is the whole database and uploaded images. For the images just make copies of the <tt>public/uploads</tt> directory. Then just dump all <tt>Diaspora_</tt> databases from your database server. A web search should get you the information you need on how to do that. Make sure to store the backups on a different server, or at least on a different hard drive.<br />
<br />
=== I am on PPC (e.g. old iMac) and want to use it for serving diaspora*, but there is no ExecJS compatible JS runtime ===<br />
<br />
One thing you could do, assuming you have another PC that will run Node: Precompile your assets on that machine (using <tt>bundle exec rake assets:precompile</tt>) and then check them into git before you deploy to the PPC box, or just copy over the contents of <tt>public/assets</tt>. The Javascript runtime is only really needed for precompiling assets and shouldn't be loaded at all in the actual production environment. You may need to use <tt>git add public/assets -f</tt> to force git to check them in, since I think that directory is in .gitignore.<br />
<br />
=== What are roles and how do I use them? / Make yourself an admin or assign moderators ===<br />
<br />
We have a role system that allows to make some accounts 'special' during runtime, without restarting the server. <br />
<br />
Currently you can manage the community spotlight, the moderators and the admins through this system. If you are using PostgreSQL, ensure you have set the environment variable <tt>DB='postgres'</tt> or you will get a very misleading error from bundler and if you follow it, accidentally install the MySQL adapter.<br />
<br />
Start by starting a Rails console:<br />
<br />
<syntaxhighlight lang="bash"><br />
RAILS_ENV=production bundle exec rails console<br />
</syntaxhighlight><br />
<br />
You'll get a new shell where you can enter Ruby code. To exit it just press <tt>Ctrl+D</tt> or type <tt>exit</tt> or <tt>quit</tt>. Here are some examples to manage the roles, replace ''the_username'' with the user's username, not their full diaspora* ID:<br />
<br />
<syntaxhighlight lang="ruby"><br />
Role.add_admin User.where(username: "the_username").first.person # Add an user as admin by username<br />
Role.add_admin User.where(email: "the_email").first.person # Add an user as admin by email<br />
Role.add_moderator User.where(username: "the_username").first.person # Add an user as moderator by username<br />
Role.add_moderator User.where(email: "the_email").first.person # Add an user as moderator by email<br />
Role.add_spotlight User.where(username: "the_username").first.person # Add an user to the 'community spotlight' by username<br />
Role.add_spotlight User.where(email: "the_email").first.person # Add an user to the 'community spotlight' by email<br />
Role.add_spotlight Person.where(diaspora_handle: "username@pod.tld").first # Add an user to the 'community spotlight' by diaspora handle (other pod), make sure that at least one user of your pod follows that account<br />
</syntaxhighlight><br />
<br />
For admins; your user profile should now have an "Admin" link added to the mouse hover list. This gives you stuff like user search and stats for your pod. For intense detail on the operational aspects of your pod, go to the location /admin_panel<br />
For moderators: The moderator should now have an "Moderator" link added to the mouse hover list. Moderators have access to the report section of the admin panel and can review reported posts and comments. Moderators also get emails when a new comment or post is reported.<br />
<br />
=== Followed tags don't work on my pod ===<br />
<br />
There is no synchronization in diaspora*. This means your pod only knows about posts it has received for a purpose. These purposes are, of course: the author is local, someone on your pod is following the post's author, or the post's author is following someone on your pod. Another reason is that the post got reshared by someone whom one of the users on your pod follows. Tags are not federated to all pods: the #Followed Tags stream displays only posts your pod knows about through one of the previous scenarios.<br />
<br />
=== My log files are getting huge, help! ===<br />
<br />
Configure yourself a log rotation solution. For example, on Linux distros, do this with ''logrotate'', something like the following (change the paths where needed) in ''/etc/logrotate.d/diaspora'':<br />
<br />
<pre>/home/diaspora/diaspora/log/*.log {<br />
notifempty<br />
copytruncate<br />
missingok<br />
compress<br />
monthly<br />
delaycompress<br />
rotate 5<br />
}</pre><br />
<br />
Once you've added the file to "/etc/logrotate.d/" run<br />
<br />
<pre>sudo logrotate -f /etc/logrotate.conf</pre><br />
<br />
=== How can I send an email to a user / a group of users? ===<br />
<br />
You need a working email configuration. There are two ways for triggering the emails.<br />
<br />
==== Ruby console ==== <br />
<br />
Fire up your rails console with <code> rails console production</code>,<br />
then follow one of the examples or make up your own:<br />
<br />
<syntaxhighlight lang="ruby"><br />
Notifier.admin("important message", User.where(username: "someuser")).each(&:deliver) # Send a message to someuser<br />
Notifier.admin("important message", User.where(username: ["someuser", "anotheruser"])).each(&:deliver) # Send a message to a group of users<br />
Notifier.admin("important message", User.yearly_actives).each(&:deliver) # Send a message to all active users<br />
</syntaxhighlight><br />
<br />
==== Rake task ====<br />
<br />
There is a Rake task <tt>podmin:admin_mail</tt> available to allow podmins to easily send news and notices to users. The rake task triggers emails via the normal diaspora mailer mechanism (so they are embedded in the standard template) and takes the following parameters:<br />
<br />
1) Users definition<br />
<tt>all</tt> - all users in the database (except deleted)<br />
<tt>active_yearly</tt> - users logged in within the last year<br />
<tt>active_monthly</tt> - users logged in within the last month<br />
<tt>active_halfyear</tt> - users logged in within the last 6 months<br />
2) Path to message file<br />
Give here a path to a HTML or plain text file that contains the message.<br />
3) Subject<br />
A subject for the email<br />
<br />
Example shell command (depending on your environment);<br />
<br />
<syntaxhighlight lang="bash"><br />
RAILS_ENV=production bundle exec rake podmin:admin_mail['active_monthly','./message.html','Important message from pod']<br />
</syntaxhighlight><br />
<br />
Read more about [http://stackoverflow.com/a/825832/1489738 specifying arguments to Rake tasks].<br />
<br />
=== Can I add advertisements to my pod? ===<br />
<br />
Sure, we have no rules that you cannot add advertisements to your diaspora* installation.<br />
<br />
=== How do I define a Terms of Service document for signing up to my pod? ===<br />
<br />
That feature is built in and we have a generic template that you are welcome to use. Of course, you can also edit it or create your own set of terms.<br />
<br />
This feature is built in but not enabled by default. If you want to enable it, please add under settings in <tt>config/diaspora.yml</tt> the following and restart diaspora. If in doubt see <tt>config/diaspora.yml.example</tt>:<br />
<br />
<pre><nowiki><br />
terms:<br />
enable: true<br />
</nowiki></pre><br />
<br />
When enabled, the footer and sidebar will have a link to terms page, and signup will have a disclaimer indicating that creating an account means the user accepts the terms of use.<br />
<br />
While the project itself doesn't restrict what kind of terms pods run on, we realize not all podmins want to spend time writing them from scratch. Thus there is a basic ToS template included that will be used unless a custom one available.<br />
<br />
To modify (or completely rewrite) the terms template, create a file called <tt>app/views/terms/terms.haml</tt> or <tt>app/views/terms/terms.erb</tt> and it will automatically replace the default template, which you can find at <tt>app/views/terms/default.haml</tt>.<br />
<br />
There are also two configuration settings to customize the terms (when using the default template). These are optional.<br />
<br />
* <tt>settings.terms.jurisdiction</tt> - indicate here in which country or state any legal disputes are handled.<br />
* <tt>settings.terms.minimum_age</tt> - indicate here if you want to show a minimum required age for creating an account.<br />
<br />
=== How do I modify the pod landing page? ===<br />
<br />
Please see [[Custom_splash_page]].<br />
<br />
== Errors and problems ==<br />
<br />
=== What do I do about all these PGErrors, like disconnects and SSL problems? ===<br />
<br />
If you are running diaspora* with PostgreSQL, beware that having [http://www.postgresql.org/docs/9.1/interactive/runtime-config-connection.html#GUC-SSL the SSL setting] turned on in the PostgreSQL config has been causing problems for several people. We recommend turning it off unless you know what you're doing.<br />
<br />
=== My sidekiq is crashing, help! ===<br />
<br />
==== Check your <tt>curl</tt> version ====<br />
<br />
<pre><nowiki><br />
/usr/bin/curl --version<br />
</nowiki></pre><br />
<br />
Make sure you see <tt>AsynchDNS</tt> in the output. If this does not happen, check [https://github.com/diaspora/diaspora/issues/4202 this issue on how to upgrade curl].<br />
<br />
==== Check database connection pool ====<br />
<br />
Make sure you have enough database pool connections to top your <tt>environment.sidekiq.concurrency</tt>. Search <tt>logs/sidekiq.log</tt> for errors relating to database connection not being available if unsure if you are running out. You can edit the <tt>pool</tt> setting in <tt>config/database.yml</tt> if needed and then restart. Make it sufficiently larger than your <tt>sidekiq concurrency*sidekiq workers</tt>, 1.5x is a safe rule here.<br />
<br />
==== Check for out of open files errors ==== <br />
<br />
In the diaspora* app folder, do <tt>grep "Too many open files" log/sidekiq.log</tt> and check for results relating to the system user running the diaspora server running out of open files. If you get any errors, it is possible sidekiq can be brought down by the same problem. Follow for example [https://rtcamp.com/tutorials/linux/increase-open-files-limit/ this guide] to increase the limit of open files available to the user running diaspora*.<br />
<br />
==== Make sure memory is not running out ====<br />
<br />
If the server runs out of memory, it is likely sidekiq will be the first to be killed. Check for <tt>Cannot allocate memory</tt> text in the <tt>./script/server</tt> output, or use monitoring to see when memory goes critical. [http://serverfault.com/questions/348052/how-to-increase-swap-size Increase the amount of swap available] to make sure the application does not die (swap should be at least the same as RAM).<br />
<br />
To make sure sidekiq doesn't use too much memory, make sure you are not running with too many Sidekiq workers or concurrency. On a small pod, you can safely but both values to 1 in <tt>config/diaspora.yml</tt>. Then restart and watch the Sidekiq admin panel and if a queue starts to build up, increase the <tt>concurrency</tt> in small increments until Sidekiq can handle the queue. There is '''NO''' need to run more Sidekiq concurrent threads than is needed to process the queue - you just use more memory this way!<br />
<br />
== What if my question isn't answered here? ==<br />
<br />
Just ask us! Read more on how to do that at [[How we communicate]].<br />
<br />
[[Category:Podmin]]<br />
[[Category:Github transfer done]]</div>Brianohttps://wiki.diasporafoundation.org/wiki/index.php?title=Installation/Camo&diff=4094Installation/Camo2015-05-21T11:17:57Z<p>Briano: /* Setting up the reverse proxy */</p>
<hr />
<div>[[File:Markdown_embeds_without_Camo.svg|thumb|right|200px|Request targets, without Camo]]<br />
[[File:Markdown_embeds_with_Camo.svg|thumb|right|200px|Request targets, with Camo]]<br />
<br />
== About Camo and why there is support for it in diaspora* ==<br />
<br />
[https://github.com/atmos/camo Camo] is a small Node.js application to proxy insecure assets. Its main reason is to service HTTP assets over an HTTPS channel to avoid mixed content warnings. Another usage is to reduce the amount of external assets to avoid browser connects to third party hosts. Camo will also add a whitelisting to the images MIME type to add some protection against attacks.<br />
<br />
diaspora* supports content formatting using [https://diasporafoundation.org/formatting Markdown], which also enables users to embed images from third parties. While this is great for creating larger posts with inline images, it is a huge privacy and security problem since most of the images will get hosted by third parties, forcing the users browser to connect to those servers, thus exposing their identities to others.<br />
<br />
Since disabling markdown embeds is not a nice solution, we implemented a special mechanism to rewrite markdown image URLs to get proxied through Camo. In addition, it is also possible to proxy remote profile pictures and remote post photos to create an environment almost entirely without external resources.<br />
<br />
=== Why your pod should enable Camo ===<br />
<br />
* Depending on your configuration, embedded images and/or remote pods content will get proxied through your server, so your user's browsers do not need to connect to external servers. This will increase the users privacy.<br />
* Your pods frontend will get a little bit of extra protection due to the MIME type whitelist.<br />
<br />
=== Why your pod should not enable Camo ===<br />
<br />
* Camo will create a huge amount of traffic depending on your settings since it will proxy all the remote images.<br />
* You will have to maintain a dedicated node.js application, the Camo application is neither shipped nor started with diaspora*.<br />
* Bugs may occur and images with wrong/missing MIME types will not get served.<br />
<br />
== Adding Camo to your pod ==<br />
<br />
=== Setting up Camo ===<br />
<br />
First, you have to set up Node.js on your server. Detailed instructions are available on [http://nodejs.org/ the Node.js website]. Then get a copy of camo's source code and install its dependencies<br />
<br />
{{#tag:syntaxhighlight|<br />
git clone https://github.com/atmos/camo.git<br />
cd camo<br />
npm install<br />
|lang=bash}}<br />
<br />
You are now able to start camo using<br />
<br />
{{#tag:syntaxhighlight|<br />
CAMO_KEY="..." node server.js<br />
|lang=bash}}<br />
<br />
You should add a service file to your system to ensure the service is up all the time. '''Please check https://github.com/atmos/camo#configuration for available and required configurations.''' Generate a shared key for the HMAC generation (for example using <code>pwgen -sy 64</code>, but make sure your key does not contain a backslash).<br />
<br />
=== Setting up the reverse proxy ===<br />
<br />
A reverse proxy should be used to connect your Camo instance to the world. By using the server running diaspora*, it is possible to run Camo inside a virtual subdirectory so you do not need a dedicated subdomain. That is handy if you do not own a wildcard certificate.<br />
<br />
Here is an example config for nginx:<br />
<br />
{{#tag:syntaxhighlight|<br />
upstream camo {<br />
server 127.0.0.1:8081;<br />
}<br />
<br />
# inside your diaspora* config<br />
location /camo/ {<br />
proxy_redirect off;<br />
proxy_pass http://camo/;<br />
break;<br />
}<br />
|lang=text}}<br />
<br />
And here's one for apache with ''mod_rewrite'' and ''mod_proxy'' enabled:<br />
{{#tag:syntaxhighlight|<br />
RewriteEngine On<br />
RewriteRule ^/camo/(.*)$ balancer://camo/$1 [P,L] <br />
<br />
<Proxy balancer://camo><br />
BalancerMember http://127.0.0.1:8081<br />
</Proxy><br />
|lang=text}}<br />
<br />
=== Setting up diaspora* ===<br />
<br />
You have to enable and configure the Camo integration in your <code>diaspora.yml</code>, example configuration values and explanations are available inside <code>diaspora.yml.example</code>. Please ensure you considered the amount of users and traffic before enabling proxy modes. Here is a short summary:<br />
<br />
* '''proxy_markdown_images''' will enable proxying for all images embedded via markdown. This is recommended, but pay attention if you have a large number of users since it might cause some traffic.<br />
* '''proxy_opengraph_thumbnails''' will proxy thumbnails of OpenGraph embeds. You can turn this on since there are not much OpenGraph embeds right now.<br />
* '''proxy_remote_pod_images''' will proxy all remote images including profile pictures and photos inside posts. Enabling this will create a very private environment, but proxing all those images will create a huge amount of traffic.<br />
<br />
== Recommended Camo settings ==<br />
<br />
Tests have shown disabling a strict SSL certificate check is a good idea to avoid problems with images from hosts with self-signed certificates (or CACert certificates, if CACert is not in your systems bundle). Also increasing the max file size to 10MiB is recommended due to the large size of some GIFs - and diaspora* loves GIFs. To apply those suggestions, set the following environment variables when starting Camo:<br />
<br />
{{#tag:syntaxhighlight|<br />
NODE_TLS_REJECT_UNAUTHORIZED=0<br />
CAMO_LENGTH_LIMIT=10485760<br />
CAMO_HEADER_VIA="Camo Asset Proxy at <Your pod URL>"<br />
|lang=bash}}<br />
<br />
To avoid problems with images hosted on Amazon S3 or CloudFlares CDN, it's recommended to add two MIME types to the whitelist in Camos <code>mime-types.json</code>. Just append these to the list:<br />
<br />
{{#tag:syntaxhighlight|<br />
"application/octet-stream",<br />
"binary/octet-stream",<br />
""<br />
|lang=javascript}}<br />
<br />
== Reporting issues ==<br />
<br />
Please report bugs [[How_to_report_a_bug|the usual way]] and we will decide if it is an implementation bug or something caused by Camo and/or the remote host.</div>Brianohttps://wiki.diasporafoundation.org/wiki/index.php?title=Installation/Camo&diff=4093Installation/Camo2015-05-21T11:17:24Z<p>Briano: /* Setting up the reverse proxy */</p>
<hr />
<div>[[File:Markdown_embeds_without_Camo.svg|thumb|right|200px|Request targets, without Camo]]<br />
[[File:Markdown_embeds_with_Camo.svg|thumb|right|200px|Request targets, with Camo]]<br />
<br />
== About Camo and why there is support for it in diaspora* ==<br />
<br />
[https://github.com/atmos/camo Camo] is a small Node.js application to proxy insecure assets. Its main reason is to service HTTP assets over an HTTPS channel to avoid mixed content warnings. Another usage is to reduce the amount of external assets to avoid browser connects to third party hosts. Camo will also add a whitelisting to the images MIME type to add some protection against attacks.<br />
<br />
diaspora* supports content formatting using [https://diasporafoundation.org/formatting Markdown], which also enables users to embed images from third parties. While this is great for creating larger posts with inline images, it is a huge privacy and security problem since most of the images will get hosted by third parties, forcing the users browser to connect to those servers, thus exposing their identities to others.<br />
<br />
Since disabling markdown embeds is not a nice solution, we implemented a special mechanism to rewrite markdown image URLs to get proxied through Camo. In addition, it is also possible to proxy remote profile pictures and remote post photos to create an environment almost entirely without external resources.<br />
<br />
=== Why your pod should enable Camo ===<br />
<br />
* Depending on your configuration, embedded images and/or remote pods content will get proxied through your server, so your user's browsers do not need to connect to external servers. This will increase the users privacy.<br />
* Your pods frontend will get a little bit of extra protection due to the MIME type whitelist.<br />
<br />
=== Why your pod should not enable Camo ===<br />
<br />
* Camo will create a huge amount of traffic depending on your settings since it will proxy all the remote images.<br />
* You will have to maintain a dedicated node.js application, the Camo application is neither shipped nor started with diaspora*.<br />
* Bugs may occur and images with wrong/missing MIME types will not get served.<br />
<br />
== Adding Camo to your pod ==<br />
<br />
=== Setting up Camo ===<br />
<br />
First, you have to set up Node.js on your server. Detailed instructions are available on [http://nodejs.org/ the Node.js website]. Then get a copy of camo's source code and install its dependencies<br />
<br />
{{#tag:syntaxhighlight|<br />
git clone https://github.com/atmos/camo.git<br />
cd camo<br />
npm install<br />
|lang=bash}}<br />
<br />
You are now able to start camo using<br />
<br />
{{#tag:syntaxhighlight|<br />
CAMO_KEY="..." node server.js<br />
|lang=bash}}<br />
<br />
You should add a service file to your system to ensure the service is up all the time. '''Please check https://github.com/atmos/camo#configuration for available and required configurations.''' Generate a shared key for the HMAC generation (for example using <code>pwgen -sy 64</code>, but make sure your key does not contain a backslash).<br />
<br />
=== Setting up the reverse proxy ===<br />
<br />
A reverse proxy should be used to connect your Camo instance to the world. By using the server running diaspora*, it is possible to run Camo inside a virtual subdirectory so you do not need a dedicated subdomain. That is handy if you do not own a wildcard certificate.<br />
<br />
Here is an example config for nginx:<br />
<br />
{{#tag:syntaxhighlight|<br />
upstream camo {<br />
server 127.0.0.1:8081;<br />
}<br />
<br />
# inside your diaspora* config<br />
location /camo/ {<br />
proxy_redirect off;<br />
proxy_pass http://camo/;<br />
break;<br />
}<br />
|lang=text}}<br />
<br />
And here's one for apache with mod_rewrite:<br />
{{#tag:syntaxhighlight|<br />
RewriteEngine On<br />
RewriteRule ^/camo/(.*)$ balancer://camo/$1 [P,L] <br />
<br />
<Proxy balancer://camo><br />
BalancerMember http://127.0.0.1:8081<br />
</Proxy><br />
|lang=text}}<br />
<br />
=== Setting up diaspora* ===<br />
<br />
You have to enable and configure the Camo integration in your <code>diaspora.yml</code>, example configuration values and explanations are available inside <code>diaspora.yml.example</code>. Please ensure you considered the amount of users and traffic before enabling proxy modes. Here is a short summary:<br />
<br />
* '''proxy_markdown_images''' will enable proxying for all images embedded via markdown. This is recommended, but pay attention if you have a large number of users since it might cause some traffic.<br />
* '''proxy_opengraph_thumbnails''' will proxy thumbnails of OpenGraph embeds. You can turn this on since there are not much OpenGraph embeds right now.<br />
* '''proxy_remote_pod_images''' will proxy all remote images including profile pictures and photos inside posts. Enabling this will create a very private environment, but proxing all those images will create a huge amount of traffic.<br />
<br />
== Recommended Camo settings ==<br />
<br />
Tests have shown disabling a strict SSL certificate check is a good idea to avoid problems with images from hosts with self-signed certificates (or CACert certificates, if CACert is not in your systems bundle). Also increasing the max file size to 10MiB is recommended due to the large size of some GIFs - and diaspora* loves GIFs. To apply those suggestions, set the following environment variables when starting Camo:<br />
<br />
{{#tag:syntaxhighlight|<br />
NODE_TLS_REJECT_UNAUTHORIZED=0<br />
CAMO_LENGTH_LIMIT=10485760<br />
CAMO_HEADER_VIA="Camo Asset Proxy at <Your pod URL>"<br />
|lang=bash}}<br />
<br />
To avoid problems with images hosted on Amazon S3 or CloudFlares CDN, it's recommended to add two MIME types to the whitelist in Camos <code>mime-types.json</code>. Just append these to the list:<br />
<br />
{{#tag:syntaxhighlight|<br />
"application/octet-stream",<br />
"binary/octet-stream",<br />
""<br />
|lang=javascript}}<br />
<br />
== Reporting issues ==<br />
<br />
Please report bugs [[How_to_report_a_bug|the usual way]] and we will decide if it is an implementation bug or something caused by Camo and/or the remote host.</div>Brianohttps://wiki.diasporafoundation.org/wiki/index.php?title=Installation/Camo&diff=4092Installation/Camo2015-05-21T11:16:42Z<p>Briano: /* Setting up the reverse proxy */</p>
<hr />
<div>[[File:Markdown_embeds_without_Camo.svg|thumb|right|200px|Request targets, without Camo]]<br />
[[File:Markdown_embeds_with_Camo.svg|thumb|right|200px|Request targets, with Camo]]<br />
<br />
== About Camo and why there is support for it in diaspora* ==<br />
<br />
[https://github.com/atmos/camo Camo] is a small Node.js application to proxy insecure assets. Its main reason is to service HTTP assets over an HTTPS channel to avoid mixed content warnings. Another usage is to reduce the amount of external assets to avoid browser connects to third party hosts. Camo will also add a whitelisting to the images MIME type to add some protection against attacks.<br />
<br />
diaspora* supports content formatting using [https://diasporafoundation.org/formatting Markdown], which also enables users to embed images from third parties. While this is great for creating larger posts with inline images, it is a huge privacy and security problem since most of the images will get hosted by third parties, forcing the users browser to connect to those servers, thus exposing their identities to others.<br />
<br />
Since disabling markdown embeds is not a nice solution, we implemented a special mechanism to rewrite markdown image URLs to get proxied through Camo. In addition, it is also possible to proxy remote profile pictures and remote post photos to create an environment almost entirely without external resources.<br />
<br />
=== Why your pod should enable Camo ===<br />
<br />
* Depending on your configuration, embedded images and/or remote pods content will get proxied through your server, so your user's browsers do not need to connect to external servers. This will increase the users privacy.<br />
* Your pods frontend will get a little bit of extra protection due to the MIME type whitelist.<br />
<br />
=== Why your pod should not enable Camo ===<br />
<br />
* Camo will create a huge amount of traffic depending on your settings since it will proxy all the remote images.<br />
* You will have to maintain a dedicated node.js application, the Camo application is neither shipped nor started with diaspora*.<br />
* Bugs may occur and images with wrong/missing MIME types will not get served.<br />
<br />
== Adding Camo to your pod ==<br />
<br />
=== Setting up Camo ===<br />
<br />
First, you have to set up Node.js on your server. Detailed instructions are available on [http://nodejs.org/ the Node.js website]. Then get a copy of camo's source code and install its dependencies<br />
<br />
{{#tag:syntaxhighlight|<br />
git clone https://github.com/atmos/camo.git<br />
cd camo<br />
npm install<br />
|lang=bash}}<br />
<br />
You are now able to start camo using<br />
<br />
{{#tag:syntaxhighlight|<br />
CAMO_KEY="..." node server.js<br />
|lang=bash}}<br />
<br />
You should add a service file to your system to ensure the service is up all the time. '''Please check https://github.com/atmos/camo#configuration for available and required configurations.''' Generate a shared key for the HMAC generation (for example using <code>pwgen -sy 64</code>, but make sure your key does not contain a backslash).<br />
<br />
=== Setting up the reverse proxy ===<br />
<br />
A reverse proxy should be used to connect your Camo instance to the world. By using the server running diaspora*, it is possible to run Camo inside a virtual subdirectory so you do not need a dedicated subdomain. That is handy if you do not own a wildcard certificate.<br />
<br />
Here is an example config for nginx:<br />
<br />
{{#tag:syntaxhighlight|<br />
upstream camo {<br />
server 127.0.0.1:8081;<br />
}<br />
<br />
# inside your diaspora* config<br />
location /camo/ {<br />
proxy_redirect off;<br />
proxy_pass http://camo/;<br />
break;<br />
}<br />
|lang=text}}<br />
<br />
And here's one for apache:<br />
{{#tag:syntaxhighlight|<br />
RewriteRule ^/camo/(.*)$ balancer://camo/$1 [P,L] <br />
<br />
<Proxy balancer://camo><br />
BalancerMember http://127.0.0.1:8081<br />
</Proxy><br />
|lang=text}}<br />
<br />
=== Setting up diaspora* ===<br />
<br />
You have to enable and configure the Camo integration in your <code>diaspora.yml</code>, example configuration values and explanations are available inside <code>diaspora.yml.example</code>. Please ensure you considered the amount of users and traffic before enabling proxy modes. Here is a short summary:<br />
<br />
* '''proxy_markdown_images''' will enable proxying for all images embedded via markdown. This is recommended, but pay attention if you have a large number of users since it might cause some traffic.<br />
* '''proxy_opengraph_thumbnails''' will proxy thumbnails of OpenGraph embeds. You can turn this on since there are not much OpenGraph embeds right now.<br />
* '''proxy_remote_pod_images''' will proxy all remote images including profile pictures and photos inside posts. Enabling this will create a very private environment, but proxing all those images will create a huge amount of traffic.<br />
<br />
== Recommended Camo settings ==<br />
<br />
Tests have shown disabling a strict SSL certificate check is a good idea to avoid problems with images from hosts with self-signed certificates (or CACert certificates, if CACert is not in your systems bundle). Also increasing the max file size to 10MiB is recommended due to the large size of some GIFs - and diaspora* loves GIFs. To apply those suggestions, set the following environment variables when starting Camo:<br />
<br />
{{#tag:syntaxhighlight|<br />
NODE_TLS_REJECT_UNAUTHORIZED=0<br />
CAMO_LENGTH_LIMIT=10485760<br />
CAMO_HEADER_VIA="Camo Asset Proxy at <Your pod URL>"<br />
|lang=bash}}<br />
<br />
To avoid problems with images hosted on Amazon S3 or CloudFlares CDN, it's recommended to add two MIME types to the whitelist in Camos <code>mime-types.json</code>. Just append these to the list:<br />
<br />
{{#tag:syntaxhighlight|<br />
"application/octet-stream",<br />
"binary/octet-stream",<br />
""<br />
|lang=javascript}}<br />
<br />
== Reporting issues ==<br />
<br />
Please report bugs [[How_to_report_a_bug|the usual way]] and we will decide if it is an implementation bug or something caused by Camo and/or the remote host.</div>Briano