Skip to content

About

Web Hosting

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

📱 Mobile Hosting Server

Turn your Android Phone into a Personal Web Hosting Server using Termux + PHP + Cloudflare Tunnel.

🚀 Features

✅ PHP Web Server
✅ Cloudflare Tunnel Support
✅ Custom Domain Support
✅ HTTPS SSL Free
✅ Works on WiFi & Mobile Data
✅ File Manager Access
✅ One Command Start System
✅ Website Hosting From Android
✅ Easy Backup & Transfer

📌 Requirements

  • Android Phone
  • Termux App
  • Internet Connection
  • Cloudflare Account (For Custom Domain)

📥 Install Termux

Download Termux:

https://f-droid.org/packages/com.termux/


⚙️ Initial Setup

Update Termux:

pkg update -y
pkg upgrade -y

Install Packages:

pkg install php git wget nano curl -y

📂 Install Mobile Hosting Server

Clone Repository:

git clone https://github.com/tzalmamun/mobile-hosting-server.git

Enter Folder:

cd mobile-hosting-server

Run Installer:

bash install.sh

Installer will setup:

  • PHP Server
  • Cloudflare Tunnel
  • Sky Command
  • Website Folder
  • File Manager

🌐 Website Files

Your website files will be stored here:

~/public_html

Example:

public_html
│
├── index.php
├── style.css
├── images
└── other files

▶️ Start Server

After installation just type:

sky

It will automatically start:

PHP Server
+
Cloudflare Tunnel
+
Public Website Link

⛔ Stop Server

Stop manually:

sky-stop

or:

pkill php
pkill cloudflared

☁️ Cloudflare Domain Setup

Login:

cloudflared tunnel login

Create Tunnel:

cloudflared tunnel create skyhostr

Check Tunnel ID:

cloudflared tunnel list

Connect Domain:

Example:

cloudflared tunnel route dns skyhostr www.example.com

⚙️ Cloudflare Config

Create config:

nano ~/.cloudflared/config.yml

Add:

tunnel: YOUR-TUNNEL-ID

credentials-file: /data/data/com.termux/files/home/.cloudflared/YOUR-TUNNEL-ID.json

ingress:
  - hostname: www.example.com
    service: http://127.0.0.1:8080

  - service: http_status:404

Save file.


📁 File Manager

Upload:

tinyfilemanager.php

into:

~/public_html

Open:

https://yourdomain.com/tinyfilemanager.php

You can:

✅ Edit Files
✅ Upload Files
✅ Delete Files
✅ Manage Website


📝 Change Website Text

Open:

nano ~/public_html/index.php

Edit your text.

Save:

CTRL + O
ENTER
CTRL + X

Refresh website.


🔄 Move To Another Phone

Install Termux on new phone.

Run:

pkg update -y

pkg install git php wget nano -y

git clone https://github.com/tzalmamun/mobile-hosting-server.git

cd mobile-hosting-server

bash install.sh

Then:

sky

Your server will start again.


🛠️ Troubleshooting

Port Already In Use

Run:

pkill php

Then:

sky

Cloudflare Not Working

Restart:

pkill cloudflared

sky

📌 Commands List

Command Function
sky Start Server
sky-stop Stop Server
pkill php Stop PHP
pkill cloudflared Stop Tunnel

❤️ Credits

Created for Mobile Hosting Server Project

GitHub:

https://github.com/tzalmamun/mobile-hosting-server

About

Web Hosting

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors