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)
- 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!
- 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
- 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
- All actions logged with [INFO], [SKIP], or [ERROR]
- Aborts on unexpected conditions to prevent data loss
- Assumes root execution, avoids sudo
- 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
🔐 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
- 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)
