[{"data":1,"prerenderedAt":771},["ShallowReactive",2],{"/docs/scripts/sky-dj/setup/installation":3,"/docs/scripts/sky-dj/setup/installation-surround":763,"/docs/scripts/sky-dj/setup/installation-implemented-suggestions":770},{"id":4,"title":5,"body":6,"description":754,"extension":755,"head":756,"implementedSuggestions":756,"meta":757,"navigation":224,"path":758,"schemaOrg":756,"seo":759,"sitemap":760,"stem":761,"__hash__":762},"docs/1.docs/scripts/7.sky-dj/2.setup/1.installation.md","Installation",{"type":7,"value":8,"toc":744},"minimark",[9,14,87,103,106,122,126,419,423,433,480,487,493,550,557,561,564,603,616,622,627,630,634,642,655,663,667,677,694,713,717,720,723,726,740],[10,11,13],"h2",{"id":12},"requirements","Requirements",[15,16,17,30],"table",{},[18,19,20],"thead",{},[21,22,23,27],"tr",{},[24,25,26],"th",{},"Requirement",[24,28,29],{},"Purpose",[31,32,33,42,55,65,76],"tbody",{},[21,34,35,39],{},[36,37,38],"td",{},"FiveM server with OneSync enabled",[36,40,41],{},"Shared club state, routing buckets and server-side position checks",[21,43,44,52],{},[36,45,46,47,51],{},"ESX with ",[48,49,50],"code",{},"RunStaticPlayerMethod"," support",[36,53,54],{},"Player access and framework integration",[21,56,57,62],{},[36,58,59],{},[48,60,61],{},"ox_lib",[36,63,64],{},"Callbacks and shared utilities",[21,66,67,73],{},[36,68,69,72],{},[48,70,71],{},"sky_base"," with a working database connection",[36,74,75],{},"Framework bridge, interactions and automatic SQL persistence",[21,77,78,84],{},[36,79,80,81],{},"Optional ",[48,82,83],{},"ox_target",[36,85,86],{},"Target interaction when selected in Sky Base",[88,89,90,91,94,95,98,99,102],"p",{},"Use the database provider already configured for Sky Base, such as ",[48,92,93],{},"oxmysql"," or ",[48,96,97],{},"mysql-async",". Sky DJ includes its audio engine; a separate sound resource and ",[48,100,101],{},"sky_jobs_base"," are not required.",[88,104,105],{},"The customer package already contains the built frontend. Neither music mode requires customers to install Node.js, Yarn, npm modules, Python, FFmpeg or a webserver. FiveM supplies the embedded runtime used by Experimental delivery. No domain, certificate or additional music port is needed.",[107,108,111],"callout",{"color":109,"icon":110},"warning","i-lucide-triangle-alert",[88,112,113,117,118,121],{},[114,115,116],"strong",{},"Experimental / not stable."," Test the complete resource on your development server before production use. The separate ",[114,119,120],{},"Experimental on-demand MP3"," option is disabled by default; enabling it does not make the project a stable release.",[10,123,125],{"id":124},"install-the-resource","Install the resource",[127,128,130,135,150,180,190,193,197,203,256,272,279,283,301,318,338,342,354,392,403,407,416],"steps",{"level":129},"3",[131,132,134],"h3",{"id":133},"copy-the-complete-resource","Copy the complete resource",[88,136,137,138,141,142,145,146,149],{},"Extract the release package and copy the complete ",[48,139,140],{},"sky_dj"," resource into your server's resources directory. The standalone drag-and-drop package contains ",[48,143,144],{},"resources/[sky]/sky_dj/","; a central resource ZIP may contain ",[48,147,148],{},"sky_dj/"," directly.",[88,151,152,153,157,158,161,162,165,166,169,170,173,174,176,177,179],{},"Keep the resource name ",[114,154,155],{},[48,156,140],{}," and retain its complete ",[48,159,160],{},"config",", ",[48,163,164],{},"source"," and ",[48,167,168],{},"stream"," folders. Your installation must contain ",[48,171,172],{},"fxmanifest.lua"," directly inside ",[48,175,140],{},", without an extra nested ",[48,178,140],{}," directory:",[181,182,188],"pre",{"className":183,"code":185,"language":186,"meta":187},[184],"language-text","resources/\n└── [sky]/\n    └── sky_dj/\n        ├── fxmanifest.lua\n        ├── config/\n        │   └── music/\n        ├── source/\n        │   └── html/\n        └── stream/\n","text","",[48,189,185],{"__ignoreMap":187},[88,191,192],{},"Keep package-root instructions beside your extracted package; they are not resources to start. There is one resource for both music modes and no separate Normal or Experimental package to install.",[131,194,196],{"id":195},"configure-the-database-and-start-order","Configure the database and start order",[88,198,199,200,202],{},"Start your database provider and ESX before the Sky resources. This example uses an existing ",[48,201,93],{}," installation; retain your own database connection settings and provider:",[181,204,209],{"className":205,"code":206,"filename":207,"language":208,"meta":187,"style":187},"language-cfg shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","set onesync on\n\nensure oxmysql\nensure es_extended\nensure ox_lib\nensure sky_base\nensure sky_dj\n","server.cfg","cfg",[48,210,211,219,226,232,238,244,250],{"__ignoreMap":187},[212,213,216],"span",{"class":214,"line":215},"line",1,[212,217,218],{},"set onesync on\n",[212,220,222],{"class":214,"line":221},2,[212,223,225],{"emptyLinePlaceholder":224},true,"\n",[212,227,229],{"class":214,"line":228},3,[212,230,231],{},"ensure oxmysql\n",[212,233,235],{"class":214,"line":234},4,[212,236,237],{},"ensure es_extended\n",[212,239,241],{"class":214,"line":240},5,[212,242,243],{},"ensure ox_lib\n",[212,245,247],{"class":214,"line":246},6,[212,248,249],{},"ensure sky_base\n",[212,251,253],{"class":214,"line":252},7,[212,254,255],{},"ensure sky_dj\n",[88,257,258,259,165,266,271],{},"OneSync must be enabled before resource startup. See the official ",[260,261,265],"a",{"href":262,"rel":263},"https://docs.fivem.net/docs/server-manual/server-commands/#resource-commands",[264],"nofollow","FiveM resource commands",[260,267,270],{"href":268,"rel":269},"https://docs.fivem.net/docs/server-manual/server-commands/#onesync-onofflegacy",[264],"OneSync setting",".",[88,273,274,275,278],{},"Sky Base creates the ",[48,276,277],{},"sky_dj_state"," table and missing initial records automatically. The database account must be able to create or alter the resource's tables and read and write their data. No manual SQL import is required. Preserve existing records when updating; do not reset the table to change music delivery.",[131,280,282],{"id":281},"choose-who-owns-the-settings","Choose who owns the settings",[88,284,285,286,289,290,296,297,300],{},"The default ",[48,287,288],{},"Config.IngameSettings = true"," uses saved SQL settings. On first startup, shipped defaults seed missing settings; existing saved values take precedence. Open ",[114,291,292,295],{},[48,293,294],{},"/djadmin"," → Settings"," as an authorized administrator and save global changes there. Other global entries in the customer's ",[48,298,299],{},"config/config.lua"," do not override SQL settings in this mode.",[88,302,303,304,307,308,311,312,314,315,317],{},"For file-owned global configuration, change the existing ",[48,305,306],{},"IngameSettings"," entry to ",[48,309,310],{},"false",", edit ",[48,313,299],{},", and restart ",[48,316,140],{},". Global settings writes are then disabled in-game while the saved SQL row is retained. Club layouts, placed devices and playlists remain in SQL in either mode.",[88,319,320,321,324,325,328,329,332,333,337],{},"Administrator access defaults to ESX ",[48,322,323],{},"admin"," / ",[48,326,327],{},"superadmin"," or ACE ",[48,330,331],{},"sky.dj.admin",". See ",[260,334,336],{"href":335},"/docs/scripts/sky-dj/setup/configuration","Configuration"," for permissions, language and configuration ownership.",[131,339,341],{"id":340},"add-original-mp3s","Add original MP3s",[88,343,344,345,350,351,353],{},"Put your own original MP3 files in ",[114,346,347],{},[48,348,349],{},"sky_dj/config/music/",", then restart ",[48,352,140],{},". Both delivery modes use this same folder. The customer package does not include a music library.",[355,356,357,365,380,383,386,389],"ul",{},[358,359,360,361,364],"li",{},"Use at most ",[114,362,363],{},"500 MP3 files"," in the selected directory. Subfolders are not scanned.",[358,366,367,368,371,372,375,376,379],{},"Files may be up to ",[114,369,370],{},"50 MiB"," each. Names may contain ASCII letters, numbers, spaces, underscores, hyphens and periods, must start with a letter, number, underscore or hyphen, and must end in lowercase ",[48,373,374],{},".mp3",". Maximum length is 160 characters; ",[48,377,378],{},".."," is rejected.",[358,381,382],{},"Keep paths and filename capitalization consistent, especially on Linux. Folder paths use forward slashes; symlinked folders are not supported.",[358,384,385],{},"Upload audio through your server's file manager or SFTP. The in-game library manages playlists and settings; it does not upload files.",[358,387,388],{},"Preserve original filenames when updating or moving music: playlist track IDs use those filenames.",[358,390,391],{},"Restart the owning resource after adding, removing or replacing files so FiveM rebuilds the optional music pack and Sky DJ refreshes its catalogue.",[88,393,394,395,398,399,402],{},"Original MP3 bytes are used without conversion. Leave ",[114,396,397],{},"Music folder"," at ",[48,400,401],{},"config/music"," for the built-in setup.",[131,404,406],{"id":405},"create-a-playlist-and-test-playback","Create a playlist and test playback",[88,408,409,410,415],{},"Open ",[114,411,412,414],{},[48,413,294],{}," → Settings → Music & Playlists",", create a playlist and add tracks. Assign that playlist to a club and save the club. At its DJ booth, load an assigned track into deck A or B and test playback.",[88,417,418],{},"For a new custom club, place its DJ booth and at least one speaker before saving. The fixed festival is configured separately from your own clubs. Music synchronization is optional and starts disabled; ordinary playback does not require it.",[10,420,422],{"id":421},"choose-music-delivery","Choose music delivery",[88,424,425,426,428,429,432],{},"The ",[114,427,120],{}," checkbox under ",[114,430,431],{},"Settings → Music & Playlists → Library & Queues"," selects delivery for the same original files:",[15,434,435,448],{},[18,436,437],{},[21,438,439,442,445],{},[24,440,441],{},"Checkbox",[24,443,444],{},"Delivery",[24,446,447],{},"When audio is received",[31,449,450,467],{},[21,451,452,457,464],{},[36,453,454],{},[114,455,456],{},"Off — Normal MP3 (default)",[36,458,459,460,463],{},"FiveM mounts the complete optional ",[48,461,462],{},"sky_dj_music"," music pack into its native cache.",[36,465,466],{},"The first local MP3 use, including playback or PFL, can request the complete library. The pack is not automatically requested during connection.",[21,468,469,474,477],{},[36,470,471],{},[114,472,473],{},"On — Experimental / not stable",[36,475,476],{},"Only currently needed songs transfer through FiveM's internal events. The optional music pack is not requested.",[36,478,479],{},"An eligible listener near a playing club or a DJ loading a deck/PFL receives needed songs. Each selected MP3 finishes loading before playback.",[88,481,482,483,486],{},"With SQL-owned settings, enable Experimental only after acknowledging its warning, then ",[114,484,485],{},"save",". Sources on loaded decks and queues update live; switching modes does not require moving music, replacing the package or restarting the resource. Existing SQL settings, playlist filename IDs and club assignments are retained.",[88,488,489,490,492],{},"For file-owned settings, edit these existing entries and restart ",[48,491,140],{},":",[181,494,499],{"className":495,"code":496,"filename":497,"language":498,"meta":187,"style":187},"language-lua shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","IngameSettings = false,\nMusicDirectory = 'config/music',\nMusicOnDemandExperimental = false, -- Normal; true selects Experimental\n","config/config.lua — existing Config entries","lua",[48,500,501,517,535],{"__ignoreMap":187},[212,502,503,507,511,514],{"class":214,"line":215},[212,504,506],{"class":505},"sTEyZ","IngameSettings ",[212,508,510],{"class":509},"sMK4o","=",[212,512,513],{"class":509}," false",[212,515,516],{"class":505},",\n",[212,518,519,522,524,527,530,533],{"class":214,"line":221},[212,520,521],{"class":505},"MusicDirectory ",[212,523,510],{"class":509},[212,525,526],{"class":509}," '",[212,528,401],{"class":529},"sfazB",[212,531,532],{"class":509},"'",[212,534,516],{"class":505},[212,536,537,540,542,544,546],{"class":214,"line":228},[212,538,539],{"class":505},"MusicOnDemandExperimental ",[212,541,510],{"class":509},[212,543,513],{"class":509},[212,545,161],{"class":505},[212,547,549],{"class":548},"sHwdD","-- Normal; true selects Experimental\n",[88,551,552,553,556],{},"The shipped default is ",[48,554,555],{},"MusicOnDemandExperimental = false",". Existing saved choices are preserved. File-library changes still require a resource restart, even though an in-game mode change applies live.",[131,558,560],{"id":559},"connection-downloads-and-loading","Connection downloads and loading",[88,562,563],{},"The supplied manifest keeps library MP3s in the optional set:",[181,565,568],{"className":495,"code":566,"filename":567,"language":498,"meta":187,"style":187},"file_set 'sky_dj_music' {\n    'config/music/*.mp3',\n}\n","fxmanifest.lua — supplied music declaration",[48,569,570,586,598],{"__ignoreMap":187},[212,571,572,576,578,580,583],{"class":214,"line":215},[212,573,575],{"class":574},"s2Zo4","file_set",[212,577,526],{"class":509},[212,579,462],{"class":529},[212,581,582],{"class":509},"' ",[212,584,585],{"class":505},"{\n",[212,587,588,591,594,596],{"class":214,"line":221},[212,589,590],{"class":509},"    '",[212,592,593],{"class":529},"config/music/*.mp3",[212,595,532],{"class":509},[212,597,516],{"class":505},[212,599,600],{"class":214,"line":228},[212,601,602],{"class":505},"}\n",[88,604,605,606,161,609,161,612,615],{},"Keep this declaration. Do not also add library MP3s to ordinary client ",[48,607,608],{},"files",[48,610,611],{},"client_script",[48,613,614],{},"shared_script"," or streamed-asset folders; those locations can download independently of the music checkbox.",[88,617,618,621],{},[114,619,620],{},"No automatic full-library download during connection"," does not mean that players never receive music. After joining, a player near an active club may immediately need its playing songs. In Normal mode, that first local music use can start the complete optional-pack download. In Experimental mode, only currently needed songs load, and the complete selected MP3 is received before decoding and playback. Spawning inside a playing club can therefore cause audio transfer soon after joining.",[107,623,624],{"color":109,"icon":110},[88,625,626],{},"Switching to Experimental cannot cancel a Normal optional-pack download that has already started or erase files already in FiveM's native cache. The new mode controls subsequent Sky DJ music requests.",[88,628,629],{},"Experimental transfers retain listener authorization, routing-bucket checks, bandwidth budgets and a bounded transfer window. Cold tracks can take time to load; slow links, large files and many simultaneous listeners need testing on your server. This mode does not promise a fixed loading time.",[131,631,633],{"id":632},"existing-custom-music-sources","Existing custom music sources",[88,635,636,637,641],{},"The built-in optional-pack setup applies to ",[114,638,639],{},[48,640,349],{},". For restart-free switching between these two modes, keep that folder and the supplied manifest.",[88,643,644,645,648,649,651,652,654],{},"An advanced existing Normal source such as ",[48,646,647],{},"@sky_dj_music/music"," requires its owning resource to publish the MP3s through ordinary client ",[48,650,608],{}," and to start before Sky DJ. Such music still downloads when players connect, independently of the Sky DJ checkbox. Sky DJ cannot mount another resource's optional file set on its behalf. Custom Normal folders inside ",[48,653,140],{}," likewise need ordinary client publication. Experimental rejects a selected source whose MP3s are already client-published.",[88,656,657,658,660,661,271],{},"Absolute operating-system paths and symlinked folders are unsupported. See ",[260,659,336],{"href":335}," before changing ",[114,662,397],{},[10,664,666],{"id":665},"updating-an-existing-installation","Updating an existing installation",[88,668,669,670,673,674,676],{},"Back up ",[48,671,672],{},"config/",", original music files and the ",[48,675,277],{}," database table before updating. Replace the complete published runtime together so Lua, the built NUI and streamed assets match. Preserve your original MP3 names and SQL records.",[88,678,679,680,683,684,687,688,690,691,693],{},"The former external HTTPS/Opus delivery and its settings are retired. Generated Opus exports are not used; keep the original MP3s in ",[48,681,682],{},"config/music/",". No converter, domain or external music host is needed. If updating the earlier private-folder experiment, move its original MP3s from ",[48,685,686],{},"config/music-private/"," back to ",[48,689,682],{}," and restart ",[48,692,140],{},". Do not replace saved settings or playlists with empty records.",[88,695,696,697,699,700,702,703,705,706,708,709,712],{},"An existing custom ",[114,698,397],{}," is retained during migration. If it points at an old export folder, open ",[114,701,431],{},", set ",[114,704,397],{}," to ",[48,707,401],{},", and save. In file mode, update the existing ",[48,710,711],{},"MusicDirectory"," value instead and restart. Moving MP3s without updating that saved folder leaves the catalogue pointed at the old location.",[10,714,716],{"id":715},"final-check","Final check",[88,718,719],{},"Test playback, seeking, A/B transitions and optional music synchronization with two FiveM clients. Verify that saved settings and club assignments survive a restart.",[88,721,722],{},"Use a fresh-cache client outside any playing club to check that joining does not automatically request the music library. Then test Normal's first-use complete-pack download separately from Experimental's needed-song transfer. Also join or walk into an active club and check that its current music loads and joins the correct playback position.",[88,724,725],{},"After a map update, fully exit and relaunch FiveM before checking streaming and collision.",[88,727,728,729,165,733,735,736,271],{},"Continue with ",[260,730,732],{"href":731},"/docs/scripts/sky-dj/overview","Overview",[260,734,336],{"href":335},". For missing tracks, downloads, playback or access errors, use ",[260,737,739],{"href":738},"/docs/scripts/sky-dj/reference/troubleshooting","Troubleshooting",[741,742,743],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}",{"title":187,"searchDepth":215,"depth":221,"links":745},[746,747,748,752,753],{"id":12,"depth":221,"text":13},{"id":124,"depth":221,"text":125},{"id":421,"depth":221,"text":422,"children":749},[750,751],{"id":559,"depth":228,"text":560},{"id":632,"depth":228,"text":633},{"id":665,"depth":221,"text":666},{"id":715,"depth":221,"text":716},"Install one Sky DJ resource, add original MP3s, and choose Normal or optional Experimental delivery without an external music host.","md",null,{},"/docs/scripts/sky-dj/setup/installation",{"title":5,"description":754},{"loc":758},"1.docs/scripts/7.sky-dj/2.setup/1.installation","ZQ0Y-LCulDUwWkt6tS9V1_wXI8wV977likHloZUlG2g",[764,767],{"title":732,"path":731,"stem":765,"description":766,"children":-1},"1.docs/scripts/7.sky-dj/1.overview","Set up the experimental DJ System with local MP3s, create your first club, and find the mixing, spatial audio, lighting and boombox guides.",{"title":336,"path":335,"stem":768,"description":769,"children":-1},"1.docs/scripts/7.sky-dj/2.setup/2.configuration","Complete reference for global settings, Music Sync, boombox limits, permissions, music delivery and advanced audio files.",[],1792951548860]