Deploy Your IoT Control Hub
Choose a hosting platform that fits your device needs. This guide covers DigitalOcean (recommended for no-TLS devices), plus alternatives like Railway and Fly.io.
| Platform | Cost | Port Control | No-TLS Device? | Best For |
|---|---|---|---|---|
| DigitalOcean | $6–12/mo | Simplest for non-TLS | ||
| Railway | ~$5/mo | TCP Proxy | ✓ (w/ proxy) | Managed platform |
| Fly.io | ~$5/mo | Good | ✓ (native TCP) | Container-native |
| AWS EC2 | $10–20/mo | Scalable backends |
Create a Droplet
Go to digitalocean.com → Create → Droplet
- Region: Choose close to your devices (e.g., Singapore, Frankfurt, US East)
- OS: Ubuntu 22.04 LTS
- Size: Basic ($6/mo) is enough to start
- Authentication: SSH key (more secure than password)
Cost: ~$6/month, billed hourly
SSH into the Droplet
Once created, you'll see the IP. SSH in:
ssh root@YOUR_DROPLET_IPInstall Node.js & git
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs git
node --versionClone & Deploy
Clone the repo, install dependencies, and start the server:
git clone https://github.com/cyberalphatech/v0-websocket-iot-protocol.git
cd v0-websocket-iot-protocol
pnpm install
PORT=8080 pnpm build
PORT=8080 pnpm startThe server starts on port 8080.
Configure Firewall
Open port 8080 (and 443 for HTTPS dashboard):
sudo ufw allow 22/tcp
sudo ufw allow 8080/tcp
sudo ufw allow 443/tcp
sudo ufw enableConfigure Device
Point your TM20/Q9 to the Droplet's IP:
- DomainNm: Your droplet IP (e.g.,
192.0.2.123) or a domain pointing to it - SerPortNo:
8080 - Server approval: No (device appears as pending in dashboard)
Keep It Running (Optional)
To keep the server running after logout, use a process manager like PM2:
sudo npm install -g pm2
PORT=8080 pm2 start "pnpm start" --name "iot-hub"
pm2 startup
pm2 saveAuto-Deploy on Git Push (Optional)
Set up GitHub Actions to auto-SSH into your droplet, pull the latest code, rebuild, and restart whenever you push to the repo.
1. Generate an SSH key pair on your droplet (if not done):
ssh-keygen -t ed25519 -f ~/.ssh/github_deploy -N ""
cat ~/.ssh/github_deploy.pub >> ~/.ssh/authorized_keys2. Copy the private key and add it to GitHub:
Then: GitHub repo → Settings → Secrets and variables → Actions → New secret named DEPLOY_KEY → paste the private key.
3. Create a GitHub Actions workflow file:
Create .github/workflows/deploy.yml in your repo:
name: Deploy to DigitalOcean
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy via SSH
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DROPLET_IP }}
username: root
key: ${{ secrets.DEPLOY_KEY }}
script: |
cd ~/v0-websocket-iot-protocol
git pull origin main
pnpm install
PORT=8080 pnpm build
pm2 restart iot-hub
pm2 save4. Add your droplet IP as a GitHub secret:
GitHub repo → Settings → Secrets and variables → Actions → New secret named DROPLET_IP → enter your droplet's IP (e.g., 192.0.2.123).
Done! Now every time you push to main, GitHub Actions will SSH into the droplet, pull the latest code, rebuild, and restart the server automatically.
Want copy-paste commands for every single step? We've created a complete step-by-step guide with all 10 steps, firewall configuration, PM2 setup, and GitHub Actions auto-deploy:
Complete DigitalOcean Deployment GuidePlain ws:// on port 8080 — no TLS, no proxies needed.
Full control — open any port, run any service.
$6/month — simple, predictable pricing.
If you're staying on Railway, use the TCP Proxy approach documented on the Connect page. It's a workaround but works without re-deploying.
Trade-off: Device connects to *.proxy.rlwy.net instead of your custom domain.
Fly.io has better TCP port support than Railway. You can expose raw ports directly in fly.toml without proxies.
Ready to deploy?
DigitalOcean Droplet gives you the most control and simplicity for non-TLS IoT devices. Start with the 7 steps above, then come back to the Connect page for device configuration.