description = "A brief overview of how I stood up a gitea instance for the purpose of backing up and syncing my Obsidian vault."
showFullContent = false
+++
---
## What am I Doing?
I take notes on a broad spectrum of topics ranging from tabletop roleplaying games to recipes to the last wishes of my loved ones. Because of how valuable these notes are, I need to accomplish two things:
1) Back up my notes so that no single catastrophe can wipe them out
1) Back up my notes so that no single catastrophe can wipe them out
2) Make my notes accessible on multiple devices like my phone and various work laptops
For writing and organizing my notes, I use an application called [Obsidian](https://obsidian.md), an Electron Markdown reader and editor with an emphasis on plaintext, local-only files to represent your notes. This has a lot of interesting implications which are well beyond the scope of this post, but this is the one that's germane: your notes are a textbook use-case for version control.
@ -40,8 +40,8 @@ A few times a day, I'll commit changes to my notes, plugins, or snippets and pus
For convenience, I chose to start off with Github as my provider. I set up a private repository because my notes contain sensitive information of various flavors and had no problems with it, except for attachments. This works great, Github is a fast reliable provider and meets all the requirements I laid out above.
## The catch
There is no free lunch. On Github, free repositories have restrictions:
1) github will warn you if you commit files larger than 50mb and ask you to consider removing them or using git-lfs
2) github will not permit any files larger than 100mb to be committed
1) github will warn you if you commit files larger than 50mb and ask you to consider removing them or using git-lfs
2) github will not permit any files larger than 100mb to be committed
3) You're allowed a limited number of private repositories, depending on the type and tier of your account.
My vault does not exclusively consist of plaintext files, though; there's PDFs, PNGs, PSDs, and more hanging out, taking up space and refusing to diff efficiently. I've got a lot of PDFs of TTRPG content, screenshots of important parts of software I care about for work or my personal life, and a lot of backup copies of configuration files.
I'm not satisfied with theoretical sustainability, though. For something this important and sensitive, I'd like to have total confidence that my system will work as expected for the foreseeable future.
I'm not satisfied with theoretical sustainability, though. For something this important and sensitive, I'd like to have total confidence that my system will work as expected for the foreseeable future.
## What are the options?
1) Github has its own [lfs service](https://docs.github.com/en/repositories/working-with-files/managing-large-files/about-git-large-file-storage) with the free tier capped at 2gb of storage.
@ -73,7 +73,7 @@ Option 3 is better; a managed git hosting service splits the difference nicely.
I've opted out of this mostly for price and partly because I know for a fact that I can implement option 4.
## Option 4
I chose to use what I'm already familiar with: [Gitea](https://gitea.io/en-us/). Gitea is a fork of Gogs, a hosted git service written in Go. It's lightweight and its simplest implementation runs off an sqlite database so I don't even need a PostgreSQL service running.
I chose to use what I'm already familiar with: [Gitea](https://gitea.io/en-us/). Gitea is a fork of Gogs, a hosted git service written in Go. It's lightweight and its simplest implementation runs off an sqlite database so I don't even need a PostgreSQL service running.
I've been using gogs and gitea for years and they've been extremely reliable and performant. It also integrates tightly with [Drone](https://www.drone.io/), a CI/CD system which will help me automate my blog, publish my notes, and more I haven't had the energy to plan.