Update example config, categorise modules, add new modules
[prosody.git] / prosody.cfg.lua.dist
1 -- Prosody Example Configuration File \r
2 -- \r
3 -- If it wasn't already obvious, -- starts a comment, and all \r
4 -- text after it on a line is ignored by Prosody.\r
5 --\r
6 -- The config is split into sections, a global section, and one \r
7 -- for each defined host that we serve. You can add as many host \r
8 -- sections as you like.\r
9 --\r
10 -- Lists are written { "like", "this", "one" } \r
11 -- Lists can also be of { 1, 2, 3 } numbers, etc. \r
12 -- Either commas, or semi-colons; may be used\r
13 -- as seperators.\r
14 --\r
15 -- A table is a list of values, except each value has a name. An \r
16 -- example would be:\r
17 --\r
18 -- logging = { type = "html", directory = "/var/logs", rotate = "daily" }\r
19 --\r
20 -- Whitespace (that is tabs, spaces, line breaks) is mostly insignificant, so \r
21 -- can \r
22 -- be placed anywhere\r
23 -- that         you deem fitting.\r
24 --\r
25 -- Tip: You can check that the syntax of this file is correct when you have finished\r
26 -- by running: luac -p prosody.cfg.lua\r
27 -- If there are any errors, it will let you know what and where they are, otherwise it \r
28 -- will keep quiet.\r
29 --\r
30 -- The only thing left to do is rename this file to remove the .dist ending, and fill in the \r
31 -- blanks. Good luck, and happy Jabbering!\r
32 \r
33 -- Global settings go in this section\r
34 Host "*"\r
35         \r
36         -- This is the list of modules Prosody will load on startup.\r
37         -- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.\r
38         modules_enabled = {\r
39                         -- Generally required\r
40                                 "roster"; -- Allow users to have a roster. Recommended ;)\r
41                                 "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.\r
42                                 "tls"; -- Add support for secure TLS on c2s/s2s connections\r
43                                 "dialback"; -- s2s dialback support\r
44                                 "disco"; -- Service discovery\r
45                         \r
46                         -- Not essential, but recommended\r
47                                 "private"; -- Private XML storage (for room bookmarks, etc.)\r
48                                 "vcard"; -- Allow users to set vCards\r
49                         \r
50                         -- Nice to have\r
51                                 "legacyauth"; -- Legacy authentication. Only used by some old clients and bots.\r
52                                 "version"; -- Replies to server version requests\r
53                                 "uptime"; -- Report how long server has been running\r
54                                 "time"; -- Let others know the time here on this server\r
55                                 "ping"; -- Replies to XMPP pings with pongs\r
56 \r
57                         -- Other specific functionality\r
58                                 --"register"; -- Allow users to register on this server using a client\r
59                                 --"posix"; -- POSIX functionality, sends server to background, enables syslog, etc.\r
60                                 --"console"; -- telnet to port 5582 (needs console_enabled = true)\r
61                                 --"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"\r
62                                 --"httpserver"; -- Serve static files from a directory over HTTP\r
63                           };\r
64         \r
65         -- These are the SSL/TLS-related settings. If you don't want\r
66         -- to use SSL/TLS, you may comment or remove this\r
67         ssl = { \r
68                 key = "certs/localhost.key";\r
69                 certificate = "certs/localhost.cert";\r
70                 }\r
71 \r
72 -- This allows clients to connect to localhost. No harm in it.\r
73 Host "localhost"\r
74 \r
75 -- Section for example.com\r
76 -- (replace example.com with your domain name)\r
77 Host "example.com"\r
78         -- Assign this host a certificate for TLS, otherwise it would use the one\r
79         -- set in the global section (if any).\r
80         -- Note that old-style SSL on port 5223 only supports one certificate, and will always\r
81         -- use the global one.\r
82         ssl = { \r
83                 key = "certs/example.com.key";\r
84                 certificate = "certs/example.com.crt";\r
85                 }\r
86 \r
87         enabled = false -- This will disable the host, preserving the config, but denying connections\r
88 \r
89 -- Set up a MUC (multi-user chat) room server on conference.example.com:\r
90 Component "conference.example.com" "muc"\r