this post was submitted on 12 Nov 2023
89 points (94.9% liked)

Selfhosted

39275 readers
269 users here now

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:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. 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.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

I'm looking to self-host a GitHub alt on a cheap Linux VPS for personal use. Any rec?

top 46 comments
sorted by: hot top controversial new old
[–] Toine@sh.itjust.works 53 points 10 months ago

I use gitea, it works fine.

[–] Carol2852@discuss.tchncs.de 23 points 10 months ago (1 children)

If you just want a remote to push your code to without issues, projects, pull requests and such you can use git only: https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server

[–] khoi@slrpnk.net 7 points 10 months ago (1 children)

This is actually a good idea! No need to over engineer stuff 😅

[–] Goodtoknow@lemmy.ca 1 points 10 months ago

Yup K.I.S.S

[–] CCF_100@sh.itjust.works 17 points 10 months ago (1 children)

I personally use Gitea. It's really nice, and it stays out of the way until you need it.

[–] khoi@slrpnk.net 1 points 10 months ago (1 children)

Forgejo vs Gitea 🧐? Considering…

[–] neshura@bookwormstory.social 2 points 10 months ago* (last edited 10 months ago)

I'd recommend forgejo, it's a fork of gitea and unlike gitea actually a piece of free software. Gitea is developed (and the gitea.io site operated) by Gitea Limited. Whether or not that's a problem is up to you but I'd just like to highlight GitLab's recent move(s) to repeatedly increase subscription/hosting costs by various means as a potential future of Gitea. Forgejo is mainly developed by Codeberg e.V. which is a non-profit so enshittification is somewhat less likely.

[–] arisunz@lemmy.blahaj.zone 17 points 10 months ago

i run forgejo on my shitty vps and for the amount of features it has it is surprisingly lightweight, i love it so much

[–] American_Jesus@lemm.ee 15 points 10 months ago (2 children)
[–] paris@lemmy.blahaj.zone 3 points 10 months ago

I recommend against gogs. It's missing lots of features that I expected and I ended up switching to gitea anyways. Gitea works well for everything I need and forgejo is a fork of gitea that I might switch to in the future.

[–] possiblylinux127@lemmy.zip 0 points 10 months ago

I came here to say this

[–] ikidd@lemmy.world 15 points 10 months ago

Gitea also has webhooks so you can use it with Portainer to update Docker Compose container stacks from repo.

[–] SubWoofer@catgirl.pub 14 points 10 months ago (1 children)

i'd reccomend forgejo a fork of gitea

[–] khoi@slrpnk.net 1 points 10 months ago* (last edited 10 months ago)

The doc is pretty good

[–] davad@lemmy.world 13 points 10 months ago

Here's another plug for gitea. It's lightweight, but still has a nice feature set.

I tried hosting GitLab a number of years back, but it was more resource hungry than my host machine could handle well.

[–] apinsard@lemmy.world 12 points 10 months ago

I use gitea and it's great, I would recommand having a good backup système if you care about your repos though

[–] nexussapphire@lemm.ee 9 points 10 months ago (1 children)

As a dumb user I like gitlab! It's responsive, clean, legible, and pretty easy to navigate compared to others. Also anything that supports git clone because it's pretty nice for manually building stuff on arch.

I don't know what your project is or if it's going to be public but that's my vote if it is!

[–] shadowbert@kbin.social 8 points 10 months ago* (last edited 10 months ago)

I'd definetly recommend GitLab too - but it's not lightweight.

[–] Decronym@lemmy.decronym.xyz 7 points 10 months ago* (last edited 9 months ago)

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
SSD Solid State Drive mass storage
SSH Secure Shell for remote terminal access
VPS Virtual Private Server (opposed to shared hosting)

4 acronyms in this thread; the most compressed thread commented on today has 4 acronyms.

[Thread #276 for this sub, first seen 12th Nov 2023, 09:40] [FAQ] [Full list] [Contact] [Source code]

[–] antihumanitarian@lemmy.world 6 points 10 months ago (1 children)

Forgejo is my go to, I ran it in a GCP micro instance, which has 768 MB ram and a piddling processor. One of my friends works for a company that had all their devs run a local instance in addition to the main repo, it was that light.

Gitea is the former go to, but gitea was hijacked and stolen from the community by a for profit company. Forgejo is currently a drop in replacement fork, but with added privacy features, future federation options, and a reputable parent organization.

[–] khoi@slrpnk.net 1 points 10 months ago

Heard lots of good things about Forgejo!

[–] SamC@lemmy.nz 5 points 10 months ago (2 children)

If you don't need the web gui stuff (and you shouldn't for personal use) you can set up a git server using gitolite. Very easy to manage

[–] russjr08@outpost.zeuslink.net 14 points 10 months ago

And if you really want even more barebones, you can just do git init --bare into a directory on your VPS, and then git clone user@your.ip.here:path/to/the/directory and use git as you would normally!

[–] corsicanguppy@lemmy.ca 2 points 10 months ago (1 children)

and you shouldn't for personal use

Nonsense. I like to see how my CI is going.

[–] SamC@lemmy.nz 1 points 10 months ago

Most of the Web GUIs are designed for interaction/collaboration between multiple people, and are massive overkill for one person. Tools like gitk/git gui are more than enough to see what's going on graphically.

If you want to install all the other stuff, that's completely up to you, but a lot of people don't seem to realise that the Web GUI stuff and command line are completely separate things, and you don't have to install both of them.

[–] xinayder@infosec.pub 4 points 10 months ago

I'd recommend Forgejo/Gitea as others have mentioned or https://sourcehut.org (instance available at https://sr.ht/)

[–] feminalpanda@lemmings.world 4 points 10 months ago (2 children)

What about gitlab? Isn't that the same as GitHub? If not I'll need to see how they are different.

[–] cichy1173@szmer.info 12 points 10 months ago* (last edited 10 months ago) (1 children)

Gitlab isn't really lightweight. It is cool, but not lightweight.

[–] feminalpanda@lemmings.world 2 points 10 months ago

Ahh ok, I know the other team deployed it in our openshift environment so wasn't sure.

[–] corsicanguppy@lemmy.ca 3 points 10 months ago

Yeah. It needs 3gb ram, now. That's about 1/10th what a Windows VM needs to boot, seemingly, but still large.

[–] Matty_r@programming.dev 3 points 10 months ago (1 children)

How cheap are we talking? OneDev is awesome but is recommended to have 2gb ram - the more repos and larger code bases might eventually need more ram.

[–] khoi@slrpnk.net 1 points 10 months ago

Memory vCPUs Transfer SSD 1 GiB 1 vCPU 1,000 GiB 25 GiB

[–] canvaswings@lemm.ee 2 points 10 months ago (1 children)

If you don't need the web interface and just want a feature rich git server I recommend Soft Serve. It has a really cool ssh TUI as well.

[–] khoi@slrpnk.net 1 points 10 months ago

This is cool!

[–] Sagar@sopuli.xyz 2 points 10 months ago

Stagit and cgit, just the very best! If you want a github like UI, there is Gogs.

[–] markr@lemmy.world 1 points 10 months ago (1 children)

Gitlab at least used to be the open source release of GitHub. I ran it in my lab for a while but stopped as I was using github anyway. It was easy to setup and maintain but it used a lot of resources. I ran it on a vm, there is likely a docker build as well.

[–] Kata1yst@kbin.social 2 points 10 months ago

GitLab and GitHub were always developed separately by completely different people and have never shared code.

[–] TheInsane42@lemmy.world 1 points 10 months ago* (last edited 10 months ago)

I've been using gogs since I had my RPi2. It's not fancy, it just works. Gitea is a fork of it, as there are others, but I never really put time in a conversion, as gogs just works. I don't do more then synching repos over ssh and an occasional repo creation via the web interface. It's a 1 user setup.

Edit: just spend a bit of spare time to install forgejo to figure out what I need to do to move the repos I have (~200) over. All that was needed was to create all repos manually and then rsync the content from the direcory with the gogs repos to the forgejo repo storage. I went ftom gogs 0.12 to forgejo 1.20.5 in a tad over 2h.

[–] troed@fedia.io 1 points 10 months ago (2 children)

I haven't installed it yet, but I'm going to try out Gitness for this: https://docs.gitness.com/

[–] troed@fedia.io 2 points 10 months ago

I have now installed it and I like it.

[–] neshura@bookwormstory.social 1 points 10 months ago

if their service runs as poorly as their website I'll give that a pass

[–] alvaro@social.graves.cl -1 points 10 months ago

@khoi@slrpnk.net probably others already suggested, gitea is as lightweight as you can go with a nice interface and features

[–] LemmyIsFantastic@lemmy.world -2 points 10 months ago (2 children)

I wouldn't self host any git unless it was unimportant. Too easy to dick up disks.

[–] julianwgs@discuss.tchncs.de 7 points 10 months ago

Well thats what backups are for, but may be start with a mirror or with unimportant stuff for at least a year ;) Also proprietary service can delete your data, too. This happens especially when you are using the generous free tier and they decide to make more money. See Evernote, Gitlab, Heroku…

[–] corsicanguppy@lemmy.ca 5 points 10 months ago* (last edited 10 months ago) (1 children)

You wouldn't host anything important without doing it properly.

That should be obvious, man.

[–] LemmyIsFantastic@lemmy.world -2 points 10 months ago

Not even remotely close to true. Services are mostly half assed. Doing them correctly is time consuming and expensive.