Hello,
Following the directions on Creating a Local AREDN® Software Server, I set one up on a Linux machine connected to of our nodes a week ago, and wrote a script for my team and I to keep them updated in each region. However, I quickly noticed that even though nightly builds were being provided, the software server was not showing them. Eventually, I discovered that the afs/misc/collect.py script that updates the JSON targets was also removing the new versions from afs/www/config.js that were just synced over. As a result, we are permanently stuck with offering whichever versions that were originally downloaded on the original sync. You can, however, manually navigate the tree to download the file you want, but I am certain the python script was not intended to make changes to the config.js. As a work around, I make a backup copy of the config.js before running the python script and restore it after the script completes. This has fixed (or band-aid) the issue for now. Deleting the entire root directory and starting fresh also works,
.
Thanks for you help!
Tony
Following the directions on Creating a Local AREDN® Software Server, I set one up on a Linux machine connected to of our nodes a week ago, and wrote a script for my team and I to keep them updated in each region. However, I quickly noticed that even though nightly builds were being provided, the software server was not showing them. Eventually, I discovered that the afs/misc/collect.py script that updates the JSON targets was also removing the new versions from afs/www/config.js that were just synced over. As a result, we are permanently stuck with offering whichever versions that were originally downloaded on the original sync. You can, however, manually navigate the tree to download the file you want, but I am certain the python script was not intended to make changes to the config.js. As a work around, I make a backup copy of the config.js before running the python script and restore it after the script completes. This has fixed (or band-aid) the issue for now. Deleting the entire root directory and starting fresh also works,

Thanks for you help!
Tony
## Description
The `collect.py` script overwrites the `versions` object in `config.js` during firmware synchronization, breaking custom configurations for local firmware servers.
## Steps to Reproduce
1. Set up local firmware server using rsync to mirror AREDN downloads
2. Customize `config.js` with local `image_url`
3. Run `collect.py` to update firmware database
4. Observe that `versions` object is rebuilt, losing new versions
## Expected Behavior
`collect.py` should preserve existing `config.js` content, and push the `image_url` setting to the JSON files.
## Actual Behavior
`collect.py` pushes the `image_url` through out all the models JSON files, but also breaks the `versions` object, overwriting the just added new versions. I will spend more time troubleshooting as soon as I have time, but guessing it is searching and modifying *.JS* files instead of *.JSON files. Not sure
## Environment
- AREDN firmware version: 3.25.8.0+
## Workaround
Currently using a post-sync script to restore custom `image_url` after `collect.py` runs by backing up and then restoring the `config.js`
My ( self modified from AREDN published ) script seems to work well.
The 'stable' and 'latest nightly' appear in the dropdown box when updating firmware on a node.
It runs on a Raspberry Pi using a spinning HD for '/'.
Salt to taste.
73, Chuck
#!/bin/bash
date > 0
echo "With Spectrum cable this took 7 minites 33 seconds."
echo "With AltaFiber this takes 3 minutes 03 seconds."
echo "With babel_only, now 5 minutes 53 seconds."
echo "2025-07-14: Addded bandwidth limit, 2 MB/sec, time now 18 minutes, 37 seconds."
cd /var/www/html/
nice -n 19 /usr/bin/rsync -z --bwlimit=2m -rv --delete --size-only downloads.arednmesh.org::aredn_firmware /var/www/html/arednSoftware/
nice -n 19 wget -O /var/www/html/arednSoftware/afs/www/config.js http://downloads.arednmesh.org/afs/www/config.js
nice -n 19 cat /var/www/html/arednSoftware/afs/www/config.js
cd ~
cat 0
date
I can clearly see collect.py modifying config.js. The new nightly versions that are listed in the config.js after the sync are removed when running collect.py. I am able to reproduce this 100% of the time. So I started making a backup of the config.js before running collect.py, then restoring on completion, a band-aid for now. Config.js appears in the list of JS* files collect.py modifies, last file in the list, though I cannot figure out why it needs to even touch the file. All commands are ran from the root sync folder.
That script I created works around the issue, but it seems very odd that you have not had the same issue. I have tested it on 4 of our fanless PC's and am able to reproduced it. Perhaps I should send a screen recording.
If you dig deeper, you will find that the overview.json image url's are not getting updated either. You can tell because the nodes will still pull from the main server and not the mirror. That doesn't help me because some of my nodes are not able to reach the internet without turning on Mesh to WAN.
This one does the usual rsync, config.js replacement and backup, runs collect.py, restores the config.js as usual. Then, it overwrites all the image urls in the json files, reverts the hardcoded http to https forced upgrades back to http, and then writes a basic index.html page for the root directory.