prosody.cfg.lua.dist: Add example of declaring admins for a server
[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 a (by default, empty) list of accounts that are admins \r
36         -- for the server. Note that you must create the accounts separately\r
37         -- (see http://prosody.im/doc/creating_accounts for info)\r
38         -- Example: admins = { "user1@example.com", "user2@example.net" }\r
39         admins = { }\r
40         \r
41         -- This is the list of modules Prosody will load on startup.\r
42         -- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.\r
43         modules_enabled = {\r
44                         -- Generally required\r
45                                 "roster"; -- Allow users to have a roster. Recommended ;)\r
46                                 "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.\r
47                                 "tls"; -- Add support for secure TLS on c2s/s2s connections\r
48                                 "dialback"; -- s2s dialback support\r
49                                 "disco"; -- Service discovery\r
50                         \r
51                         -- Not essential, but recommended\r
52                                 "private"; -- Private XML storage (for room bookmarks, etc.)\r
53                                 "vcard"; -- Allow users to set vCards\r
54                         \r
55                         -- Nice to have\r
56                                 "legacyauth"; -- Legacy authentication. Only used by some old clients and bots.\r
57                                 "version"; -- Replies to server version requests\r
58                                 "uptime"; -- Report how long server has been running\r
59                                 "time"; -- Let others know the time here on this server\r
60                                 "ping"; -- Replies to XMPP pings with pongs\r
61                                 "pep"; -- Enables users to publish their mood, activity, playing music and more\r
62                                 "register"; -- Allow users to register on this server using a client and change passwords\r
63 \r
64                         -- Other specific functionality\r
65                                 --"posix"; -- POSIX functionality, sends server to background, enables syslog, etc.\r
66                                 --"console"; -- telnet to port 5582 (needs console_enabled = true)\r
67                                 --"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"\r
68                                 --"httpserver"; -- Serve static files from a directory over HTTP\r
69                           };\r
70         \r
71         -- These modules are auto-loaded, should you\r
72         -- for (for some mad reason) want to disable\r
73         -- them then uncomment them below\r
74         modules_disabled = {\r
75                         -- "presence";\r
76                         -- "message";\r
77                         -- "iq";\r
78         };\r
79 \r
80         -- Disable account creation by default, for security\r
81         -- For more information see http://prosody.im/doc/creating_accounts\r
82         allow_registration = false;\r
83         \r
84         -- These are the SSL/TLS-related settings. If you don't want\r
85         -- to use SSL/TLS, you may comment or remove this\r
86         ssl = { \r
87                 key = "certs/localhost.key";\r
88                 certificate = "certs/localhost.cert";\r
89                 }\r
90 \r
91 -- This allows clients to connect to localhost. No harm in it.\r
92 Host "localhost"\r
93 \r
94 -- Section for example.com\r
95 -- (replace example.com with your domain name)\r
96 Host "example.com"\r
97 \r
98         enabled = false -- This will disable the host, preserving the config, but denying connections\r
99 \r
100         -- Assign this host a certificate for TLS, otherwise it would use the one\r
101         -- set in the global section (if any).\r
102         -- Note that old-style SSL on port 5223 only supports one certificate, and will always\r
103         -- use the global one.\r
104         ssl = { \r
105                 key = "certs/example.com.key";\r
106                 certificate = "certs/example.com.crt";\r
107                 }\r
108 \r
109 -- Set up a MUC (multi-user chat) room server on conference.example.com:\r
110 Component "conference.example.com" "muc"\r