Salta al contenuto principale


Time to discuss self-hosted alternatives to GitHub!

First, has anyone simply put a bare git repo on a server somewhere, pushed via SSH, and called it a day?

idiomdrottning.org/hosting-git…

Do you really need more than a remote to push to and pull from, for your personal projects? If you've tried this, what obstacles did you encounter and what features did you miss?

#GiveUpGitHub #SelfHosting #git #SSH #BareRepos

Questa voce è stata modificata (4 mesi fa)

reshared this

in reply to gary

@gary @Nelson gitlab is also very much not compatible with being a lazy self-hoster, since it is not in Debian and has frequent significant updates
in reply to Elena ``of Valhalla''

self hosters are almost the opposite of lazy first of all and so what if it is not 'in' deban - these arguments are weak and lack real evidence - it is anecdotal #cvs #gitlab
Questa voce è stata modificata (4 mesi fa)
in reply to gary

@gary_alderson @valhalla I'm a lazy self-hoster. If it's packaged in Debian, it's trivial to self-host: install it on my server, maybe configure it a bit, done forever (or at least until my server release goes out of LTS). Installing from upstream is, in the typical case, several orders of magnitude more work: I need to install it without messing up anything else, figure out how to track security updates, and any given update is criminally likely to force a bunch of reconfiguration.
in reply to Will

@Will @gary @Nelson exactly this: there is some software that is in Debian but requires more complex maintenance, just being in Debian is not sufficient.

But I'd call self-hosting something that requires a weekend to setup, 10 minutes or so now and then to apply system security updates (or even less, if using unattended upgrades), and then maybe a day every two years when Debian releases a new stable pretty compatible with being lazy.

in reply to Elena ``of Valhalla''

@valhalla @gary_alderson Gitlab with docker (docker-compose checked into it’s own repo) + renovatebot is okay-ish, since at least you don’t have to check for updates yourself. Been using this setup for a couple of years at work. A side from having to subscribe to the breaking changes RSS, it’s mostly smooth sailing. Still overkill if you don’t need the features.
in reply to schrotthaufen

@schrotthaufen @gary @Nelson at work we use gitlab from the upstream deb packages, and those also have the advantage that you don't have to check for updates yourself.

most of the time upgrading works fine, but it's still a lot of upgrades at pretty inconvenient times, with new features and potential changes, they take quite long (it's not uncommon to have maybe 20 minutes of downtime, which is not a big deal for us, but also means that the sysadmin (luckily not me) needs to be keeping an eye on it for 20 minutes.

and them sometimes (rarely, but not never) it breaks, and one needs to fix stuff in a hurry.

in reply to Nelson

@Nelson I'm using gitolite, which is just a tiny bit more than a repo on a remote computer via ssh, and allows me to easily give ssh access to some of the repos to people who don't have ssh access to that machine. there is also cgit as a web interface. Everything is in Debian and compatible with my Laziness.

I'm using hooks to build some websites, and I suspect that with a bit of effort I could turn it into a more featureful CI system, if I needed it.

for very few repositories I miss having issue trackers, those are on sourcehut (which I'd like to self-host, but is pretty much not compatible with being Lazy and not enjoying sysadmin stuff)

in reply to Nelson

Next, have you tried a static site generator for browsing git repos? Here's a list of SSGs for git, sorted by latest commit (fresh to stale):

* reporat ratfactor.com/repos/reporat/
* git-arr blitiri.com.ar/p/git-arr/
* depp git.8pit.net/depp/
* itsy-gitsy git.trevorbentley.com/itsy-git…
* pgit pgit.pico.sh/
* stagit codemadness.org/git/stagit/fil…
* gituwa git.mcksp.com/gituwa/
* repo2html git.m455.casa/repo2html/

#GiveUpGitHub #git #SelfHosting #SSGs #StaticWebsites #StaticSiteGenerators

in reply to Nelson

@Nelson uh, that list seems quite interesting, I'll look into it!

(none of them seems to be in Debian, sadly, while cgit is and is quite set-up-and-forget, so I may not change, but they *are* interesting)

in reply to Elena ``of Valhalla''

Hmm, stagit is in AUR and Alpine (EDIT: and GNU Guix):

- aur.archlinux.org/packages/sta…
- pkgs.alpinelinux.org/package/v…
- packages.guix.gnu.org/packages…

But the rest don't really seem to be packaged anywhere. I wonder why not.

Questa voce è stata modificata (4 mesi fa)
in reply to Nelson

@Nelson my first, optimistic, assumption would be “because there are only so many hours in a day”

the pessimist alternative is that they are a mess of unpackageable javascript

but I'd have to at least open one of those links to know, and right now in my timezone it's bedtime :D

in reply to Elena ``of Valhalla''

@valhalla Languages they're written in:

* reporat / Ruby
* git-arr / Python
* depp / Go
* itsy-gitsy / Rust
* pgit / Go
* stagit / C
* gituwa / C
* repo2html / Chicken Scheme

in reply to Nelson

To avoid self-hosting a full-fledged code forge, you might want to simply store issues in the git repo itself. Have you tried using git-bug, git-issue, or some other decentralized bug tracker?

* github.com/git-bug/git-bug
* github.com/dspinellis/git-issu…

Last time I tried git-bug I failed to import my issues from GitHub and gave up, but maybe it works now, it seems there is a new & more active maintainer.

#GiveUpGitHub #git #BugTracking #issues #SelfHosting #GitBug

Questa voce è stata modificata (4 mesi fa)
in reply to Nelson

If you're worried about hosting anything on the open web because fucking crawlers for LLMs are overloading indie websites, maybe you'd rather browse your git repo via SSH:

github.com/charmbracelet/soft-…

Have you used Soft Serve? Are you aware of any similar projects for browsing git repos over SSH?

Big caveats:

* Charm (the company behind it) has taken VC funding, and therefore is probably doomed
* Last VC round was lead by "Gradient, Google’s AI-focused venture fund". They're all-in on AI bullshit

in reply to Nelson

I knew one could host a bare repo over SSH.
But I was blissfully unaware of SSGs for it and soft serve also looks incredibly interesting.

I‘m gonna have to test some things and maybe redo some stuff.

in reply to Nelson

Finally, if you really need a full code forge, with issue tracking and everything, what is the simplest, most light-weight code forge you can self-host?

Is it Forgejo? "Lightweight: Forgejo can easily be hosted on nearly every machine. Running on a Raspberry? Small cloud instance? No problem!" codeberg.org/forgejo/forgejo

That sounds great to me, but is Forgejo simple enough that I won't regret taking on the maintenance burden? Is there something even faster?

#GiveUpGitHub #git #SelfHosting

in reply to Nelson

Using Forgejo for few months and so far it proves to be a smooth ride: not perfect but light indeed and no maintenance burden.
Paired with Woodpecker for CI/CD instead of the native engine and its Github actions syntax.
in reply to jes!

@j3s I do not feel good about Bluesky / AT Proto, but maybe something like Tangled will be a killer app that forces me to get an account. Not yet, tho.

Basically I don't want to join any new services where I don't feel like I have agency/control, and I'm not convinced Bluesky gives meaningful power to the community/people.

@jes!
in reply to Nelson

There's a peer to peer git forge
radicle.xyz/

and they've got a website that can interact with the peer to peer backend that looks like a modern forge (here's the site showing the project's repositories)
app.radicle.xyz/nodes/seed.rad…

cgit or gitweb give views of git software and are packaged.

I know of a few attempts to try and turn email into issue trackers

There's the classic debian bugs
debian.org/Bugs/

Org-mode has a mail list viewer that can track bugs that is aesthetically pleasing to me.
tracker.orgmode.org/bugs

Or I've seen a few people try to use public-inbox.org/README.html to expose mailing list for their personal projects.

in reply to Diane

@alienghic I do not like the cryptocurrency adjacency of Radicle. I recognize that you can use Radicle without cryptocurrency, and I'm glad they kept it separate, but it seems like the people making it are invested in that world.
in reply to Nelson

for what it's worth, I've been hosting forgejo since it was gitea, and haven't regretted it yet. I'm running it on a pi4 alongside this instance and a bunch of other stuff. It's a single executable (and a single config file, I guess), and upgrading is just downloading the new executable and restarting the service.

The only downside has been, as you mentioned, that the llm crawlers found it at some point, so I ended up making all my repos private 🤷

in reply to Nelson

something I use for 10+ years and cannot be more happy about it.

fossil-scm.org

Not git based but this is one of the plus points 😉

Single executable, powers SQLite project, very very very stable... ❤️

Questa voce è stata modificata (4 mesi fa)
in reply to Nelson

I can only speak about my combination of @forgejo deployed via #colmena on @nixos_org and it's been absolutely hassle free from the moment I set it up.

Upgrades have all been hands off, etc.

I'm sure this experience is replicable on other tool sets.

in reply to Nelson

I used gogs many years ago when I shifted an employer onto git from svn. I’d probably just use git over ssh now, although nobody I work with now seems to understand anything other than git over http through a gui :froge:
in reply to Nelson

FWIW I use forgejo and have been for a couple of years now. It has been painless, but I do not back up the way I should so it is probably really more of a maintenance burden than I give it credit for.

Also FWIW I did not try any of your upthread suggestions and probably should have.

in reply to Nelson

A bare git repo is sometimes really the easiest.
It just works, has support for commit hooks...
in reply to Nelson

I have a buddy who has used soft-serve before as a mirror. Seems to work very well. Shame about Charm though, I thought for some reason that they were explicitly not venture backed
in reply to Nelson

i learned about soft serve years ago, but never thought about it as a response to those llm crawlers

really good idea

in reply to Nelson

ooh I wasn't aware of those. Nice!

But the "killer app" for github is workflows, at least for me.

in reply to Nelson

@Nelson may years ago I tried bugseverywhere (web.archive.org/web/2025012221… - yes, the website no longer works), in an easy case where I didn't have to import anything, but I've found that keeping the issue trackers in the same git repo as the project didn't work that well with branches and everything and decided it wasn't for me.

On the other hand, I'm using lesana (lesana.trueelena.org/ — disclaimer, I wrote it myself) as a project tracker, in its own repository, and that's working quite well for my needs.

For collaborative work there is still the issue that people need to use git to even submit a bug, which may or may not be a problem depending on the target of the project

in reply to Nelson

nice tools, for sure, thanks for the list. But:

"You can take care to avoid enshittification, you can even make a fetish out of it, but without addressing these systemic failings, your individual actions will only get you so far."

pluralistic.net/2025/07/31/uns…

in reply to Angelo Veltens 🏳️‍🌈

@angelo I agree. But how do we change the system, exactly? Existing institutions have failed us, and I say this as a member of DSA and a former organizer with Sunrise Movement, I've been arrested with them at their protests.

We need to organize, in new ways with new people. That means building community, which is becoming difficult in corporate properties where they are replacing human connection with "AI friends". Organizing outside these cognitohazards is increasingly necessary.

in reply to Nelson

@angelo When organizing virtually, I think we need safe places to gather before striking out into hostile online territories. Code forges are one aspect of this, and I don't intend to literally host this only for myself, it's part of a small community project. Here's our little manifesto:

blog.ungovernable.love/2025-02…

in reply to Nelson

Sounds great. Imho the important part is organising with others and building community infrastructure instead of an attitude of individualism that just urges everybody to self host or take the blame in using corporate systems
in reply to Angelo Veltens 🏳️‍🌈

@Angelo Veltens 🏳️‍🌈 @Nelson on the other hand, many of the tools and techniques discussed in this thread are great for hosting services for small, local communities
in reply to Nelson

do you mean something like Gitosis? I used it for a long time. It worked great.
in reply to Nelson

i use gitweb. i just use straight up git, no bells and whistles. i’ve gone between cgit and gitweb and stick to the latter because i can easily slap my own stylesheets to it.

i’ve tested gitlist as well but cannot remember why am not using it. i like Bootstrap, so can’t explain why am not using it.

my homelab is local at the moment. i have to reformat some old computers before i open a port to it.

anyways, it’s as plain vanilla as it gets. it’s my favorite ice cream.

in reply to Nelson

I was just wondering if just such a tool existed, and you’ve shared multiple. Thanks!
in reply to Nelson

oh hey thanks for the repo2html link! i helped write it 😁

i was running it for a while and it did everything i wanted, though admittedly that's less than what more complex forges do

it does have a big flaw: i did not know at the time that the cool ability to just plop a repo onto a static site* is no longer supported by libgit2 which tons of clients use

there's ways around, but haven't got back to it yet

* they call it "dumb" http protocol and i dislike the ableism

in reply to Nelson

So for the last almost two decades, I've had git repos online using gitweb ('apt install gitweb'). Very simple and easy; just a read-only interface to bare git repos. No maintenance needed.

Unfortunately in the past month I've had to take it down, as AI bots were hammering it and overloading my VPS. But it had a good run, and if you can block the fucking AI bots, gitweb would do the trick.

in reply to Nelson

I keep the source for my personal web site on just such a repo, complete with server-side hooks. It took a bit of jiggering to git directories set up properly etc, but it works just great.

Only big downside for me is no git-lfs, so I have so audio files in a rather hefty repo instead of in lfs as I’d prefer.

@emma_cogdev

in reply to Paul Cantrell

@inthehands This is supposedly one advantage of Soft Serve, which advertises "Git LFS support with both HTTP and SSH backends"
Unknown parent

Nelson
@BenCollver Yes, but Fossil requires me to learn a different version control system. Right now I'm only looking at git.
in reply to Nelson

I do this for my personal stuff. Remote hooks can even do some CI via simple shell scripts, so if a change I made causes deploy or unit test failures, the push is rejected.
in reply to Nelson

i think there’s a more basal question to ask here: do you even need a remote? the answer is “no” more frequently than we think it is, which was quite surprising to me when i first gave the question thought. a lot of things we fling onto github etc can perfectly be a private project, living offline on the disk until the concrete need to publish it presents itself. even for a collaborative thing a lot can be achieved w/o the need for a remote “VCS forge”
in reply to overhead projector apologist

@cadadr When literally working by myself, perhaps you're right that I don't need a remote, although pushing commits is a nice backup for my local repo (even if I had local backups I trusted, offsite backups are also important).

But what's your workflow for collaborating without remotes? Are you talking about the much-maligned email-based workflow, sending patches back and forth? I'm open to the idea that git via email doesn't have to suck, but I've never tried it.

in reply to Nelson

Yeah that works fine. Also gitweb if you need a web interface. Gitweb also produces pretty clean HTML so I wrote some PHP to generate a different front-end for it. I think the public gateway to all of that is down at the moment though...

...which is part of the reason why I use Codeberg a bit these days for stuff that needs to be more public than the server in my basement :)

in reply to Nelson

If you have shared website hosting that uses cPanel, your server might have Git support enabled. It's mainly intended for pushing website updates, but it might be possible to use it for other things (outside of your public_html folder).
in reply to Nelson

What about #gitolite? Been using it for years now, just SSH-access. Simple and rocksolid
Unknown parent

Nelson
@0x0 This thread is about self-hosting. I have a Codeberg account, but it seems to me that open source software doesn't mean much if you can't reproduce it, kinda like science.
@0x0
in reply to Nelson

I did exactly as you’re describing before unlimited private repos started popping up on the commercial git repos. I forget why I stopped. Probably ease of convenience and ease of collaboration should the opportunity present itself.

Theoretically you can have multiple remotes so you could have upstreams of a commercial, a private ssh, etc. it’s just tough to keep them all in sync. Especially if you don’t touch the repo often.

I use git all the time because multiple computers.

in reply to Abe Massry

@abemassry I'm trying to use multiple remotes myself. I should write it up sometime once I'm happy with my setup.

brandonrozek.com/blog/git-push…
seirdy.one/posts/2020/11/18/gi…

in reply to Nelson

Not sure for self-hosting for collaboration, but for private repos, I use bare git repos on a mini pc running linux that sits on my desk. I only connect to it from my local network at home, and I alias its private network IP with a hostname for easier quick use from the terminal. Mostly has everything I want, and making new repos is fast. But CLI only, I have no web ui.

The trickier part was backups to avoid data loss. I use Restic + a cloud backup where I periodically sync my repos.

in reply to Nelson

I think the Postgres project still self-hosts. Self-hosting git is the easy part, and I'd argue the least valuable part of GH. It's having issues and permissions management and threaded review and tying in to releases that would be hard to replace, to say nothing of network effects. Postgres could do this because they already had other systems for these things.
in reply to Berkubernetus

@fuzzychef We choose to go to the moon, not because it is easy, but because it is hard!

hachyderm.io/@aburka/111644887…

in reply to Nelson

I prefer:

We do this, not because it is easy, but because we THOUGHT it would be easy.

in reply to Nelson

the first company I worked for used this bare repo ssh strategy. It was annoying to scale the permissions but I think it could be fine for a smaller teams as long as they have good processes.

You'll be missing out on important features that people sometimes consider necessary for modern development practices though, like branch protection, user self-management, CI, etc., so I think it's only appropriate for quick unsophisticated projects like schoolwork or throwaway prototypes.

in reply to Justin Fitzsimmons

@smn Ooh, permissions and user management are a good point, I'll have to think about ways to handle that.

What do you find most useful about branch protection? I've never used it myself, probably because I'm an amateur.

in reply to Nelson

if people can rewrite the history of critical core branches on the central repo, you're going to have problems. Whether it's accidental or malicious, it becomes a headache that increases geometrically with the number of contributors. Initial implementations of branch protection just prevented history-rewriting, for good reason.

More advanced protections are available now like "don't let any code into the main branch unless it's in a PR that has passed all the tests and peer review"

in reply to Nelson

For my personal projects, where I'm the only dev, I don't even bother with a server: the local Git repo is enough, plus regular backups of the whole project folder (repo included).
in reply to Nelson

I am doing the ssh thing for personal projects and it works perfectly for me. The only very slight obstacle is having to ssh into the server to create a new repo, but that isn't something I need to do often.
in reply to Nelson

Synology NAS with containers and gitea there. That’s my local “cloud” git service
Unknown parent

Nelson

@dancast I push to multiple remotes for redundancy. Right now it's GitHub, Sourcehut, and Codeberg, but my plan is to replace GitHub with my self-hosted git remote.

brandonrozek.com/blog/git-push…
seirdy.one/posts/2020/11/18/gi…

in reply to Nelson

I have, and it can be useful, but I miss Issues and the Wiki for docs. @gitea is super simple, and provides all of this, and is also SUPER customizable.
in reply to Nelson

yes, i used to mildly abuse the university's HPC cluster doing this. The "front end" servers accepted regular SSH and had access to the same shared file system, so it was 0 effort to set up.

Questo sito utilizza cookie per riconosce gli utenti loggati e quelli che tornano a visitare. Proseguendo la navigazione su questo sito, accetti l'utilizzo di questi cookie.