1 -- Prosody Example Configuration File |
1 -- Prosody Example Configuration File |
2 -- |
2 -- |
3 -- If it wasn't already obvious, -- starts a comment, and all |
3 -- If it wasn't already obvious, -- starts a comment, and all |
4 -- text after it on a line is ignored by Prosody. |
4 -- text after it on a line is ignored by Prosody. |
5 -- |
5 -- |
6 -- The config is split into sections, a global section, and one |
6 -- The config is split into sections, a global section, and one |
7 -- for each defined host that we serve. You can add as many host |
7 -- for each defined host that we serve. You can add as many host |
8 -- sections as you like. |
8 -- sections as you like. |
9 -- |
9 -- |
10 -- Lists are written { "like", "this", "one" } |
10 -- Lists are written { "like", "this", "one" } |
11 -- Lists can also be of { 1, 2, 3 } numbers, and other things. |
11 -- Lists can also be of { 1, 2, 3 } numbers, and other things. |
12 -- Either commas, or semi-colons; may be used |
12 -- Either commas, or semi-colons; may be used |
13 -- as seperators. |
13 -- as seperators. |
14 -- |
14 -- |
15 -- A table is a list of values, except each value has a name. An |
15 -- A table is a list of values, except each value has a name. An |
16 -- example table would be: |
16 -- example table would be: |
17 -- |
17 -- |
18 -- ssl = { key = "keyfile.key", certificate = "certificate.cert" } |
18 -- ssl = { key = "keyfile.key", certificate = "certificate.cert" } |
19 -- |
19 -- |
20 -- Whitespace (that is tabs, spaces, line breaks) is mostly insignificant, so |
20 -- Whitespace (that is tabs, spaces, line breaks) is mostly insignificant, so |
21 -- can |
21 -- can |
22 -- be placed anywhere that you deem fitting. |
22 -- be placed anywhere that you deem fitting. |
23 -- |
23 -- |
24 -- Tip: You can check that the syntax of this file is correct when you have finished |
24 -- Tip: You can check that the syntax of this file is correct when you have finished |
25 -- by running: luac -p prosody.cfg.lua |
25 -- by running: luac -p prosody.cfg.lua |
26 -- If there are any errors, it will let you know what and where they are, otherwise it |
26 -- If there are any errors, it will let you know what and where they are, otherwise it |
27 -- will keep quiet. |
27 -- will keep quiet. |
28 -- |
28 -- |
29 -- The only thing left to do is rename this file to remove the .dist ending, and fill in the |
29 -- The only thing left to do is rename this file to remove the .dist ending, and fill in the |
30 -- blanks. Good luck, and happy Jabbering! |
30 -- blanks. Good luck, and happy Jabbering! |
31 |
31 |
32 -- Server-wide settings go in this section |
32 -- Server-wide settings go in this section |
33 Host "*" |
33 Host "*" |
34 |
34 |
35 -- This is a (by default, empty) list of accounts that are admins |
35 -- This is a (by default, empty) list of accounts that are admins |
36 -- for the server. Note that you must create the accounts separately |
36 -- for the server. Note that you must create the accounts separately |
37 -- (see http://prosody.im/doc/creating_accounts for info) |
37 -- (see http://prosody.im/doc/creating_accounts for info) |
38 -- Example: admins = { "user1@example.com", "user2@example.net" } |
38 -- Example: admins = { "user1@example.com", "user2@example.net" } |
39 admins = { } |
39 admins = { } |
40 |
40 |
81 -- For more information see http://prosody.im/doc/creating_accounts |
81 -- For more information see http://prosody.im/doc/creating_accounts |
82 allow_registration = false; |
82 allow_registration = false; |
83 |
83 |
84 -- These are the SSL/TLS-related settings. If you don't want |
84 -- These are the SSL/TLS-related settings. If you don't want |
85 -- to use SSL/TLS, you may comment or remove this |
85 -- to use SSL/TLS, you may comment or remove this |
86 ssl = { |
86 ssl = { |
87 key = "certs/localhost.key"; |
87 key = "certs/localhost.key"; |
88 certificate = "certs/localhost.cert"; |
88 certificate = "certs/localhost.cert"; |
89 } |
89 } |
90 |
90 |
91 -- This allows clients to connect to localhost. No harm in it. |
91 -- This allows clients to connect to localhost. No harm in it. |
99 |
99 |
100 -- Assign this host a certificate for TLS, otherwise it would use the one |
100 -- Assign this host a certificate for TLS, otherwise it would use the one |
101 -- set in the global section (if any). |
101 -- set in the global section (if any). |
102 -- Note that old-style SSL on port 5223 only supports one certificate, and will always |
102 -- Note that old-style SSL on port 5223 only supports one certificate, and will always |
103 -- use the global one. |
103 -- use the global one. |
104 ssl = { |
104 ssl = { |
105 key = "certs/example.com.key"; |
105 key = "certs/example.com.key"; |
106 certificate = "certs/example.com.crt"; |
106 certificate = "certs/example.com.crt"; |
107 } |
107 } |
108 |
108 |
109 -- Set up a MUC (multi-user chat) room server on conference.example.com: |
109 -- Set up a MUC (multi-user chat) room server on conference.example.com: |