Mydia
Your personal media companion, built with Phoenix LiveView
- 1Copy the script below
- 2In HexOS, open Apps, find Mydia 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 mydia 1.2.38"
6 },
37 "installation_questions": [
8 {
9 "question": "Host",
10 "type": "text",
11 "key": "host",
12 "required": true
13 }
14 ],
15 "requirements": {
416 "locations": ["Media", "ApplicationsPerformance"],
517 "specifications": ["2CORE"],
618 "permissions": ["READ_WRITE_LOCATIONS"],
719 "ports": [30308]
20 },
821 "ensure_directories_exists": [
22 {"path": "$LOCATION(Media)", "network_share": true},
23 {"path": "$LOCATION(ApplicationsPerformance)"},
24 {"path": "$LOCATION(ApplicationsPerformance)/mydia"},
25 {
26 "path": "$LOCATION(ApplicationsPerformance)/mydia/images",
27 "snapshot": {"id": "images"}
28 },
29 {
30 "path": "$LOCATION(ApplicationsPerformance)/mydia/config",
31 "snapshot": {"id": "config"}
32 },
33 {
34 "path": "$LOCATION(ApplicationsPerformance)/mydia/postgres_data",
35 "owner": {"user": "netdata", "group": "docker"},
36 "snapshot": {"id": "postgres_data"}
37 }
38 ],
39 "app_values": {
40 "mydia": {
941 "db_password": "$RANDOM_STRING(16)",
1042 "host": "$QUESTION(host)",
1143 "secret_key_base": "$RANDOM_STRING(32)",
1244 "guardian_secret_key": "$RANDOM_STRING(32)"
45 },
46 "storage": {
1347 "media": "$HOST_PATH($LOCATION(Media))",
1448 "images": "$HOST_PATH($LOCATION(ApplicationsPerformance)/mydia/images)",
1549 "config": "$HOST_PATH($LOCATION(ApplicationsPerformance)/mydia/config)",
1650 "postgres_data": "$HOST_PATH($LOCATION(ApplicationsPerformance)/mydia/postgres_data)"
51 },
52 "network": {
1753 "web_port": {"bind_mode": "published", "port_number": 30308}
54 },
1855 "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 mydia 1.2.38”.
Lines 3–6
-
Questions you'll be asked
Before installing, HexOS will ask you for: Host. Your answers are slotted into the settings further down wherever you see $QUESTION(...).
Lines 7–14
-
Storage locations it needs
The app uses these HexOS storage locations: Media and App storage (fast). If one isn't set up yet, HexOS will ask you to pick a place for it.
Line 16
-
Minimum hardware
Recommended minimum: 2 CPU cores.
Line 17
-
Permission to use your folders
Allows the app to read and write files inside the storage locations listed above — and nowhere else.
Line 18
-
Network ports
The app needs port 30308 to be free on your server. A port is like an apartment number for your server's address.
Line 19
-
Folders created on install
Creates the folders the app needs before it starts: App storage (fast) › mydia, App storage (fast) › mydia › images, App storage (fast) › mydia › config and App storage (fast) › mydia › postgres_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 21–38
-
Auto-generated db password
HexOS makes up a long random db password during install. It's only used inside Mydia, so you never need to know it.
Line 41
-
Your answer: host
Filled in with what you typed for “host” when you installed.
Line 42
-
Auto-generated secret key base
HexOS makes up a long random secret key base during install. It's only used inside Mydia, so you never need to know it.
Line 43
-
Auto-generated guardian secret key
HexOS makes up a long random guardian secret key during install. It's only used inside Mydia, so you never need to know it.
Line 44
-
Where your media is saved
Where your media is saved on your server: Media.
Line 47
-
Where the app's “images” files is saved
Where the app's “images” files is saved on your server: App storage (fast) › mydia › images.
Line 48
-
Where the app's settings is saved
Where the app's settings is saved on your server: App storage (fast) › mydia › config.
Line 49
-
Where the app's database is saved
Where the app's database is saved on your server: App storage (fast) › mydia › postgres_data.
Line 50
-
Web port: 30308
The app's web page is published on port 30308. You don't need to remember it — clicking the app's card in HexOS takes you there.
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