Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/x0sina/marzban-sub
https://github.com/x0sina/marzban-sub
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/x0sina/marzban-sub
- Owner: x0sina
- Created: 2023-09-09T09:16:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-10T16:25:40.000Z (about 1 month ago)
- Last Synced: 2025-02-04T18:14:22.978Z (10 days ago)
- Language: PHP
- Size: 7.59 MB
- Stars: 181
- Watchers: 2
- Forks: 81
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-freedom - sina
- awesome-freedom - sina
README
English l [Persian](/persianREADME.md)
Subscription Template for Marzban Panel
## Table of Contents
- [Features](#features)
- [Installation Steps](#installation-steps)
- [Default Language](#default-language)
- [Personalization](#personalization)
- [Host Version](#host-version)# Introduction
A simple HTML template for better display of user information.# Features
- 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.# Installation Steps
1. Download the template file:
```sh
sudo wget -N -P /var/lib/marzban/templates/subscription/ https://raw.githubusercontent.com/x0sina/marzban-sub/main/index.html
```2. Run the following commands in your server terminal:
```sh
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:
```sh
CUSTOM_TEMPLATES_DIRECTORY="/var/lib/marzban/templates/"
SUBSCRIPTION_PAGE_TEMPLATE="subscription/index.html"
```3. Restart marzban
```
sudo marzban restart
```## Update
To update the template, repeat step 1.## Default Language
To change the default language, go to the end of the HTML file and adjust the select tag for your preferred language. Example:```sh
فارسی
English
Русский```
In this example, the default language is Persian.
# Personalization
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.## Host Version
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.## Copyright
This template is based on Marzban Templates design.