site.rst 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. Site
  2. ====
  3. The ``site`` consists of the files ``site.conf`` and ``site.mk``.
  4. In the first community based values are defined, which both are processed
  5. during the build process and runtime.
  6. The last is directly included in the make process of Gluon.
  7. Configuration
  8. -------------
  9. The ``site.conf`` is a lua dictionary with the following defined keys.
  10. hostname_prefix
  11. A string which shall prefix the default hostname of a device.
  12. site_name
  13. The name of your community.
  14. site_code
  15. The code of your community. It is good practice to use the TLD of
  16. your community here.
  17. prefix4
  18. The IPv4 Subnet of your community mesh network in CIDR notation, e.g.
  19. ::
  20. prefix4 = '10.111.111.0/18'
  21. prefix6
  22. The IPv6 subnet of your community mesh network, e.g.
  23. ::
  24. prefix6 = 'fdca::ffee:babe:1::/64'
  25. timezone
  26. The timezone of your community live in, e.g.
  27. ::
  28. -- Europe/Berlin
  29. timezone = 'CET-1CEST,M3.5.0,M10.5.0/3'
  30. ntp_server
  31. List of NTP servers available in your community or used by your community, e.g.:
  32. ::
  33. ntp_servers = {'1.ntp.services.ffeh','2.tnp.services.ffeh'}
  34. opkg_repo : optional
  35. Overwrite the default ``opkg`` repository server, e.g.:
  36. ::
  37. opkg_repo = 'http://opkg.services.ffeh/attitude_adjustment/12.09/%S/packages'
  38. The `%S` is a variable, which is replaced with the platform of an device
  39. during the build process.
  40. regdom
  41. The wireless regulatory domain responsible for your area, e.g.:
  42. ::
  43. regdom = 'DE'
  44. wifi24
  45. WLAN Configuration of your community in the 2.4Ghz radio. Consisting
  46. of ``ssid`` of your client network, the ``channel`` your community is using,
  47. ``htmode``, the adhoc ssid ``mesh_ssid`` used between devices, the adhoc
  48. bssid ``mesh_bssid`` and the adhoc multicast rate ``mesh_mcast_rate``.
  49. Optionally ``mesh_vlan`` can be used to setup VLAN on top of the 802.11
  50. ad-hoc interface. The options ``mesh_disabled`` and ``client_disabled``
  51. are optional, too. They allow to disable the SSID by default, e.g. for
  52. preconfigured node. This only affects first configuraton.
  53. Combined in an dictionary, e.g.:
  54. ::
  55. wifi24 = {
  56. ssid = 'entenhausen.freifunk.net',
  57. channel = 11,
  58. htmode = 'HT40-',
  59. mesh_ssid = 'ff:ff:ff:ee:ba:be',
  60. mesh_bssid = 'ff:ff:ff:ee:ba:be',
  61. mesh_mcast_rate = 12000,
  62. },
  63. wifi5
  64. Same as `wifi24` but for the 5Ghz radio.
  65. next_node : package
  66. Configuration of the local node feature of Gluon
  67. ::
  68. next_node = {
  69. ip4 = '10.23.42.1',
  70. ip6 = 'fdca:ffee:babe:1::1',
  71. mac = 'ca:ff:ee:ba:be:00'
  72. }
  73. fastd_mesh_vpn
  74. Remote server setup for the fastd-based mesh VPN.
  75. The `enabled` option can be set to true to enable the VPN by default.
  76. If `configurable` is `false` or unset, the method list will be replaced on updates
  77. with the list in the site configuration. Setting `configurable` to `true` will allow the user to
  78. add the method ``null`` to the front of the method list or remove ``null`` from it,
  79. and make this change survive updates. Settings configurable is necessary for the
  80. package `gluon-luci-mesh-vpn-fastd`, which adds a UI for this configuration.
  81. In any case, the ``null`` method should always be the first method in the list
  82. if it is supported at all. You should only set `configurable` to `true` if the
  83. configured peers support both the ``null`` method and methods with encryption.
  84. ::
  85. fastd_mesh_vpn = {
  86. methods = {'salsa2012+umac'},
  87. -- enabled = true,
  88. -- configurable = true,
  89. mtu = 1426,
  90. groups = {
  91. backbone = {
  92. limit = 2,
  93. peers = {
  94. peer1 = {
  95. key = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
  96. remotes = {'ipv4 "vpn1.entenhausen.freifunk.net" port 10000'},
  97. },
  98. }
  99. }
  100. }
  101. }
  102. mesh_on_wan : optional
  103. Enables the mesh on the WAN port (``true`` or ``false``).
  104. mesh_on_lan : optional
  105. Enables the mesh on the LAN port (``true`` or ``false``).
  106. autoupdater : package
  107. Configuration for the autoupdater feature of Gluon.
  108. ::
  109. autoupdater = {
  110. branch = 'experimental',
  111. branches = {
  112. stable = {
  113. name = 'stable',
  114. mirrors = {
  115. 'http://[fdca:ffee:babe:1::fec1]/firmware/stable/sysupgrade/',
  116. 'http://[fdca:ffee:babe:1::fec2]/firmware/stable/sysupgrade/',
  117. },
  118. probability = 0.08,
  119. good_signatures = 2,
  120. pubkeys = {
  121. 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', -- someguy
  122. 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', -- someother
  123. }
  124. }
  125. }
  126. }
  127. roles : optional
  128. Optional role definitions. With this nodes will announce their role inside the mesh.
  129. In the backend this adds the facility to distinguish between normal, backbone and
  130. service nodes or even gateways (if they advertise the role, also). It is up to
  131. the community which roles to define. See the section below as an example.
  132. ``default`` takes the default role which is set initially. This value should be
  133. part of ``list``. If you want node owners to change the role via config mode add
  134. the package ``gluon-luci-node-role`` to ``site.mk``.
  135. The strings to display in the LuCI interface can be configured per language in the
  136. ``i18n/en.po``, ``i18n/de.po``, etc. files of the site repository using message IDs like
  137. ``gluon-luci-node-role:role:node`` and ``gluon-luci-node-role:role:backbone``.
  138. ::
  139. roles = {
  140. default = 'node',
  141. list = {
  142. 'node',
  143. 'test',
  144. 'backbone',
  145. 'service',
  146. },
  147. },
  148. simple_tc : package
  149. Uplink traffic control, ingress and egress values are specified in kbit/s.
  150. ::
  151. simple_tc = {
  152. mesh_vpn = {
  153. ifname = 'mesh-vpn',
  154. enabled = false,
  155. limit_egress = 200,
  156. limit_ingress = 3000,
  157. },
  158. },
  159. setup_mode : package
  160. Allows skipping setup mode (config mode) at first boot when attribute
  161. ``skip`` is set to ``true``. This is optional and may be left out.
  162. ::
  163. setup_mode = {
  164. skip = true,
  165. },
  166. legacy : package
  167. Configuration for the legacy upgrade path.
  168. This is only required in communities upgrading from Lübeck's LFF-0.3.x.
  169. ::
  170. legacy = {
  171. version_files = {'/etc/.freifunk_version_keep', '/etc/.eff_version_keep'},
  172. old_files = {'/etc/config/config_mode', '/etc/config/ffeh', '/etc/config/freifunk'},
  173. config_mode_configs = {'config_mode', 'ffeh', 'freifunk'},
  174. fastd_configs = {'ffeh_mesh_vpn', 'mesh_vpn'},
  175. mesh_ifname = 'freifunk',
  176. tc_configs = {'ffki', 'freifunk'},
  177. wifi_names = {'wifi_freifunk', 'wifi_freifunk5', 'wifi_mesh', 'wifi_mesh5'},
  178. }
  179. Packages
  180. --------
  181. The ``site.mk`` is a Makefile which should define constants
  182. involved in the build process of Gluon.
  183. GLUON_SITE_PACKAGES
  184. Defines a list of packages which should installed additional
  185. to the ``gluon_core`` package.
  186. GLUON_RELEASE
  187. The current release version Gluon should use.
  188. GLUON_PRIORITY
  189. The default priority for the generated manifests (see the autoupdater documentation
  190. for more information).
  191. GLUON_LANGS
  192. List of languages (as two-letter-codes) to include for the web interface. Should always contain
  193. ``en``.
  194. .. _site-config-mode-texts:
  195. Config mode texts
  196. -----------------
  197. The community-defined texts in the config mode are configured in PO files in the ``i18n`` subdirectory
  198. of the site configuration. The message IDs currently defined are:
  199. gluon-config-mode:welcome
  200. Welcome text on the top of the config wizard page.
  201. gluon-config-mode:pubkey
  202. Information about the public VPN key on the reboot page.
  203. gluon-config-mode:reboot
  204. General information about the reboot page.
  205. There is a POT file in the site example directory which can be used to create templates
  206. for the language files. The command ``msginit -l en -i ../../docs/site-example/i18n/gluon-site.pot``
  207. can be used from the ``i18n`` directory to create an initial PO file called ``en.po`` if the ``gettext``
  208. utilities are installed.
  209. Examples
  210. --------
  211. site.mk
  212. ^^^^^^^
  213. .. literalinclude:: ../site-example/site.mk
  214. :language: makefile
  215. site.conf
  216. ^^^^^^^^^
  217. .. literalinclude:: ../site-example/site.conf
  218. :language: lua
  219. i18n/en.po
  220. ^^^^^^^^^^
  221. .. literalinclude:: ../site-example/i18n/en.po
  222. :language: po
  223. i18n/de.po
  224. ^^^^^^^^^^
  225. .. literalinclude:: ../site-example/i18n/de.po
  226. :language: po
  227. modules
  228. ^^^^^^^
  229. .. literalinclude:: ../site-example/modules
  230. :language: makefile
  231. site-repos in the wild
  232. ^^^^^^^^^^^^^^^^^^^^^^
  233. This is a non-exhaustive list of site-repos from various communities:
  234. * `site-ffbs <https://github.com/ffbs/site-ffbs>`_ (Braunschweig)
  235. * `site-ffhb <https://github.com/FreifunkBremen/gluon-site-ffhb>`_ (Bremen)
  236. * `site-ffda <https://github.com/freifunk-darmstadt/site-ffda>`_ (Darmstadt)
  237. * `site-ffgoe <https://github.com/freifunk-goettingen/site-ffgoe>`_ (Göttingen)
  238. * `site-ffhh <https://github.com/freifunkhamburg/site-ffhh>`_ (Hamburg)
  239. * `site-ffhgw <https://github.com/lorenzo-greifswald/site-ffhgw>`_ (Greifswald)
  240. * `site-ffhl <https://github.com/freifunk-luebeck/site-ffhl>`_ (Lübeck)
  241. * `site-ffmd <https://github.com/FreifunkMD/site-ffmd>`_ (Magdeburg)
  242. * `site-ffmwu <https://github.com/freifunk-mwu/site-ffmwu>`_ (Mainz, Wiesbaden & Umgebung)
  243. * `site-ffmyk <https://github.com/FreifunkMYK/site-ffmyk>`_ (Mayen-Koblenz)
  244. * `site-ffm <https://github.com/freifunkMUC/site-ffm>`_ (München)
  245. * `site-ffms <https://github.com/FreiFunkMuenster/site-ffms>`_ (Münster)
  246. * `site-ffnw <https://git.freifunk-ol.de/root/siteconf.git>`_ (Nordwest)
  247. * `site-ffpb <https://git.c3pb.de/freifunk-pb/site-ffpb>`_ (Paderborn)
  248. * `site-ffka <https://github.com/ffka/site-ffka>`_ (Karlsruhe)
  249. * `site-ffrl <https://github.com/ffrl/sites-ffrl>`_ (Rheinland)
  250. * `site-ffrg <https://github.com/ffruhr/site-ffruhr>`_ (Ruhrgebiet)
  251. * `site-ffs <https://github.com/freifunk-stuttgart/site-ffs>`_ (Stuttgart)
  252. * `site-fftr <https://github.com/freifunktrier/site-fftr>`_ (Trier)