{
  "path": "/3mjdsbl5eds2k",
  "site": "at://did:plc:nuc33thnsiqzhytkleyr5jek/site.standard.publication/3mjdo3xyaoc2l",
  "tags": [
    "cgit",
    "self-hosting",
    "caddy",
    "git"
  ],
  "$type": "site.standard.document",
  "title": "Install Cgit with Caddy",
  "content": {
    "$type": "pub.leaflet.content",
    "pages": [
      {
        "id": "019d849c-8383-788f-ba02-555ba755f670",
        "$type": "pub.leaflet.pages.linearDocument",
        "blocks": [
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.header",
              "level": 2,
              "plaintext": "Dependencies"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.unorderedList",
              "children": [
                {
                  "$type": "pub.leaflet.blocks.unorderedList#listItem",
                  "content": {
                    "$type": "pub.leaflet.blocks.text",
                    "facets": [
                      {
                        "index": {
                          "byteEnd": 6,
                          "byteStart": 0
                        },
                        "features": [
                          {
                            "uri": "https://github.com/caddyserver/xcaddy/releases",
                            "$type": "pub.leaflet.richtext.facet#link"
                          }
                        ]
                      }
                    ],
                    "plaintext": "xcaddy package from releases page."
                  }
                }
              ]
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "facets": [
                {
                  "index": {
                    "byteEnd": 17,
                    "byteStart": 8
                  },
                  "features": [
                    {
                      "uri": "https://github.com/aksdb/caddy-cgi",
                      "$type": "pub.leaflet.richtext.facet#link"
                    }
                  ]
                }
              ],
              "plaintext": "Install caddy-cgi."
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.code",
              "language": "shellscript",
              "plaintext": "xcaddy build --with github.com/aksdb/caddy-cgi/v2",
              "syntaxHighlightingTheme": "catppuccin-mocha"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "Install remaining dependencies:"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.code",
              "language": "shellscript",
              "plaintext": "sudo apt install gitolite3 cgit python-is-python3 python3-pygments python3-markdown docutils-common groff",
              "syntaxHighlightingTheme": "catppuccin-mocha"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.header",
              "level": 2,
              "plaintext": "Configuration"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "Make a git user."
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.code",
              "language": "shellscript",
              "plaintext": "sudo adduser --system --shell /bin/bash --group --disabled-password --home /home/git git",
              "syntaxHighlightingTheme": "catppuccin-mocha"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "facets": [
                {
                  "index": {
                    "byteEnd": 53,
                    "byteStart": 39
                  },
                  "features": [
                    {
                      "$type": "pub.leaflet.richtext.facet#code"
                    }
                  ]
                }
              ],
              "plaintext": "Configure gitolite for the git user in ~/.gitolite.rc."
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.code",
              "language": "shellscript",
              "plaintext": "UMASK => 0027,\nGIT_CONFIG_KEYS => 'gitweb.description gitweb.owner gitweb.homepage gitweb.category',",
              "syntaxHighlightingTheme": "catppuccin-mocha"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "Add caddy user to the git group."
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.code",
              "language": "shellscript",
              "plaintext": "sudo usermod -aG git caddy",
              "syntaxHighlightingTheme": "catppuccin-mocha"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "facets": [
                {
                  "index": {
                    "byteEnd": 29,
                    "byteStart": 18
                  },
                  "features": [
                    {
                      "$type": "pub.leaflet.richtext.facet#code"
                    }
                  ]
                }
              ],
              "plaintext": "Configure cgit in /etc/cgitrc:"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.code",
              "language": "shellscript",
              "plaintext": "#\n# cgit config\n# see cgitrc(5) for details\n\ncss=/cgit/cgit.css\nlogo=/cgit/cgit.png\nfavicon=/cgit/favicon.ico\n\nenable-index-links=1\nenable-commit-graph=1\nenable-log-filecount=1\nenable-log-linecount=1\nenable-git-config=1\n\nbranch-sort=age\nrepository-sort=name\n\nclone-url=https://git.hyperreal.coffee/$CGIT_REPO_URL git://git.hyperreal.coffee/$CGIT_REPO_URL ssh://git@git.hyperreal.coffee:$CGIT_REPO_URL\n\nroot-title=hyperreal.coffee Git repositories\nroot-desc=Source code and configs for my projects\n\n##\n## List of common mimetypes\n##\nmimetype.gif=image/gif\nmimetype.html=text/html\nmimetype.jpg=image/jpeg\nmimetype.jpeg=image/jpeg\nmimetype.pdf=application/pdf\nmimetype.png=image/png\nmimetype.svg=image/svg+xml\n\n# Enable syntax highlighting\nsource-filter=/usr/lib/cgit/filters/syntax-highlighting.py\n\n# Format markdown, rst, manpages, text files, html files, and org files.\nabout-filter=/usr/lib/cgit/filters/about-formatting.sh\n\n##\n### Search for these files in the root of the default branch of repositories\n### for coming up with the about page:\n##\nreadme=:README.md\nreadme=:README.org\n\nrobots=noindex, nofollow\n\nsection=personal-config\n\nrepo.url=doom-emacs-config\nrepo.path=/home/git/repositories/doom-emacs-config.git\nrepo.desc=My Doom Emacs config",
              "syntaxHighlightingTheme": "catppuccin-mocha"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": ""
            }
          }
        ]
      }
    ]
  },
  "description": "",
  "publishedAt": "2026-02-16T03:15:00.000Z"
}