MNApp Hosting Guide Using Nginx
A comprehensive guide to hosting your first MNApp
The server specifications such as storage and bandwidth for hosting an MNApp are dependent on the user's requirements. For example, a video streaming platform may require more storage than an information sharing platform.
However, you need a Linux system with Ubuntu 18.04 or 20.04 to run an MNApp.
Step 1: Install BelNet on Your System and Generate Your Belnet Address
Download and run the binaries
Enter the following command into the terminal to download the Belnet binaries from cloud
Unzip the file using the following command
Run the Belnet binary
Then, copy and paste the following command to open the belnet.ini file.
Scroll down to the [network] section and configure the keyfile by giving it a name of your choice. Your MNApp private key will be stored in the following path. Here, we’ve named our keyfile, mnappkey.private
Enter the following command and restart the Belnet client
Step 2: Find Your MNApp’s BelNet Address
To find your MNApp address, enter the following command.
For example, this is the MNApp address for the Beldex explorer hosted on BelNet cw41adqqhykuxw51xmagkkb3fixyieat1josbux13jn6o973tqgy.bdx
Step 3: Download and Install Nginx
Nginx is a dependency. So download and install it using the following commands
Use the following command to check whether nginx is working
Step 4: Setup Your MNApp Web Page
Your web content goes into this directory
Create a directory using the following command. Give a name to your directory. You can do this by replacing your_own-directory in the command below with your directory name.
Place your html web page into this directory
Step 5: Configure Nginx
Below is a sample configuration of Nginx
Enter the following commands
Now enter your directory’s name (established in Step 4) in place of your_own_directory in the command below.
Add the index file of your webpage here using the following command.
Note: Replace your_webpage with the filename that you want to assign to your index html file.
index your_webpage.html;
Now choose a server name by entering the following command. Replace the sample BelNet address below with your MNApp’s BelNet address generated in Step 2.
Save it by pressing Esc
and then :wq
Restart Nginx using the following command
To access your MNApps, connect to BelNet and enter the MNApp’s BelNet address into a browser’s address bar
e.g. http://cw41adqqhykuxw51xmagkkb3fixyieat1josbux13jn6o973tqgy.bdx/
Note: You cannot host a masternode and an MNApp in the same server. You cannot host a BelNet exit node and an MNApp in the same server.
Last updated