Add ability to build the server for Windows and run it as a service#1328
Add ability to build the server for Windows and run it as a service#1328wtf911 wants to merge 3 commits into
Conversation
|
Closes #1104 |
Example service creation command: sc.exe create ntfy start= auto binPath= "YOURPATH\ntfy.exe serve" To use a server.yml file you would create the service like this: sc.exe create ntfy start= auto binPath= "YOURPATH\ntfy.exe serve --config YOURPATH\server.yml"
|
Example service creation command: sc.exe create ntfy start= auto binPath= "YOURPATH\ntfy.exe serve" To use a server.yml file you would create the service like this: sc.exe create ntfy start= auto binPath= "YOURPATH\ntfy.exe serve --config YOURPATH\server.yml" |
|
I really don't want to support ntfy server on Windows. It may build, but it will likely not work for all the things. And I have no time to test it. So while this is pretty cool that it works, I must respectfully decline the PR. |
|
Does it make a difference that I've been successfully running it 24/7 as a Windows service using a lot of the features without any issue? I'm using a reverse-proxy so it has HTTPS and I have webpush working great to the PWA on Android. Here's my active server.yml so we know that at least these settings are functional: base-url: "https://ntfy.xxx.ddnsfree.com" It created all the needed files no problem and runs no problem. I point to the server.yml file by using the --config option. I made the pull request so that the build code mirrors your current code and just the resulting ntfy.exe would include the added server functionality so it wouldn't be any additional work on your end to include it in releases. |
|
I think that does make a difference;-) I'll just add a disclaimer saying that idk if it's gonna work, and redirect all issues to you hehe |
|
Can you try to add the Windows CI pipelines, and add it to the docs? That'd help |
I'm sorry, my coding isn't at the level of even knowing where to begin to add that I don't think, but if there's anything else I can do to help this get approved and open up people on Windows being able to run the server please let me know. :) From a build perspective, the only other thing that needs to be installed on Linux for compiling it is: apt install gcc-mingw-w64-x86-64 That's the only difference. I compiled it from Linux using your standard Linux build environment that you build all of the other versions from. |
Honestly, I don't think I want to support Windows at this time. Thank you for your contribution, but if there is nobody that can maintain things or even help out, I'd rather not open that box. |
|
Nice work here! Even though I’m not much of a Windows fan myself, I’ve looked through this PR and @wtf911 contributions, and I think their effort deserves to be preserved rather than lost. If the main issue preventing progress is getting the Windows build to work properly in CI, I’m willing to dedicate some time to help make that happen. I understand that @binwiederhier isn’t keen on maintaining Windows support directly, but if @wtf911 is open to taking responsibility of that part, I’d be happy to contribute on the CI and build setup side — just not ongoing maintenance of the Windows-specific components. In short, I’d like to help recover and build upon @wtf911 work so that Windows users can benefit from it without adding extra maintenance burden to the core team. |
|
@amir1376irani that's very kind of you. Getting ntfy to work for Windows when I'm not a soft developer was a passion project for myself and I too hoped it would open up ntfy to the many people that aren't going to run any software if there isn't a Windows option available. I'm still here and still using my Windows version of ntfy that's been running 24/7 without issue. |
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [binwiederhier/ntfy](https://ntfy.sh/) ([source](https://github.com/binwiederhier/ntfy)) | minor | `v2.15.0` → `v2.16.0` | --- >⚠️ **Warning** > > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>binwiederhier/ntfy (binwiederhier/ntfy)</summary> ### [`v2.16.0`](https://github.com/binwiederhier/ntfy/releases/tag/v2.16.0) [Compare Source](binwiederhier/ntfy@v2.15.0...v2.16.0) This release adds support for [updating and deleting notifications](https://docs.ntfy.sh/publish/#updating-deleting-notifications), [heartbeat-style / dead man's switch notifications](https://docs.ntfy.sh/publish/#scheduled-delivery), [custom Twilio call format](https://docs.ntfy.sh/config/#phone-calls), and makes `ntfy serve` work on Windows. It also adds a "New version available" banner to the web app. This one is very exciting, as it brings a lot of highly requested features to ntfy. **Features:** - Support for [updating and deleting notifications](https://docs.ntfy.sh/publish/#updating-deleting-notifications) ([#​303](binwiederhier/ntfy#303), [#​1536](binwiederhier/ntfy#1536), [ntfy-android#151](binwiederhier/ntfy-android#151), thanks to [@​wunter8](https://github.com/wunter8) for the initial implementation) - Support for heartbeat-style / [dead man's switch](https://en.wikipedia.org/wiki/Dead_man%27s_switch) notifications aka [updating and deleting scheduled notifications](https://docs.ntfy.sh/publish/#scheduled-delivery) ([#​1556](binwiederhier/ntfy#1556), [#​1142](binwiederhier/ntfy#1142), [#​954](binwiederhier/ntfy#954), thanks to [@​GamerGirlandCo](https://github.com/GamerGirlandCo) for the initial implementation) - Configure [custom Twilio call format](https://docs.ntfy.sh/config/#phone-calls) for phone calls ([#​1289](binwiederhier/ntfy#1289), thanks to [@​mmichaa](https://github.com/mmichaa) for the initial implementation) - `ntfy serve` now works on Windows, including support for running it as a Windows service ([#​1104](binwiederhier/ntfy#1104), [#​1552](binwiederhier/ntfy#1552), originally [#​1328](binwiederhier/ntfy#1328), thanks to [@​wtf911](https://github.com/wtf911)) - Web app: "New version available" banner ([#​1554](binwiederhier/ntfy#1554)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi42OS4yIiwidXBkYXRlZEluVmVyIjoiNDIuNjkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW1hZ2UiXX0=--> Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/3334 Co-authored-by: Renovate Bot <renovate-bot@alexlebens.net> Co-committed-by: Renovate Bot <renovate-bot@alexlebens.net>
No description provided.