Selfhost your own gitea instance - selfhosted, lightweight github alternative | 4rkal's blog
4rkal.com
external-link
In this article I’ll walk you through how you can run your own gitea instance. But first What is gitea? Gitea is a painless selfhosted Git service. It is written in Go and is extremely lightweight. I run a gitea instance on my Le Potato and it barely uses any resources. Why use gitea (vs GitHub, GitLab etc) I started running my own Gitea instance because I wanted a private place to host my Obsidian notes.

I’ve recently set up my own Gitea instance and I figured I’d share a simple guide on how to do it yourself. Hopefully this will be helpful to anyone looking to get started.

If you have any feedback please feel free to comment it bellow.

@cizra@lemm.ee
link
fedilink
English
113M

I started running my own Gitea instance because I wanted a private place to host my Obsidian notes.

I don’t have the time to read the article now, but permit a question: what do you use Gitea for?

I’m holding my dotfiles on a SSH server, clone/push over SSH, and it’s enough to do Git. I don’t need a ticket system, or wiki or anything (I use plaintext notes).

$ cat ~/.ssh/config
Host srv
  Hostname srv.mywhatever.com

$ git clone srv:/path/to/repo
$ cd repo
$ git push
@4rkal@lemmy.world
creator
link
fedilink
English
23M

Great question

I always found setting up a git server from scratch to be quite confusing and I also like the webui that gitea offers.

But recently I have also started moving some of my github projects there so having a link (with a readme and everything) that I can share with others is important.

@cizra@lemm.ee
link
fedilink
English
43M

If you have a place to host Forgejo/Gitea, you have a place to store a Git server. Set it up like this:

$ git clone --bare myrepo myrepo.bare
$ scp -r myrepo.bare srv:
$ cd myrepo
$ git remote add origin srv:myrepo.bare
# or
$ git remote set-url origin srv:myrepo.bare

Now git push etc work similar to GitHub, but you’re using your server (named srv in SSH config, as shown in my previous post) as the remote storage.

Selfhosted Gitea is a way to get a wiki, bug tracker or whatnot - collaborate, for example, but it’s not necessary to have a Git server for your personal use.

@asap@lemmy.world
link
fedilink
English
5
edit-2
3M

Selfhosted Gitea is a way to get a wiki, bug tracker or whatnot - collaborate, for example, but it’s not necessary to have a Git server for your personal use.

No, but it is amazing for browsing your repos and visually seeing what you did in a past commit or a branch, while your IDE is open to your latest code. Or copying and pasting something that you need from a different repo.

For Git experts, sure they can probably do all that better inside their IDE or CLI, but for us plebs, having your own Forgejo is incredible 😍

I have mine configured to disable the wiki and issues, etc, it’s just the repo browser.

@Miaou@jlai.lu
link
fedilink
English
12M

I’m hoping federation will allow me to get rid of my github entirely, but that’s wishful thinking I fear

Create a post

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!

  • 1 user online
  • 129 users / day
  • 423 users / week
  • 1.16K users / month
  • 3.85K users / 6 months
  • 1 subscriber
  • 3.68K Posts
  • 74.2K Comments
  • Modlog