How do I setup a public DNF repository?

So I found a couple guides on redhat.com for creating local repositories, see here: https://www.redhat.com/sysadmin/apache-yum-dnf-repo and https://www.redhat.com/sysadmin/ftp-yum-dnf-repository. However, these appear to be very limited in scope.

The guides suggest using Apache or FTP, however I’m not sure how to choose which one, I will only be able to afford a VPS with limited resources, so power and resource efficiency is a high priority. I’m almost completely unfamiliar with FTP aside from a very basic understanding of it so please bare with me here. I just want to be able to host packages and group caches(I believe that’s all I need it to do), and I believe it should be possible to filter packages by the version of Fedora in .repo files with FTP just by placing them in different folders if I understand correctly, is this true? Is it only possible with FTP? Would httpd or lighttpd lack any of the necessary features required to do all of this?

How can I also setup group caches? I see RPMFusion does this quite neatly but I’m clueless on how to recreate it.

And finally, when I still had my website up I used sshfs to move files around, but does anyone have any different recommendations on how to upload packages?

If you setup your own hosting then use https to access the repo.
FTP is not secure and not a good choice.

If you are hosting open source RPMs you could use copr.
See here https://copr.fedorainfracloud.org/

It might help to know what purpose you have in mind for the repository. Are you looking to be a mirror for Fedora? Or looking for a way to minimize internet bandwidth consumption by sharing a repository across multiple fedora instances?

I use Fedora on a workstation and across multiple VMs, Raspberry Pi devices and for containers. I use the DNF Local plugin to manage a local shared rpm cache (using NFS between machines). This is not full fledged repository but might be suitable depending on need.

best regards

Thank you for this. What about FTPS? From what I can gather it appears to use SSL just like HTTPS. Is there something I’m missing, anything other than SSL that would make FTP less secure than HTTP(S)?

I have considered using COPR, but for 1 I want to host both free and non-free packages and 2 I told myself if I was going to use COPR, I might as well try to get the packages directly into the Fedora or RPMFusion repos.

I want a public repository that just hosts some packages not in the Fedora or RPMFusion repositories. I have considered mirroring RPMFusion, to minimize the amount of repositories necessary for anyone who wants to use my repo, however that’s on the slightly more ambitious side of things so it’s second priority.

Thanks. As @barryascott notes, use httpd as the front end. This is what is expected these days. There are a number of reasonable posts around on ‘setting up a yum repository’ (e.g. How to Setup Local Yum Repository on CentOS 7 {Easy Tutorial} - although in this case the author is mirroring centos which is a step not needed in your use case).

Apache or nginx or other httpd server are all viable. You will also need to get and maintain a TLS cert and a domain name.

Thank you for the Phoenix article, it appears to be more of what I’m looking for than the RH docs I dug up, quite rare. Anyways, I’m already pretty familiar with lighttpd and Let’s Encrypt so this is good news, shouldn’t be as difficult as I originally assumed. The hard part is going to be to secure the funds to buy the Domain and VPS, easy enough though, just might take some time.