@petrescatraian@libranet.de to add on to this, you can also use apt_auth.conf (man doc) to define the passwords for accessing your stuff. The repo has to be behind HTTP basic auth.
So, the steps are:
- Follow @vimium@programming.dev's post to setup a repo
- Put the repo behind HTTP basic auth (NGINX has a guide on how to set that up)
- Setup HTTPS for the server (https://letsencrypt.org/docs/)
- Create
apt_auth.confwith the username and password