How to store a custom theme and update it on other installations

The easiest way to do this is the WP theme directory and the WP plugin directory respectively, but if you want to keep them private this may not be an option.

https://github.com/afragen/github-updater is a good alternative, you can configure it with a private key to update your own themes/plugins from a github repo.

If that’s not what you’re after then you’ll have to look at hosting the theme files and using your own update scripts, which is a fair bit more complex.