- Web app (Flask): status, config, firewall, logs, users, restart - Docs: AT commands, deploy, DNS, quickstart, web GUI - Scripts: connect, deploy, diag, healthcheck, modem-status, speedtest, status, troubleshoot - Init and iptables: 5g-router, 5g-webgui, rules.v4 - CHANGELOG, TODO, REVISION; config and README updates
2.5 KiB
2.5 KiB
Deploying to a device (SSH / first-time setup)
Update device (deploy script)
From your local machine (with the repo and SSH access to the device):
# Default device: root@10.130.60.121
./scripts/deploy.sh
# Or specify target
./scripts/deploy.sh root@192.168.1.100
# Or use env
TARGET=root@10.130.60.121 ./scripts/deploy.sh
The script:
- Copies
etc/,scripts/,web/, andconfigure_fm350_5g.shto the device at/tmp/Alpine_5G/ - Runs
./scripts/install.shon the device (installs/updates scripts, services, Web GUI) - Restarts
5g-routerand5g-webguiso changes take effect
Ensure SSH key or password auth works to the target before running.
First-time SSH access
1. Get the device on the network
- Connect the device via Ethernet (eth0) so it gets an IP (DHCP) or set a static IP during Alpine setup.
- Note the device IP (e.g. from your router’s DHCP list or Alpine’s console).
2. SSH key-based login (recommended)
On your local machine (not the device):
# Generate a key if you don’t have one
ssh-keygen -t ed25519 -C "your@email" -f ~/.ssh/alpine_5g -N ""
# Copy the public key to the device (replace IP and user)
ssh-copy-id -i ~/.ssh/alpine_5g.pub root@10.130.60.121
Then connect with the key:
ssh -i ~/.ssh/alpine_5g root@10.130.60.121
To avoid specifying the key each time, add to ~/.ssh/config:
Host alpine-5g
HostName 10.130.60.121
User root
IdentityFile ~/.ssh/alpine_5g
Then: ssh alpine-5g.
3. Password login
If you prefer password auth:
ssh root@10.130.60.121
You’ll be prompted for the root password. Key-based auth is still recommended for scripts and automation.
4. Deploy the repo to the device
From your local machine (repo on your laptop):
# Copy entire repo
scp -r /path/to/Alpine_5G root@10.130.60.121:/tmp/
# Then on the device (SSH in and run):
ssh root@10.130.60.121 "cd /tmp/Alpine_5G && chmod +x scripts/install.sh && ./scripts/install.sh"
Or clone from git on the device if it has internet:
ssh root@10.130.60.121
apk add git
git clone https://github.com/YOUR_USER/Alpine_5G.git /tmp/Alpine_5G
cd /tmp/Alpine_5G && ./scripts/install.sh
After deployment
- Edit
/etc/5g-router.confon the device if needed (APN, interfaces). - Start 5G:
service 5g-router startor/usr/local/bin/connect-5g.sh. - Check status:
/usr/local/bin/status-5g.sh. - Health check for monitoring:
/usr/local/bin/healthcheck-5g.sh(exit 0 = OK, 1 = down).