I have thought about doing this with gitlab. honestly, I was just going to stand up a free instance on AWS and have my local repos sync to the public one.
no problems then.
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
No spam posting.
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
No trolling.
No low-effort posts. This is subjective and will largely be determined by the community member reports.
Resources:
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
I have thought about doing this with gitlab. honestly, I was just going to stand up a free instance on AWS and have my local repos sync to the public one.
no problems then.
It's been a while since I set up my runner, and I have it on my personal desktop (which is wayyyyyy beefier than the VPS I host my forgejo instance on), but I'm pretty sure I was able to specify that only my user account can trigger actions to be run on this runner. What I'm getting at is that there is a decent amount of granularity for forgejo action permissions; you should be able to find a balance that suits you between "no actions at all" and "anyone can run any code they desire on your server".
I run it in a rootless Podman container using Quadlets. Instead of opening the server's ssh port, I only port-forward the container's ssh port (e.g. 22 -> 2222). I have sign-ups enabled, since I want people to be able to contribute (or just create issues). But I have configured the server so that nobody can create a repository. They can still fork my repos and send a pull request.
I have yet to experiment with Actions. I assume the safest option would be to only enable it for my own commits, but I am not sure.
Lots of good answers already. Just want to add.
Block IP from every country that doesn't have your users in it. That will go a long way.
Yes, Check Anubis, scraper bots follow every link they find and especially git forges basically have infinite links (every single commit and comparison between every single commit and every other).
I haven't thought it through but there may be some implications on opening port 22 for git via ssh.
Someone posted about git/scrapers here, pretty good read: https://vulpinecitrus.info/blog/guarding-git-forge-ai-scrapers/?ref=selfh.st
If it's just you, and you're fine with the regular login... Just disable signup and don't add more authentication mechanisms like oauth/openID.
I'm using nginx as a reverse proxy as well. For now, I added a lot of "deny" directives to ban all the address ranges from Tencent, Alibaba, OpenAI. It's not a 100% solution, but works well enough for me. I'm mostly worried about AI crawlers causing too much load on my server. And it stopped since, so I don't think I'm gonna need Anubis and all these extra things in front if my applications. If you like you can look into solutions like a web application firewall like Crowdsec.
I run a forgejo server on the internet for myself so here's my two cents.
OpenID or any other log in method is just a way to log in to an account on the forgejo server. With registrations disabled it shouldn't be able to create an account, so there should be no issue. All the extra auth methods also need to be configured and are disabled by default.
Bot traffic can be pretty horrendous once they find your server, I'd say Anubis is basically a requirement at this point. I would also strongly recommend setting up fail2ban for http and ssh, and disabling ssh password auth.
Ah I see, I kinda assumed that OpenID would allow anyone with an OpenID server to just log in. That seemed like it would cause immediate spam issues. It would definitely be nice if I could allow users to create issues or stuff like that at some point. I will definitely have to take a look at fail2ban before I make it available. Thank you.
No OpenID is configured against your OpenID server
You can use Forgejo with OIDC or normal login behind a reverse proxy. If you want to make a repo public, you need to add this to your App.ini under the [service] section: REQUIRE_SIGNIN_VIEW = false
Example:
[service]
REGISTER_EMAIL_CONFIRM = true
ENABLE_INTERNAL_SIGNIN = false
ENABLE_NOTIFY_MAIL = true
DISABLE_REGISTRATION = false
ALLOW_ONLY_EXTERNAL_REGISTRATION = true
ENABLE_CAPTCHA = false
REQUIRE_SIGNIN_VIEW = true
DEFAULT_KEEP_EMAIL_PRIVATE = false
DEFAULT_ALLOW_CREATE_ORGANIZATION = true
DEFAULT_ENABLE_TIMETRACKING = true
NO_REPLY_ADDRESS = noreply.localhost
REQUIRE_SIGNIN_VIEW = false
Then you can create a public repo which people can view without an account. You can change visibilty at any time
Yes, this has been configured already, thanks for the suggestion.
I definitely want to use forgejo actions, but I am mainly worried about random people being able to execute any code on them. Preferably only approved users can do that.
Do you need to host it yourself? Codeberg is free, and they handle these concerns for you.
But yes, you will need to secure it against hackers and scrapers. Keep user permissions to a minimum, if you allow people to create accounts at all. And run it in a dmz network, so that in case it's compromised they can't access the rest of your LAN.
I don’t need to, but I want to :D
Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:
| Fewer Letters | More Letters |
|---|---|
| Git | Popular version control system, primarily for code |
| HTTP | Hypertext Transfer Protocol, the Web |
| IP | Internet Protocol |
| VPS | Virtual Private Server (opposed to shared hosting) |
| nginx | Popular HTTP server |
4 acronyms in this thread; the most compressed thread commented on today has 5 acronyms.
[Thread #195 for this comm, first seen 28th Mar 2026, 14:10] [FAQ] [Full list] [Contact] [Source code]