In-house remote server

Apologies if this is documented or has been asked before, I didn’t find it.

What would it take to set up an in-house / on-prem server which can be used with “pio remote” and “pio account” features?

To explain a bit more, ideally I would have a setup on prem where I can disconnect the whole local network from the internet and still have “pio remote run” work as before (uploading to devices that are physically far away but on the same network).

1 Like

I don’t think PIO remote is laid out for your Peer-to-peer and no-internet usecase. PIO Agents (aka server) and PIO clients (aka the one running pio remote run to execute a command on a remote machine) communicate via the PIO cloud, or more precisely, via remote.platformio.org as a middle-man broker. Also refer to the technology diagram. That’s also the main point why it works ‘out-of-the-box’ without port forwarding or other shenanigans between the agent and the client – just a connection to a public broker is needed.

So, with no internet access, you cannot connect to the serves for account managing and remote agent managing. If you allow these services however, you have a standard PIO remote use case. The agent is started on your server / PC where the devices are physically connected to, and clients can connect from everywhere given they use the same PIO account.

I’m not sure if you can just duplicate the needed services (https://api.accounts.platformio.org, remote.platformio.org) on your own private server instance and change the PIO code to use your URLs instead – @ivankravets, would that be possible, is that part open source?

2 Likes

@maxgerhardt thank you for the clarification! I was thinking exactly that, running the cloud services on a private server.

1 Like

Is there another place where it would be better to ask this question?

As far as I’m concerned @ivankravets can answer this, though I don’t know if there are colliding business interests by opening these specific services.

2 Likes

Currently, there is no option to do this. We will think on how to make it real.

2 Likes

Thank you for the reply. I believe this would be benefitial in two main cases:

  1. Projects where reliability and/or confidentiality is important, i.e. it needs to be under in-house control. This is more often than not a business requirement, rather than a real / technical one. For example, to investors it often sounds risky when a business depends on a unique service that is hard to replace.
  2. Projects that have poor internet connectivity (e.g. remote mining operations).

And of course, open sourcing this part of the PIO infrastructure enables the community to contribute to it. I would be thrilled to see this part open sourced as well.

In any case, thank you very much for such a great product! It’s awesome to see it open sourced to the degree it already is.

1 Like

I just opened an issue on github, see Remote Development without PIO account · Issue #3689 · platformio/platformio-core · GitHub

1 Like