# Sysupgrade via URL

**URL:** <https://forum.openwrt.org/t/sysupgrade-via-url/8908>\
**Category:** Installing and Using OpenWrt\
**Created:** [November 21, 2017, 2:54pm UTC](https://forum.openwrt.org/t/sysupgrade-via-url/8908 "2017-11-21T14:54:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![starfry](https://forum.openwrt.org/letter_avatar/starfry/32/5_5575768a8748004e209b776fc1b2916d.png) [@starfry](https://forum.openwrt.org/u/starfry)\
**Post date:** [November 21, 2017, 2:54pm UTC](https://forum.openwrt.org/t/sysupgrade-via-url/8908/1 "2017-11-21T14:54:29Z")

</div>

I have the verified sysupgrade file for 17.01.4 on my PC and am serving it over http. I tried to update my router but it didn't work...

```
root@wap1:~# sysupgrade -v http://mydesktop:8000/lede-17.01.4-lantiq-xrx200-BTHOMEHUBV5A-squashfs-sysupgrade.bin
Image metadata not found
Use sysupgrade -F to override this check when downgrading or flashing to vendor firmware
Image check 'fwtool_check_image' failed.

```

So I tried downloading to the router `/tmp` directory and then upgrading. That worked.

So I wanted to ask why `sysupgrade` with a URL does not work. Should I use `-F` (which I understand is dangerous) ?

---

<div class="post-metadata">

**Author:** ![lleachii](https://forum.openwrt.org/letter_avatar/lleachii/32/5_5575768a8748004e209b776fc1b2916d.png) [@lleachii](https://forum.openwrt.org/u/lleachii)\
**Post date:** [November 21, 2017, 3:12pm UTC](https://forum.openwrt.org/t/sysupgrade-via-url/8908/2 "2017-11-21T15:12:44Z")

</div>

> [@starfry](#):
>
> I have the verified sysupgrade file for 17.01.4 on my PC and am serving it over http. I tried to update my router but it didn’t work…

Of course not. The instructions don't describe that.

See: [https://wiki.openwrt.org/doc/howto/generic.sysupgrade](https://wiki.openwrt.org/doc/howto/generic.sysupgrade)

> [@starfry](#):
>
> So I tried downloading to the router /tmp directory and then upgrading. That worked.

The instructions direct you to download the file to /tmp folder of the system. It should work.

> [@starfry](#):
>
> So I wanted to ask why sysupgrade with a URL does not work.

I surmise because the sysupgrade software does not have such feature coded. Perhaps you should make a **Feature Request** at: [http://bugs.lede-project.org/](http://bugs.lede-project.org/)

---

<div class="post-metadata">

**Author:** ![starfry](https://forum.openwrt.org/letter_avatar/starfry/32/5_5575768a8748004e209b776fc1b2916d.png) [@starfry](https://forum.openwrt.org/u/starfry)\
**Post date:** [November 21, 2017, 3:23pm UTC](https://forum.openwrt.org/t/sysupgrade-via-url/8908/3 "2017-11-21T15:23:28Z")

</div>

I am pretty sure I used a URL to sysupgrade from a nightly to a stable of 17.01.2. I have it in my notes like that, and it wasn't that long ago, around September. But of course I may be wrong.

Also `sysupgrade -h` says

```
Usage: /sbin/sysupgrade [<upgrade-option>...] <image file or URL>

```

which would indicate that `URL` is a valid argument...

If it doesn't work that way then fair enough - a `wget` prior to `sysupgrade` is ok.

---

<div class="post-metadata">

**Author:** ![lleachii](https://forum.openwrt.org/letter_avatar/lleachii/32/5_5575768a8748004e209b776fc1b2916d.png) [@lleachii](https://forum.openwrt.org/u/lleachii)\
**Post date:** [November 21, 2017, 3:33pm UTC](https://forum.openwrt.org/t/sysupgrade-via-url/8908/4 "2017-11-21T15:33:59Z")

</div>

> [@starfry](#):
>
> Also sysupgrade -h says
> 
> Usage: /sbin/sysupgrade [\<upgrade-option\>...] \<image file or URL\>
> 
> which would indicate that URL is a valid argument…

Interesting...

It also says:

```
-f <config> restore configuration from .tar.gz (file or url)

```

Perhaps, this is only valid for a config file???

I'm not certain. In any case, I could surmise a lot going wrong with an unattended firmware upgrade from over the network; but it's possible to code. Perhaps making a feature or bug request might get a clearer answer for you.

The developers may also see this thread and chime in.

---

<div class="post-metadata">

**Author:** ![jow](https://forum.openwrt.org/user_avatar/forum.openwrt.org/jow/32/13_2.png) [@jow](https://forum.openwrt.org/u/jow)\
**Post date:** [November 23, 2017, 1:20pm UTC](https://forum.openwrt.org/t/sysupgrade-via-url/8908/5 "2017-11-23T13:20:28Z")

</div>

In the past there used to be the ability to sysupgrade from URLs directly but over time various features got added which require seeking back and forth over the file so the upgrade-from-URL possibility got broken along the way.

I think it might work in conjunction with `-f` to skip all thesafety checks but that is highly dangerous and will most likely just brick the device.

---

<div class="post-metadata">

**Author:** ![starfry](https://forum.openwrt.org/letter_avatar/starfry/32/5_5575768a8748004e209b776fc1b2916d.png) [@starfry](https://forum.openwrt.org/u/starfry)\
**Post date:** [November 23, 2017, 1:58pm UTC](https://forum.openwrt.org/t/sysupgrade-via-url/8908/6 "2017-11-23T13:58:00Z")

</div>

@jow if the URL is to a webserver on the LAN and the image has been verified (gpg and shasums) and has already been used successfully to upgrade another identical device (by copying to `/tmp`), would using `-F` stil be deemed dangerous and likely to brick ?

I ask becuase I have another device to upgrade which is identical to the first, already upgraded, device. I feel like `-F` ought to be ok given the above and was going to try it when I do the update - possibly today or over the next weekend.

But then I might as well just upload it to `/tmp` again.

What do you think?

---

<div class="post-metadata">

**Author:** ![jow](https://forum.openwrt.org/user_avatar/forum.openwrt.org/jow/32/13_2.png) [@jow](https://forum.openwrt.org/u/jow)\
**Post date:** [November 23, 2017, 2:10pm UTC](https://forum.openwrt.org/t/sysupgrade-via-url/8908/7 "2017-11-23T14:10:15Z")

</div>

I honestly can't tell offhand if would still work. I think you should stage the file in `/tmp` first to avoid any problems.

---

<div class="post-metadata">

**Author:** ![starfry](https://forum.openwrt.org/letter_avatar/starfry/32/5_5575768a8748004e209b776fc1b2916d.png) [@starfry](https://forum.openwrt.org/u/starfry)\
**Post date:** [November 23, 2017, 2:30pm UTC](https://forum.openwrt.org/t/sysupgrade-via-url/8908/8 "2017-11-23T14:30:22Z")

</div>

I agree 🙂
