syncwatch icon indicating copy to clipboard operation
syncwatch copied to clipboard

Self hosting configuration

Open mayankwadhwani opened this issue 3 years ago • 1 comments

Hi - can you provide the heroku configuration used to run the server ? Further if we wish to run this on local LAN - will there be any change required in the server js ?

mayankwadhwani avatar Oct 13 '22 06:10 mayankwadhwani

Hi. In Heroku I have config var HEROKU=true, it enabels pinging server itself (so server will not sleep if its free dyno) , but address hardcoded here https://github.com/Semro/syncwatch/blob/2aa16e42a5bbda122dbfdf1bb133da709aea442e/server.js#L53, so you might change it, or better to pull it out in environment variable as well. To run server locally, executing command npm run start should be enough.

Semro avatar Oct 13 '22 06:10 Semro

Hi Semro. I hope you are doing good. so, you're saying that I can self host it on a rpi ? i can provide the IP address here ? If not, what is the source code running at "http://syncevent.herokuapp.com". Further, what changes in extension would be required to connect to the self hosted server?

mayankwadhwani avatar Oct 26 '22 17:10 mayankwadhwani

Yes, you can self-host it. Open extension options, put URL in it and save it. After that it should connect to your server. image

Semro avatar Oct 31 '22 19:10 Semro

Read through the code. Verified the wakeserver actually works when working on heroku. I am running the server on a raspberry pi - running on IP 192.168.29.101 and the server runs at port 8080 . I entered http://192.168.29.101:8080, http://192.168.29.101 in the extension - but always get connection errors. Any suggestions on this @Semro ?

mayankwadhwani avatar Nov 02 '22 17:11 mayankwadhwani

Could you try opening http://192.168.29.101:8080/ in the browser? It should output Cannot GET / that means you reach the server.

Semro avatar Nov 02 '22 18:11 Semro

@Semro - Yes - I am able to open the url in the browser. but the extension is not able to connect to the server. It says connection error.

mayankwadhwani avatar Nov 02 '22 19:11 mayankwadhwani

Screenshot from 2022-11-03 00-57-01

mayankwadhwani avatar Nov 02 '22 19:11 mayankwadhwani

Disabling and re-enabling the extension made it work. Thanks @Semro for the help here on selfhosting config.

mayankwadhwani avatar Nov 02 '22 19:11 mayankwadhwani