0

Some data is generated each 10 min on my 24h/24 running PC. I want to find a way for my website to get this data. The data in question is only 10 lines of text.

I know I can host a linux instance to do so but I have a spare computer to use. And I want it to be free.
My first thought was to implement an API on the computer, but there is a security risk.
My second thought is to post the data to pastebin. Then read and get the data from my website.

What is the best solution to implement this logic ?

3
  • 1
    How about reversing this and having your computer post the data to your website instead? Would get rid of pesky NAT issues at the same time.
    – r_ahlskog
    Jul 13, 2020 at 8:30
  • @r_ahlskog Smart. So do you suggest I make a POST request from my PC to an endpoint in my website backend ?
    – Ali Lewis
    Jul 13, 2020 at 8:50
  • Dropbox or any other cloud backup solution?
    – Mokubai
    Jul 13, 2020 at 9:18

1 Answer 1

3

For this I would turn it around so that I have my PC do a POST to my website. Doing that makes it easier by letting you manage several problems by not having them to begin with.

  • Your website has a fixed address while home PC is probably assigned address by DHCP
  • Avoids issues with NAT, either your own or fatally CG-NAT imposed by ISP
  • Avoids getting half done data by letting the PC POST when it is ready.

Of course this requires that you can add such a thing to your website, which would basically be an endpoint. I would also stick TLS and authentication on it since Let's Encrypt is free and it would fix the problem with bots finding and posting random garbage for you.

1
  • This is clear. I'll do that. Thank you @r_ahlskog
    – Ali Lewis
    Jul 13, 2020 at 9:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .