Stash
An organizer for your NSFW materials, written in Go.
- 1Copy the script below
- 2In HexOS, open Apps, find Stash 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 stash 1.1.9"
6 },
7 "requirements": {
38 "locations": [
9 "ApplicationsPerformance",
10 "ApplicationsCapacity",
11 "Media"
12 ],
413 "specifications": ["2CORE"],
514 "permissions": ["READ_WRITE_LOCATIONS"],
615 "ports": [30198]
16 },
717 "ensure_directories_exists": [
18 {"path": "$LOCATION(ApplicationsPerformance)"},
19 {"path": "$LOCATION(ApplicationsPerformance)/stash"},
20 {"path": "$LOCATION(ApplicationsCapacity)"},
21 {"path": "$LOCATION(ApplicationsCapacity)/stash"},
22 {"path": "$LOCATION(Media)", "network_share": true},
23 {
24 "path": "$LOCATION(ApplicationsPerformance)/stash/config",
25 "snapshot": {"id": "config"}
26 },
27 {
28 "path": "$LOCATION(ApplicationsPerformance)/stash/data",
29 "snapshot": {"id": "data"}
30 },
31 {
32 "path": "$LOCATION(ApplicationsPerformance)/stash/metadata",
33 "snapshot": {"id": "metadata"}
34 },
35 {"path": "$LOCATION(ApplicationsCapacity)/stash/cache"},
36 {
37 "path": "$LOCATION(ApplicationsPerformance)/stash/blobs",
38 "snapshot": {"id": "blobs"}
39 },
40 {
41 "path": "$LOCATION(ApplicationsPerformance)/stash/generated",
42 "snapshot": {"id": "generated"}
43 }
44 ],
45 "app_values": {
46 "storage": {
847 "config": "$HOST_PATH($LOCATION(ApplicationsPerformance)/stash/config)",
948 "data": "$HOST_PATH($LOCATION(ApplicationsPerformance)/stash/data)",
1049 "metadata": "$HOST_PATH($LOCATION(ApplicationsPerformance)/stash/metadata)",
1150 "cache": "$HOST_PATH($LOCATION(ApplicationsCapacity)/stash/cache)",
1251 "blobs": "$HOST_PATH($LOCATION(ApplicationsPerformance)/stash/blobs)",
1352 "generated": "$HOST_PATH($LOCATION(ApplicationsPerformance)/stash/generated)",
1453 "additional_storage": [
54 "$MOUNTED_HOST_PATH($LOCATION(Media), /media)"
55 ]
56 },
57 "network": {
1558 "web_port": {"bind_mode": "published", "port_number": 30198}
59 },
1660 "resources": {"limits": {"cpus": 2, "memory": "$MEMORY(10%, 4096)"}}
61 }
62}
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 stash 1.1.9”.
Lines 3–6
-
Storage locations it needs
The app uses these HexOS storage locations: App storage (fast), App storage (large) and Media. If one isn't set up yet, HexOS will ask you to pick a place for it.
Lines 8–12
-
Minimum hardware
Recommended minimum: 2 CPU cores.
Line 13
-
Permission to use your folders
Allows the app to read and write files inside the storage locations listed above — and nowhere else.
Line 14
-
Network ports
The app needs port 30198 to be free on your server. A port is like an apartment number for your server's address.
Line 15
-
Folders created on install
Creates the folders the app needs before it starts: App storage (fast) › stash, App storage (large) › stash, App storage (fast) › stash › config, App storage (fast) › stash › data, App storage (fast) › stash › metadata, App storage (large) › stash › cache, App storage (fast) › stash › blobs and App storage (fast) › stash › generated. Folders marked “snapshot” are included in HexOS snapshots, so you can roll them back.
Lines 17–44
-
Where the app's settings is saved
Where the app's settings is saved on your server: App storage (fast) › stash › config.
Line 47
-
Where the app's main data is saved
Where the app's main data is saved on your server: App storage (fast) › stash › data.
Line 48
-
Where the app's “metadata” files is saved
Where the app's “metadata” files is saved on your server: App storage (fast) › stash › metadata.
Line 49
-
Where temporary cache files is saved
Where temporary cache files is saved on your server: App storage (large) › stash › cache.
Line 50
-
Where the app's “blobs” files is saved
Where the app's “blobs” files is saved on your server: App storage (fast) › stash › blobs.
Line 51
-
Where the app's “generated” files is saved
Where the app's “generated” files is saved on your server: App storage (fast) › stash › generated.
Line 52
-
Your shared folders
Gives the app access to your existing files: Media appears inside the app as /media.
Lines 53–55
-
Web port: 30198
The app's web page is published on port 30198. You don't need to remember it — clicking the app's card in HexOS takes you there.
Line 58
-
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 60