Stalwart
All-in-one Mail & Collaboration server. Secure, scalable and fluent in every protocol (IMAP, JMAP, SMTP, CalDAV, CardDAV, WebDAV).
- 1Copy the script below
- 2In HexOS, open Apps, find Stalwart and choose Custom Install
- 3Paste, then press Install — full guide with screenshots
1{
12 "version": 5,
23 "script": {
4 "version": "0.1.0",
5 "changeLog": "Auto-generated draft from TrueNAS stalwart 2.0.16"
6 },
7 "requirements": {
38 "locations": ["ApplicationsPerformance"],
49 "specifications": ["2CORE"],
510 "permissions": ["READ_WRITE_LOCATIONS"],
611 "ports": [
12 30340,
13 30341,
14 30342,
15 30343,
16 30344,
17 30345,
18 30346,
19 30347,
20 30348,
21 30349
22 ]
23 },
724 "ensure_directories_exists": [
25 {"path": "$LOCATION(ApplicationsPerformance)"},
26 {"path": "$LOCATION(ApplicationsPerformance)/stalwart"},
27 {
28 "path": "$LOCATION(ApplicationsPerformance)/stalwart/data",
29 "owner": {"user": "apps"},
30 "snapshot": {"id": "data"}
31 }
32 ],
33 "app_values": {
34 "storage": {
835 "data": "$HOST_PATH($LOCATION(ApplicationsPerformance)/stalwart/data)"
36 },
37 "network": {
938 "http_port": {"bind_mode": "published", "port_number": 30340},
1039 "https_port": {"bind_mode": "published", "port_number": 30341},
1140 "smtp_port": {"bind_mode": "published", "port_number": 30342},
1241 "submission_port": {
42 "bind_mode": "published",
43 "port_number": 30343
44 },
1345 "submissions_port": {
46 "bind_mode": "published",
47 "port_number": 30344
48 },
1449 "imap_port": {"bind_mode": "published", "port_number": 30345},
1550 "imaps_port": {"bind_mode": "published", "port_number": 30346},
1651 "pop3_port": {"bind_mode": "published", "port_number": 30347},
1752 "pop3s_port": {"bind_mode": "published", "port_number": 30348},
1853 "sieve_port": {"bind_mode": "published", "port_number": 30349}
54 },
1955 "resources": {"limits": {"cpus": 2, "memory": "$MEMORY(10%, 4096)"}}
56 }
57}
What this script does
Hover or tap a box to see the lines it explains.
-
Script format
Tells HexOS this is a version 5 install script, so it knows how to read the rest.
Line 2
-
Script revision
This copy of the script is revision 0.1.0. Latest change: “Auto-generated draft from TrueNAS stalwart 2.0.16”.
Lines 3–6
-
Storage locations it needs
The app uses these HexOS storage locations: App storage (fast). If one isn't set up yet, HexOS will ask you to pick a place for it.
Line 8
-
Minimum hardware
Recommended minimum: 2 CPU cores.
Line 9
-
Permission to use your folders
Allows the app to read and write files inside the storage locations listed above — and nowhere else.
Line 10
-
Network ports
The app needs ports 30340, 30341, 30342, 30343, 30344, 30345, 30346, 30347, 30348 and 30349 to be free on your server. A port is like an apartment number for your server's address.
Lines 11–22
-
Folders created on install
Creates the folders the app needs before it starts: App storage (fast) › stalwart and App storage (fast) › stalwart › data. Some folders are handed to a specific system user so the app is allowed to write to them. Folders marked “snapshot” are included in HexOS snapshots, so you can roll them back.
Lines 24–32
-
Where the app's main data is saved
Where the app's main data is saved on your server: App storage (fast) › stalwart › data.
Line 35
-
Http port: 30340
The app's web page is published on port 30340. You don't need to remember it — clicking the app's card in HexOS takes you there.
Line 38
-
Https port: 30341
Publishes the app's https port as 30341.
Line 39
-
Smtp port: 30342
Publishes the app's smtp port as 30342.
Line 40
-
Submission port: 30343
Publishes the app's submission port as 30343.
Lines 41–44
-
Submissions port: 30344
Publishes the app's submissions port as 30344.
Lines 45–48
-
Imap port: 30345
Publishes the app's imap port as 30345.
Line 49
-
Imaps port: 30346
Publishes the app's imaps port as 30346.
Line 50
-
Pop3 port: 30347
Publishes the app's pop3 port as 30347.
Line 51
-
Pop3s port: 30348
Publishes the app's pop3s port as 30348.
Line 52
-
Sieve port: 30349
Publishes the app's sieve port as 30349.
Line 53
-
Resource limits
Caps how much of your server the app can use: 2 CPU cores and 10% of your server's memory, but never more than 4 GB. This keeps one busy app from slowing everything else down.
Line 55