this post was submitted on 16 Sep 2025
53 points (100.0% liked)

Selfhosted

51506 readers
275 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 2 years ago
MODERATORS
 

I've been recently dabbling on rust, and I am have been mostly doing that on my laptop. However, I also have a desktop and once in a while I would like to resume my stuff from the laptop, but without manual file transfers.

I know git by design does this, but I would like to use my current docker setup with Ubuntu server to have a very simple git server.

What would be the simplest git server to have in this situation? Keep in mind I am not planning to expose none of this to the internet

all 30 comments
sorted by: hot top controversial new old
[–] possiblylinux127@lemmy.zip 24 points 7 hours ago (2 children)
[–] Selfhoster1728 2 points 5 hours ago

Forgejo my beloved 🥰🥰

[–] ikidd@lemmy.world 1 points 7 hours ago
[–] irotsoma@lemmy.blahaj.zone 8 points 9 hours ago

I use forgejo on a raspberry pi.

Second Forgejo. Easiest deploy I've ever done.

[–] WIPocket@lemmy.world 78 points 16 hours ago* (last edited 16 hours ago) (2 children)

The really simple setup for a single user is just a SSH server with access to storage and the git command. Assuming your laptop and desktop have SSH access to server, you can just:

ssh server git init --bare somerepo
cd somerepo
git remote add server server:somerepo
git push --set-upstream somerepo master #(or main)

and then git clone server:somerepo.

For something slightly higher-tech, I recommend going with Forgejo (the fork of Gitea). It is really easy to set up and low maintainance.

Avoid GitLab for small setups, it is fairly resource hungry.

[–] portnull@lemmy.dbzer0.com 10 points 15 hours ago

This is the correct answer

For something more than bare got and lower than forgejo I can recommend soft-serve

[–] SpookyMulder@twun.io 25 points 16 hours ago

SSH is all you need. You can clone directly from one .git directory to another.

e.g

git remote add desktop git@desktop:project/.git
git push desktop main --set-upstream
[–] rozodru@piefed.social 13 points 15 hours ago (1 children)

I have a private instance of Forgejo in docker on my server. took me all of 5 minutes to set up. I did this only because I wanted a web based GUI for some stuff.

[–] andyburke@fedia.io 1 points 13 hours ago
[–] portnull@lemmy.dbzer0.com 9 points 15 hours ago

Many excellent replies. Just want to add https://github.com/charmbracelet/soft-serve as an option

[–] darkan15@lemmy.world 7 points 16 hours ago* (last edited 15 hours ago)

The simplest (really the simplest) would be to do a git init --bare in a directory on one machine, and that way you can clone, push or pull from it, with the directory path as URL from the same machine and using ssh from the other (you could do this bare repo inside a container but really would be complicating it), you would have to init a new bare repo per project in a new directory.

If a self-hosted server meaning something with a web UI to handle multiple repositories with pull requests, issues, etc. like your own local Github/Gitlab. The answer is forgejo (this link has the instructions to deploy with docker), and if you want to see how that looks like there is an online public instance called codeberg where the forgejo code is hosted, alongside other projects.

[–] bacon_pdp@lemmy.world 6 points 15 hours ago

git init --bare

And then just ssh to the server to push/pull. It can’t be any simpler

[–] corsicanguppy@lemmy.ca -5 points 8 hours ago
  1. Install Rocky9
  2. Yum install gitlab-omnibus
  3. Oh. We're done.
[–] WhatsHerBucket@lemmy.world 5 points 16 hours ago (1 children)

Check out Gitea. It was pretty easy to set up with docker and they have pretty decent docs.

[–] artiman@piefed.social 17 points 14 hours ago (3 children)

gitea has been replaced by forgejo

[–] cecilkorik@lemmy.ca 5 points 12 hours ago

You are correct, and I am still a bit sad about it, because gitea was a cuter name and logo TBH. But Forgejo is pursuing a technically superior design and socially better path at this point.

[–] TehNomad@piefed.social 3 points 12 hours ago (2 children)

I think Forgejo is a community-driven fork of Gitea. Gitea development is still active.

[–] artiman@piefed.social 1 points 1 hour ago

forgejo is implementing federation and gitea is not https://forgejo.org/compare-to-gitea/ if you dont care that its community based, federation is the only thing i could tell you

[–] possiblylinux127@lemmy.zip 0 points 7 hours ago (1 children)

Look at the number of commits

[–] corsicanguppy@lemmy.ca 2 points 7 hours ago

Churn != Improvement

[–] Zeoic@lemmy.world 1 points 12 hours ago (1 children)

Why is that? The project still seems to be available / updating

[–] artiman@piefed.social 1 points 1 hour ago* (last edited 1 hour ago)

it's been forked Into forgejo a community driven fork if you don't care that they are community based, they are also implementing federation

[–] BOFH666@lemmy.world 3 points 16 hours ago

If you fancy a nice webbased interface, Forgejo. Git bare with cgit is an option of course, but running the single application for Forgejo will you lots of fun.

[–] ryokimball 2 points 16 hours ago

This is not the simplest answer at all but FYI you can also self host gitlab

[–] illusionist@lemmy.zip -3 points 16 hours ago* (last edited 16 hours ago) (1 children)

Using git is oftentimes a good idea but does not fit your description. Just use syncthing or another cloud thing. You can still use git but without a dedicated berg/tea/hub/lab/bucket server

[–] cecilkorik@lemmy.ca 4 points 12 hours ago (1 children)

Horrible idea. You'll likely end up syncing a mess of unnecessary, incompatible and conflicting binary build files onto different platforms, you'll end up with internal file conflicts that are impossible to properly resolve and will destroy your repo, especially if you're still using git on top of it. Don't do this. Git has its own synchronization mechanisms for a reason, they are extremely mature and specifically designed for maximum efficiency, safety and correctness for the task at hand, which is managing source code. Millions of people use git for source code every day. It is a solved problem.

Syncthing is literally the WRONG tool for this job. It is a great tool for many situations, but you are using it as a hammer when what you need is a saw.

[–] koala@programming.dev 1 points 6 hours ago

To be fair, if you want to sync your work across two machines, Git is not ideal because well, you must always remember to push, If you don't push before switching to the other machine, you're out of luck.

Syncthing has no such problem, because it's real time.

However, it's true that you cannot combine Syncthing and Git. There are solutions like https://github.com/tkellogg/dura, but I have not tested it.

There's some lack of options in this space. For some, it might be nicer to run an online IDE.

...

To add something, I second the "just use Git over ssh without installing any additional server". An additional variation is using something like Gitolite to add multi-user support to raw Git, if you need to support multiple users and permissions; it's still lighter than running Forgejo.