homeserver.html 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  5. <head>
  6. <!-- 2016-11-11 Fri 21:22 -->
  7. <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  8. <meta name="viewport" content="width=device-width, initial-scale=1" />
  9. <title></title>
  10. <meta name="generator" content="Org mode" />
  11. <meta name="author" content="Bob Mottram" />
  12. <meta name="description" content="Turn the Beaglebone Black into a personal communications server"
  13. />
  14. <meta name="keywords" content="freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber" />
  15. <style type="text/css">
  16. <!--/*--><![CDATA[/*><!--*/
  17. .title { text-align: center;
  18. margin-bottom: .2em; }
  19. .subtitle { text-align: center;
  20. font-size: medium;
  21. font-weight: bold;
  22. margin-top:0; }
  23. .todo { font-family: monospace; color: red; }
  24. .done { font-family: monospace; color: green; }
  25. .priority { font-family: monospace; color: orange; }
  26. .tag { background-color: #eee; font-family: monospace;
  27. padding: 2px; font-size: 80%; font-weight: normal; }
  28. .timestamp { color: #bebebe; }
  29. .timestamp-kwd { color: #5f9ea0; }
  30. .org-right { margin-left: auto; margin-right: 0px; text-align: right; }
  31. .org-left { margin-left: 0px; margin-right: auto; text-align: left; }
  32. .org-center { margin-left: auto; margin-right: auto; text-align: center; }
  33. .underline { text-decoration: underline; }
  34. #postamble p, #preamble p { font-size: 90%; margin: .2em; }
  35. p.verse { margin-left: 3%; }
  36. pre {
  37. border: 1px solid #ccc;
  38. box-shadow: 3px 3px 3px #eee;
  39. padding: 8pt;
  40. font-family: monospace;
  41. overflow: auto;
  42. margin: 1.2em;
  43. }
  44. pre.src {
  45. position: relative;
  46. overflow: visible;
  47. padding-top: 1.2em;
  48. }
  49. pre.src:before {
  50. display: none;
  51. position: absolute;
  52. background-color: white;
  53. top: -10px;
  54. right: 10px;
  55. padding: 3px;
  56. border: 1px solid black;
  57. }
  58. pre.src:hover:before { display: inline;}
  59. /* Languages per Org manual */
  60. pre.src-asymptote:before { content: 'Asymptote'; }
  61. pre.src-awk:before { content: 'Awk'; }
  62. pre.src-C:before { content: 'C'; }
  63. /* pre.src-C++ doesn't work in CSS */
  64. pre.src-clojure:before { content: 'Clojure'; }
  65. pre.src-css:before { content: 'CSS'; }
  66. pre.src-D:before { content: 'D'; }
  67. pre.src-ditaa:before { content: 'ditaa'; }
  68. pre.src-dot:before { content: 'Graphviz'; }
  69. pre.src-calc:before { content: 'Emacs Calc'; }
  70. pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
  71. pre.src-fortran:before { content: 'Fortran'; }
  72. pre.src-gnuplot:before { content: 'gnuplot'; }
  73. pre.src-haskell:before { content: 'Haskell'; }
  74. pre.src-java:before { content: 'Java'; }
  75. pre.src-js:before { content: 'Javascript'; }
  76. pre.src-latex:before { content: 'LaTeX'; }
  77. pre.src-ledger:before { content: 'Ledger'; }
  78. pre.src-lisp:before { content: 'Lisp'; }
  79. pre.src-lilypond:before { content: 'Lilypond'; }
  80. pre.src-lua:before { content: 'Lua'; }
  81. pre.src-matlab:before { content: 'MATLAB'; }
  82. pre.src-mscgen:before { content: 'Mscgen'; }
  83. pre.src-ocaml:before { content: 'Objective Caml'; }
  84. pre.src-octave:before { content: 'Octave'; }
  85. pre.src-org:before { content: 'Org mode'; }
  86. pre.src-oz:before { content: 'OZ'; }
  87. pre.src-plantuml:before { content: 'Plantuml'; }
  88. pre.src-processing:before { content: 'Processing.js'; }
  89. pre.src-python:before { content: 'Python'; }
  90. pre.src-R:before { content: 'R'; }
  91. pre.src-ruby:before { content: 'Ruby'; }
  92. pre.src-sass:before { content: 'Sass'; }
  93. pre.src-scheme:before { content: 'Scheme'; }
  94. pre.src-screen:before { content: 'Gnu Screen'; }
  95. pre.src-sed:before { content: 'Sed'; }
  96. pre.src-sh:before { content: 'shell'; }
  97. pre.src-sql:before { content: 'SQL'; }
  98. pre.src-sqlite:before { content: 'SQLite'; }
  99. /* additional languages in org.el's org-babel-load-languages alist */
  100. pre.src-forth:before { content: 'Forth'; }
  101. pre.src-io:before { content: 'IO'; }
  102. pre.src-J:before { content: 'J'; }
  103. pre.src-makefile:before { content: 'Makefile'; }
  104. pre.src-maxima:before { content: 'Maxima'; }
  105. pre.src-perl:before { content: 'Perl'; }
  106. pre.src-picolisp:before { content: 'Pico Lisp'; }
  107. pre.src-scala:before { content: 'Scala'; }
  108. pre.src-shell:before { content: 'Shell Script'; }
  109. pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
  110. /* additional language identifiers per "defun org-babel-execute"
  111. in ob-*.el */
  112. pre.src-cpp:before { content: 'C++'; }
  113. pre.src-abc:before { content: 'ABC'; }
  114. pre.src-coq:before { content: 'Coq'; }
  115. pre.src-groovy:before { content: 'Groovy'; }
  116. /* additional language identifiers from org-babel-shell-names in
  117. ob-shell.el: ob-shell is the only babel language using a lambda to put
  118. the execution function name together. */
  119. pre.src-bash:before { content: 'bash'; }
  120. pre.src-csh:before { content: 'csh'; }
  121. pre.src-ash:before { content: 'ash'; }
  122. pre.src-dash:before { content: 'dash'; }
  123. pre.src-ksh:before { content: 'ksh'; }
  124. pre.src-mksh:before { content: 'mksh'; }
  125. pre.src-posh:before { content: 'posh'; }
  126. /* Additional Emacs modes also supported by the LaTeX listings package */
  127. pre.src-ada:before { content: 'Ada'; }
  128. pre.src-asm:before { content: 'Assembler'; }
  129. pre.src-caml:before { content: 'Caml'; }
  130. pre.src-delphi:before { content: 'Delphi'; }
  131. pre.src-html:before { content: 'HTML'; }
  132. pre.src-idl:before { content: 'IDL'; }
  133. pre.src-mercury:before { content: 'Mercury'; }
  134. pre.src-metapost:before { content: 'MetaPost'; }
  135. pre.src-modula-2:before { content: 'Modula-2'; }
  136. pre.src-pascal:before { content: 'Pascal'; }
  137. pre.src-ps:before { content: 'PostScript'; }
  138. pre.src-prolog:before { content: 'Prolog'; }
  139. pre.src-simula:before { content: 'Simula'; }
  140. pre.src-tcl:before { content: 'tcl'; }
  141. pre.src-tex:before { content: 'TeX'; }
  142. pre.src-plain-tex:before { content: 'Plain TeX'; }
  143. pre.src-verilog:before { content: 'Verilog'; }
  144. pre.src-vhdl:before { content: 'VHDL'; }
  145. pre.src-xml:before { content: 'XML'; }
  146. pre.src-nxml:before { content: 'XML'; }
  147. /* add a generic configuration mode; LaTeX export needs an additional
  148. (add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
  149. pre.src-conf:before { content: 'Configuration File'; }
  150. table { border-collapse:collapse; }
  151. caption.t-above { caption-side: top; }
  152. caption.t-bottom { caption-side: bottom; }
  153. td, th { vertical-align:top; }
  154. th.org-right { text-align: center; }
  155. th.org-left { text-align: center; }
  156. th.org-center { text-align: center; }
  157. td.org-right { text-align: right; }
  158. td.org-left { text-align: left; }
  159. td.org-center { text-align: center; }
  160. dt { font-weight: bold; }
  161. .footpara { display: inline; }
  162. .footdef { margin-bottom: 1em; }
  163. .figure { padding: 1em; }
  164. .figure p { text-align: center; }
  165. .inlinetask {
  166. padding: 10px;
  167. border: 2px solid gray;
  168. margin: 10px;
  169. background: #ffffcc;
  170. }
  171. #org-div-home-and-up
  172. { text-align: right; font-size: 70%; white-space: nowrap; }
  173. textarea { overflow-x: auto; }
  174. .linenr { font-size: smaller }
  175. .code-highlighted { background-color: #ffff00; }
  176. .org-info-js_info-navigation { border-style: none; }
  177. #org-info-js_console-label
  178. { font-size: 10px; font-weight: bold; white-space: nowrap; }
  179. .org-info-js_search-highlight
  180. { background-color: #ffff00; color: #000000; font-weight: bold; }
  181. .org-svg { width: 90%; }
  182. /*]]>*/-->
  183. </style>
  184. <link rel="stylesheet" type="text/css" href="freedombone.css" />
  185. <script type="text/javascript">
  186. /*
  187. @licstart The following is the entire license notice for the
  188. JavaScript code in this tag.
  189. Copyright (C) 2012-2013 Free Software Foundation, Inc.
  190. The JavaScript code in this tag is free software: you can
  191. redistribute it and/or modify it under the terms of the GNU
  192. General Public License (GNU GPL) as published by the Free Software
  193. Foundation, either version 3 of the License, or (at your option)
  194. any later version. The code is distributed WITHOUT ANY WARRANTY;
  195. without even the implied warranty of MERCHANTABILITY or FITNESS
  196. FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
  197. As additional permission under GNU GPL version 3 section 7, you
  198. may distribute non-source (e.g., minimized or compacted) forms of
  199. that code without the copy of the GNU GPL normally required by
  200. section 4, provided you include this license notice and a URL
  201. through which recipients can access the Corresponding Source.
  202. @licend The above is the entire license notice
  203. for the JavaScript code in this tag.
  204. */
  205. <!--/*--><![CDATA[/*><!--*/
  206. function CodeHighlightOn(elem, id)
  207. {
  208. var target = document.getElementById(id);
  209. if(null != target) {
  210. elem.cacheClassElem = elem.className;
  211. elem.cacheClassTarget = target.className;
  212. target.className = "code-highlighted";
  213. elem.className = "code-highlighted";
  214. }
  215. }
  216. function CodeHighlightOff(elem, id)
  217. {
  218. var target = document.getElementById(id);
  219. if(elem.cacheClassElem)
  220. elem.className = elem.cacheClassElem;
  221. if(elem.cacheClassTarget)
  222. target.className = elem.cacheClassTarget;
  223. }
  224. /*]]>*///-->
  225. </script>
  226. </head>
  227. <body>
  228. <div id="preamble" class="status">
  229. <a name="top" id="top"></a>
  230. </div>
  231. <div id="content">
  232. <div class="org-center">
  233. <div class="figure">
  234. <p><img src="images/logo.png" alt="logo.png" />
  235. </p>
  236. </div>
  237. </div>
  238. <center><h1>Home Server</h1></center>
  239. <p>
  240. The quickest way to get started is as follows. You will need to be running a Debian based system (version 8 or later), have an old but still working laptop or netbook which you can use as a server, and 8GB or larger USB thumb drive and an ethernet cable to connect the laptop to your internet router.
  241. </p>
  242. <p>
  243. First you will need to create an image. On a debian based distro:
  244. </p>
  245. <div class="org-src-container">
  246. <pre class="src src-bash">sudo apt-get install git
  247. git clone https://github.com/bashrc/freedombone
  248. <span class="org-builtin">cd</span> freedombone
  249. git checkout stockholm
  250. make install
  251. freedombone-image --setup debian
  252. freedombone-image -t i386 --onion yes
  253. </pre>
  254. </div>
  255. <p>
  256. Or on Arch/Parabola:
  257. </p>
  258. <div class="org-src-container">
  259. <pre class="src src-bash">sudo pacman -S git
  260. git clone https://github.com/bashrc/freedombone
  261. <span class="org-builtin">cd</span> freedombone
  262. git checkout stockholm
  263. make install
  264. freedombone-image --setup parabola
  265. freedombone-image -t i386 --onion yes
  266. </pre>
  267. </div>
  268. <div class="org-center">
  269. <div class="figure">
  270. <p><img src="images/tor_onion.jpg" alt="tor_onion.jpg" />
  271. </p>
  272. </div>
  273. </div>
  274. <p>
  275. The version in which sites are available only via onion addresses is the easiest to get started with, since you can evaluate the system without committing to buying an ICANN domain name or needing to get involved with SSL/TLS certificates at all. However, if you do want your sites to be available typically as subdomains of a domain name which you own then remove the <b>&#x2013;onion yes</b> option from the last command shown above.
  276. </p>
  277. <p>
  278. If you want to create images for microSD cards used within various single board computers then replace the <b>i386</b> with <b>beaglebone</b> / <b>cubieboard2</b> / <b>cubietruck</b> / <b>a20-olinuxino-lime</b> / <b>a20-olinuxino-lime2</b> / <b>a20-olinuxino-micro</b> or <b>apu</b>.
  279. </p>
  280. <div class="org-center">
  281. <div class="figure">
  282. <p><img src="images/beaglebone_black9.jpg" alt="beaglebone_black9.jpg" />
  283. </p>
  284. </div>
  285. </div>
  286. <p>
  287. This takes a while. Maybe an hour or so, depending on the speed of your system and the internets. The good news though is that once created you can use the resulting image any number of times, and you don't need to trust some pre-built image.
  288. </p>
  289. <p>
  290. List what drives are on your system with:
  291. </p>
  292. <div class="org-src-container">
  293. <pre class="src src-bash">ls /dev/sd*
  294. </pre>
  295. </div>
  296. <p>
  297. Now plug in the USB thumb drive, and do the same again. Notice which drive letter gets added.
  298. </p>
  299. <p>
  300. You can now copy the image to the USB thumb drive, replacing <b>sdX</b> with the identifier of the USB thumb drive. Don't include any numbers (so for example use <b>sdc</b> instead of <b>sdc1</b>).
  301. </p>
  302. <div class="org-src-container">
  303. <pre class="src src-bash">dd <span class="org-variable-name">bs</span>=1M <span class="org-variable-name">if</span>=myimagefile.img <span class="org-variable-name">of</span>=/dev/sdX <span class="org-variable-name">conv</span>=fdatasync
  304. </pre>
  305. </div>
  306. <p>
  307. And wait. Again it will take a while to copy over. When that's done plug it into the laptop or netbook which you want to use as a server, power on and set the BIOS to boot from the USB stick.
  308. </p>
  309. <p>
  310. As the system boots for the first time the login is:
  311. </p>
  312. <div class="org-src-container">
  313. <pre class="src src-bash">username: fbone
  314. password: freedombone
  315. </pre>
  316. </div>
  317. <p>
  318. If you're installing from a microSD card on a single board computer without a screen and keyboard attached then you can ssh into it with:
  319. </p>
  320. <div class="org-src-container">
  321. <pre class="src src-bash">freedombone-client
  322. ssh fbone@freedombone.local -p 2222
  323. </pre>
  324. </div>
  325. <p>
  326. Using the initial password "<i>freedombone</i>".
  327. </p>
  328. <p>
  329. You will then be shown a new randomly generated password. It's <b>very important</b> that you write this down somewhere before going further, because you'll need this to log in later.
  330. </p>
  331. <p>
  332. You'll be asked to set a username and a "real" name (or nickname), then the rest of the installation will be automatic. Again, it takes a while, so go and do something less boring instead.
  333. </p>
  334. <p>
  335. When it's installed on your local system open a terminal and run:
  336. </p>
  337. <div class="org-src-container">
  338. <pre class="src src-bash">ssh myusername@freedombone.local -p 2222
  339. </pre>
  340. </div>
  341. <p>
  342. Use the password you wrote down earlier to log in.
  343. </p>
  344. <p>
  345. Select the <b>administrator control panel</b> with up and down cursor keys, space bar and enter key. You might need to re-enter your password. Then select <b>About</b>. You'll see a list of sites and their onion addresses.
  346. </p>
  347. <p>
  348. On your local system open a <b>Tor compatible browser</b> and enter your blog's onion address. If it's all working then you should see your new blog.
  349. </p>
  350. <p>
  351. <b>Congratulations! You have now become a citizen of the free internet.</b>
  352. </p>
  353. <p>
  354. <b>Use your new powers wisely.</b>
  355. </p>
  356. <p>
  357. Of course, this is just one way in which you can install the Freedombone system. If you have a single board computer (SBC) such as a BeagleBone Black or OLinuxino you can make disk images for those too. You can even create clearnet sites if you have your own domain name. ARM boards with closed proprietary boot blobs are not supported. For more details run:
  358. </p>
  359. <div class="org-src-container">
  360. <pre class="src src-bash">man freedombone-image
  361. </pre>
  362. </div>
  363. <div class="org-center">
  364. <p>
  365. This site can also be accessed via a Tor browser at <a href="http://2tp3f6vtvhkqpuc6.onion">http://2tp3f6vtvhkqpuc6.onion</a>
  366. </p>
  367. </div>
  368. </div>
  369. <div id="postamble" class="status">
  370. <style type="text/css">
  371. .back-to-top {
  372. position: fixed;
  373. bottom: 2em;
  374. right: 0px;
  375. text-decoration: none;
  376. color: #000000;
  377. background-color: rgba(235, 235, 235, 0.80);
  378. font-size: 12px;
  379. padding: 1em;
  380. display: none;
  381. }
  382. .back-to-top:hover {
  383. background-color: rgba(135, 135, 135, 0.50);
  384. }
  385. </style>
  386. <div class="back-to-top">
  387. <a href="#top">Back to top</a> | <a href="mailto:bob@freedombone.net">E-mail me</a>
  388. </div>
  389. </div>
  390. </body>
  391. </html>