Snap store proxy, snapdevicegw port change

I followed the instructions and everything works ok except that, ‘snap-proxy status’ returns 400 error from "http://127.0.0.1:8000/_status/check’. I discovered that port 8000 was occupied by squid on the same host. So I changed the snapdevicegw config from /var/snap to use port 9000, snap.snap-store-proxy.snapdevicegw started ok, return no error, the service is now at port 9000, but ‘snap-proxy status’ still access port 8000 and return the same 400 error. I think all others are ok as far as I understand it, besides my registration approval is still pending, hope it’s going through soon. So I was wondering am i still missing something? Please help me, thanks!

Hi there!

You should not change files in the snap directly.

It might be possible to change this port if it’s possible to change an env var for an installed snap - maybe in your system /etc/environment, for the variable SNAPDEVICEGW_PORT.

That said, please be aware that we don’t test or officially support changing ports for specific services within the store proxy. My recommendation would be to either change your squid’s configuration so it uses a different port (why not the standard 3128?), or if not possible, install the snap-store-proxy on a different machine where the required ports are available.

  • Daniel
1 Like

Hi Daniel

Thank you very much for the tips! Yes, I realized it’s troublesome changing ports, maas is using squid as cache I guess (without much digging, or afraid of breaking it…). Yes, to make it simple, I just started a new host solely for snap store proxy, every thing seems ok, but I had to register again with the same email address, hope it’ll go through; I got approved yesterday with the email address but on a different host (hosting maas controller), that store is not function anyway. Also, I realized I had to use domain name (not ip) for proxy.domain config. Anyways, thanks again for your reply Shawn