Start Your Self-Hosted Git LFS Server with Git Granary

0

Have you ever struggled with efficiently managing large files in Git? Git Granary is here to solve that problem with a personal Git LFS server. Written in TypeScript, this server is designed to allow individuals to manage large files in a self-hosted environment. One of its key advantages is the ability to run in various runtime environments (Bun, Deno, Node).

Benefits of Self-Hosting

The biggest advantage of self-hosting is the complete control over your data. Git Granary supports multiple users and maintains security through basic HTTP authentication. This allows users to work in their own secure environment. For even more secure operation, pair it with an HTTPS proxy like Caddy or Traefik.

Support for Multiple Runtimes

Git Granary can run in various runtime environments. While the server is primarily designed to run on Deno, it can also operate on Bun and Node with minimal setup. Each runtime uses its unique HTTP server, offering users a range of options.

  • Handles downloads using Deno’s standard library `serveFile`
  • Performs SHA-256 computation and file streaming simultaneously during uploads using `Web Crypto`
  • Unique HTTP servers for each runtime: `Bun.serve`, `Deno.serve`, `Node’s createServer`

Easy Setup and Management

Setting up Git Granary is very straightforward. It uses basic HTTP authentication, allowing you to set the username and password via environment variables (GGLFS_USERNAME, GGLFS_PASSWORD). When configuring an HTTPS reverse proxy, you must specify the full URL using the GGLFS_ORIGIN variable.

Clients can easily configure it through the .lfsconfig file or the git config command.

[lfs]
    url = http://user:pass@localhost:8000/repo

With such simple setup steps, Git Granary can transform into a powerful and secure Git LFS server.

Conclusion

Give your project true freedom with Git Granary. Running your own Git LFS server in a self-hosted environment allows you to fully control your data while effectively managing large files. If you want a secure and efficient development environment, start with Git Granary today!

Reference: GitHub, “Git Granary”

Leave a Reply