Skip to content

tlindi/mynode-clearnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clearnet App for HTTPS Support

Clearnet logo

Ment to help advanced users to gain what is described at "Advanced Resolutions" chapter of My Device has a Lightning Network Error.

Target is in addition to enable publishing Apps to Clearnet as described in Easy switch Tor - clearnet for bundle nodes - BOLT.FUN.mhtml by Darthcoin (on above link download with Right-Click and Save Link As)

Usage

  • sudo touch /mnt/hdd/mynode/certbot/certbot_dry_run

then run

  • sudo bash -c 'bash /home/admin/mynode_sdk/clearnet/scripts/install_clearnet.sh' edit
  • sudo nano /mnt/hdd/mynode/clearnet/https_domain
  • sudo nano /mnt/hdd/mynode/clearnet/https_domain_contact
  • sudo nano /mnt/hdd/mynode/clearnet/https_hosts

re-run

  • sudo bash -c 'bash /home/admin/mynode_sdk/clearnet/scripts/install_clearnet.sh'

Fix your DNS, network forwarding, dynamicdns and then

  • re-rerun sudo bash -c 'bash /home/admin/mynode_sdk/clearnet/scripts/install_clearnet.sh'

When looks good

  • rm /mnt/hdd/mynode/certbot/certbot_dry_run
  • /usr/share/mynode_apps/clearnet/scripts/install_clearnet.sh

Enjoy!

When looks good -rm /mnt/hdd/mynode/certbot/certbot_dry_run -/usr/share/mynode_apps/clearnet/scripts/install_clearnet.sh

Enjoy!

✅ Completed Implementation

🔧 Install Script (clearnet_install.sh)

  • Defines dynamic environment variables for app, data, and backup paths
  • Creates working directories and ensures safe permissions
  • Installs required packages (certbot, python3-certbot, python3-certbot-nginx) only if missing
  • Migrates /etc/letsencrypt to MyNode disk:
  • Creates .org and timestamped .tgz backups
  • Moves original directory and replaces with symlink
  • Reads domain from https_domain file
  • Creates symlinks for: node..crt → fullchain.pem node..key → privkey.pem Aborts if symlinks already exist

🧹 Uninstall Script (clearnet_uninstall.sh)

  • Backs up current /etc/letsencrypt before removal
  • Removes cert symlinks based on domain file
  • Restores original /etc/letsencrypt from .org backup
  • Deletes app directories (/opt/mynode/clearnet, $APP_DATADIR)
  • Purges certbot-related packages if installed

🧾 Logging & Safety

  • All actions logged with [INFO], [SKIP], or [ERROR]
  • Aborts on unexpected conditions to prevent data loss
  • Assumes root execution, avoids sudo

🧩 MyNode Community App by MyNode SDK (clearnet.json)

  • App metadata defined for MyNode UI and SDK
  • App tile and homepage visibility enabled
  • Custom app page with instructions for:
  • DNS setup
  • Router configuration
  • Certificate management
  • UI button links to /app/clearnet/info
  • App marked as uninstallable and reinstallable
  • SDK version: 2, app type: custom

🧩 TODOs for Full Certbot Integration & UI

🔐 Certificate Automation

  • Add certbot command to request initial certificate: bash certbot --nginx --extend -d node. --non-interactive --agree-tos --email <admin_email>
  • Validate domain and hosts DNS resolution and uses port http 18080 forwarding with ngnix
  • certbot has systemd timer for renews
  • Add renewal hook to refresh symlinks or reload services
  • /etc/nginx/sites-enabled/https_public.conf must be placed to after certs are applied / install run
  • /etc/nginx/sites-enabled/https_public.conf must be removed and nginx restarted before uninstall

🖥️ MyNode Community App UI

  • Create clearnet.service for UI launch/status
  • Build web UI to:
  • Display current domain and cert status
  • Trigger cert renewal manually
  • Show logs and backup status

(*) source bolt.fun)

About

Clearnet Support by adding FQDN and HTTPS

Resources

Stars

Watchers

Forks

Packages

No packages published