prosody.cfg.lua: Various small changes
[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, and other things. \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 table would be:\r
17 --\r
18 -- ssl = { key = "keyfile.key", certificate = "certificate.cert" }\r
19 --\r
20 -- Whitespace (that is tabs, spaces, line breaks) is mostly insignificant, so \r
21 -- can \r
22 -- be placed anywhere that      you deem fitting.\r
23 --\r
24 -- Tip: You can check that the syntax of this file is correct when you have finished\r
25 -- by running: luac -p prosody.cfg.lua\r
26 -- If there are any errors, it will let you know what and where they are, otherwise it \r
27 -- will keep quiet.\r
28 --\r
29 -- The only thing left to do is rename this file to remove the .dist ending, and fill in the \r
30 -- blanks. Good luck, and happy Jabbering!\r
31 \r
32 -- Server-wide settings go in this section\r
33 Host "*"\r
34         \r
35         -- This is the list of modules Prosody will load on startup.\r
36         -- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.\r
37         modules_enabled = {\r
38                         -- Generally required\r
39                                 "roster"; -- Allow users to have a roster. Recommended ;)\r
40                                 "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.\r
41                                 "tls"; -- Add support for secure TLS on c2s/s2s connections\r
42                                 "dialback"; -- s2s dialback support\r
43                                 "disco"; -- Service discovery\r
44                         \r
45                         -- Not essential, but recommended\r
46                                 "private"; -- Private XML storage (for room bookmarks, etc.)\r
47                                 "vcard"; -- Allow users to set vCards\r
48                         \r
49                         -- Nice to have\r
50                                 "legacyauth"; -- Legacy authentication. Only used by some old clients and bots.\r
51                                 "version"; -- Replies to server version requests\r
52                                 "uptime"; -- Report how long server has been running\r
53                                 "time"; -- Let others know the time here on this server\r
54                                 "ping"; -- Replies to XMPP pings with pongs\r
55                                 "register"; -- Allow users to register on this server using a client and change passwords\r
56 \r
57                         -- Other specific functionality\r
58                                 --"posix"; -- POSIX functionality, sends server to background, enables syslog, etc.\r
59                                 --"console"; -- telnet to port 5582 (needs console_enabled = true)\r
60                                 --"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"\r
61                                 --"httpserver"; -- Serve static files from a directory over HTTP\r
62                           };\r
63         \r
64         -- These modules are auto-loaded, should you\r
65         -- for (for some mad reason) want to disable\r
66         -- them then uncomment them below\r
67         modules_disabled = {\r
68                         -- "presence";\r
69                         -- "message";\r
70                         -- "iq";\r
71         };\r
72 \r
73         -- Disable account creation by default, for security\r
74         -- For more information see http://prosody.im/doc/creating_accounts\r
75         allow_registration = false;\r
76         \r
77         -- These are the SSL/TLS-related settings. If you don't want\r
78         -- to use SSL/TLS, you may comment or remove this\r
79         ssl = { \r
80                 key = "certs/localhost.key";\r
81                 certificate = "certs/localhost.cert";\r
82                 }\r
83 \r
84 -- This allows clients to connect to localhost. No harm in it.\r
85 Host "localhost"\r
86 \r
87 -- Section for example.com\r
88 -- (replace example.com with your domain name)\r
89 Host "example.com"\r
90 \r
91         enabled = false -- This will disable the host, preserving the config, but denying connections\r
92 \r
93         -- Assign this host a certificate for TLS, otherwise it would use the one\r
94         -- set in the global section (if any).\r
95         -- Note that old-style SSL on port 5223 only supports one certificate, and will always\r
96         -- use the global one.\r
97         ssl = { \r
98                 key = "certs/example.com.key";\r
99                 certificate = "certs/example.com.crt";\r
100                 }\r
101 \r
102 -- Set up a MUC (multi-user chat) room server on conference.example.com:\r
103 Component "conference.example.com" "muc"\r