🧠Installation
Welcome! Follow these step-by-step instructions to set up and start using the resource. Even if you're new to this, you'll find this guide easy to follow.
Important
Join Discord and Verify Your Payment:
Join the Discord server using the link below.
Read the messages in the
#verify-your-payment
channel.You should have received your
transactionid
in the email from Tebex.
Discord Link: https://discord.gg/tngc5yN6mf
Installation
Follow the guide, make sure to go through every step
1. Add the Resource to Your Server
Drag and drop the resource folder into your server's resource
folder.
2. Update server.cfg
Add the following lines to your server.cfg
file before d-phone
:
ensure d-music
ensure d-phone
3. Import the SQL File
To set up the database, follow these steps to import the sql.sql
file:
Locate the
sql.sql
File: It should be in the root directory of the resource you downloaded.Open Your Database Management Tool: This could be tools like phpMyAdmin, HeidiSQL, MySQL Workbench, or any other MySQL-compatible tool you are comfortable with.
Connect to Your Database: Use your database connection details (hostname, username, password, database name).
Import the
sql.sql
File:Look for an "Import" or "Run SQL File" option in your database tool.
Select the
sql.sql
file from the file picker.Run the import. This will create the necessary tables and data required for the resource.
4. Configure the API URL
Next, you need to configure the API URL for the server to connect properly:
Open the
Config.lua
File: Use any text editor like Notepad++, Sublime Text, or Visual Studio Code.Find the
apiUrl
Variable: Look for a line that starts withapiUrl =
.Set Your API URL:
The URL should be your server's IP address and port. By default, the port is usually
3000
.Example Configuration:
apiUrl = 'http://127.0.0.1:3000'
Replace 127.0.0.1 with your actual server IP if different.
5. Open Port 3000 on Your Server
To allow communication through port 3000
, it must be open and accessible. Follow these steps based on your operating system:
For Windows:
Open the Control Panel and go to
System and Security
>Windows Defender Firewall
.Click on Advanced settings.
In the left pane, click on Inbound Rules, then select New Rule.
Choose Port and click Next.
Select TCP and specify
3000
as the port.Select Allow the connection, then click Next.
Choose when the rule applies (Domain, Private, Public), then click Next.
Give the rule a name (e.g., "API Server Port 3000") and click Finish.
For Linux:
Open your terminal.
Use the following commands to open port 3000
sudo ufw allow 3000/tcp
sudo ufw reload
6. Set Up API Keys
To integrate with external services like Spotify and YouTube, you need to set up API keys. Follow the steps below to configure them:
Locate the
config.lua
File: This file contains placeholders for your API keys.Open the
config.lua
File: Use any text editor (such as Notepad++, Sublime Text, or Visual Studio Code) to open the file.
Set Up the Spotify API:
To integrate Spotify with your application, you need to obtain your API keys (Client ID
and Client Secret
) from Spotify's developer portal. Follow these detailed steps:
Obtain Your API Keys from Spotify for Developers:
Go to the Spotify Developer Dashboard.
Sign in with your Spotify account. If you don't have an account, you'll need to create one.
Once logged in, click on "Create an App".
Fill in the required information, such as the App Name and App Description.
Agree to the terms and click "Create".
After the app is created, you'll be redirected to the app's settings page.
Here, you'll find your Client ID and a button to reveal your Client Secret.
Follow this video tutorial to understand the steps to get your Client ID and Client Secret:
The video provides a visual walkthrough on how to navigate the Spotify Developer Dashboard, create an application, and retrieve the
Client ID
andClient Secret
.
Configure Redirect URIs (if required):
Go to your app settings and find the Redirect URIs section.
Click on "Add Redirect URI" and enter the URL where your app will handle authentication redirects. This URL must match the URL used in your application code. ( Just add http://yourserverip:3000 )
Click "Save" to store your changes.
Update the config.lua File with your Spotify credentials:
Open the config.lua file in a text editor.
Add the following lines, replacing
your_spotify_client_id
andyour_spotify_client_secret
with the actual values obtained from the Spotify Developer Dashboard:
SPOTIFY_CLIENT_ID = "your_spotify_client_id" SPOTIFY_CLIENT_SECRET = "your_spotify_client_secret"
Set Up the Google API:
To integrate YouTube with your application, you need to obtain a YouTube API key from the Google Cloud Platform. Follow these detailed steps:
Obtain a YouTube API Key:
Go to the Google Cloud Console.
If you don’t have a Google account, create one. Otherwise, sign in with your existing Google account.
Create a New Project:
Click on the Select a project dropdown at the top and then click New Project.
Enter a Project Name and select your Billing Account (if applicable). Click Create.
Enable YouTube Data API v3:
Once your project is created, go to the Navigation Menu (three horizontal lines at the top-left) > APIs & Services > Library.
In the search bar, type YouTube Data API v3.
Click on YouTube Data API v3 and then click Enable.
Create API Credentials:
After enabling the API, go to APIs & Services > Credentials.
Click on Create Credentials and select API Key.
A pop-up will appear with your newly created API key. Copy this key as you will need it in the next step.
Restrict Your API Key (optional but recommended):
Click Restrict Key to set restrictions on how and where the key can be used, such as limiting it to specific IP addresses or HTTP referrers.
Set the restrictions according to your needs and click Save.
Follow this tutorial for a visual guide on generating your YouTube API key and understanding how to configure it properly.
Update the config.lua File with your YouTube API key:
Open the config.lua file in a text editor.
Add the following line, replacing
your_youtube_api_key
with the actual API key obtained from the Google Cloud Console:
YOUTUBE_API_KEY = "your_youtube_api_key"
7. Start the HTML Server
To run the HTML server, follow these instructions based on your operating system:
Navigate to the
htmlServer
Folder: This folder should be within the resource files you downloaded.
For Windows:
Simply double-click the
musicServer.exe
file to start the server.
For Linux:
Ensure you are in the same folder as
musicServer
.Before the first start, make the file executable by running:
chmod +x musicServer
Then, start the server with:
./musicServer
You are now all set up! If you encounter any issues or need further assistance, please visit our Discord server for support.
Last updated