Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Keygen SDK for licensing and distributing self-updating Go apps (go.dev)
1 point by ezekg on Oct 14, 2021 | hide | past | favorite | 3 comments



It's been nice to get back into Go after mainly working in Ruby the past couple years! I'm the founder of Keygen ^1. After I recently learned that Equinox ^2 shut down last month (sadface, I was a fan), I wanted to try and see if Keygen could fill that void for distributing self-updating Go apps. I still have lots to do, but I wanted to get v1 of the SDK out ASAP and start getting feedback. Functionality-wise, it includes a limited API that trys to enforce a single "blessed" way of performing popular on-prem licensing workflows, such as activation and hearbeat monitoring.

I'm currently working on finishing up a CLI similar to `equinox` for publishing releases (to make publishing super easy + for CI/CD integration), as well as for signing releases using Ed25519. The SDK will then verify upgrade checksums and signatures, similar to how Equinox used to work. (The SDK is actually using inconshreveable/go-update under the hood to apply updates.)

I also plan to eventually support non-licensed/non-commercial artifacts, so for example, open source projects could offer self-updating binaries without having to distribute license keys to enable auto-updates. If I can get more serious interest on that front, I'll prioritize that more.

Let me know if you have any thoughts!

^1: https://keygen.sh/for-go-programs/

^2: https://equinox.io

Edit: I accidentally submitted the wrong URL, my mistake but can't go back now. I meant to submit the GitHub repo:

https://github.com/keygen-sh/keygen-go


How does the upgrade process work?

One challenge I remember from when I was working on Windows desktop software was the challenge of maintaining version numbers and working with WiX installers to manipulate the Windows MSI database. Most software I've used over the years handles this very poorly but there are some exceptions. I think the best example that comes to mind is the WireGuard Windows client.


It utilizes https://github.com/inconshreveable/go-update, which updates itself by replacing its executable file with the new version downloaded from Keygen's API (which handles checking if an upgrade is available). The new version will then be available after a restart of the executable.

Since Go apps are distributed as a single binary file, it makes it pretty painless to update them compared to e.g. a typical desktop app.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: