English l Persian
Subscription Template for Marzban Panel
A simple HTML template for better display of user information.
- Quick addition of subscription links to apps.
- Links for downloading required applications.
- Supports three languages: Russian, English, Persian.
- Fancy subscription page with an appealing design.
- Ability to copy configurations with a copy icon at the bottom of the page.
- Download the template file:
sudo wget -N -P /var/lib/marzban/templates/subscription/ https://raw.githubusercontent.com/x0sina/marzban-sub/main/index.html
- Run the following commands in your server terminal:
echo 'CUSTOM_TEMPLATES_DIRECTORY="/var/lib/marzban/templates/"' | sudo tee -a /opt/marzban/.env
echo 'SUBSCRIPTION_PAGE_TEMPLATE="subscription/index.html"' | sudo tee -a /opt/marzban/.env
Alternatively, uncomment the following values in the .env
file located in /opt/marzban by removing the # symbol:
CUSTOM_TEMPLATES_DIRECTORY="/var/lib/marzban/templates/"
SUBSCRIPTION_PAGE_TEMPLATE="subscription/index.html"
- Restart marzban
sudo marzban restart
To update the template, repeat step 1.
To change the default language, go to the end of the HTML file and adjust the select tag for your preferred language. Example:
<select id="countries" class="border text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 bg-gray-700 border-gray-600 placeholder-gray-400 text-white">
<option value="fa">فارسی</option>
<option value="en">English</option>
<option value="ru">Русский</option>
</select>
In this example, the default language is Persian.
To personalize the Telegram ID, background image and user logo, changes must be included in the html file, which is possible by searching for some values. To search using nano, first open the file with nano with the following command:
nano /var/lib/marzban/templates/subscription/index.html
Then open the search bar with Ctrl + W combination buttons and search for the following phrase to change Telegram support ID:
https://t.me/yourID
Search for the user's logo:
images/marzban.svg
Search for the background image:
background: url('https://4kwallpapers.com
After making changes, save the file and restart Marzban.
To use the host version, upload the sub folder to the host and change the value of BASE_URL to your panel address in the index.php file just like the following example. Remember to write http if you don't have an SSL for your panel domain.
const BASE_URL = "https://BaseUrl:PORT";
If you dont have an SSL certificate for your panel domain, use http.
This template is based on Marzban Templates design.