{
    "mode": "man",
    "parameter": "git-instaweb",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/git-instaweb/1/json",
    "generated": "2026-06-10T16:22:41Z",
    "synopsis": "git instaweb [--local] [--httpd=<httpd>] [--port=<port>]\n[--browser=<browser>]\ngit instaweb [--start] [--stop] [--restart]",
    "sections": {
        "NAME": {
            "content": "git-instaweb - Instantly browse your working repository in gitweb\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "git instaweb [--local] [--httpd=<httpd>] [--port=<port>]\n[--browser=<browser>]\ngit instaweb [--start] [--stop] [--restart]\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "A simple script to set up gitweb and a web server for browsing the local repository.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-l, --local",
                    "content": "Only bind the web server to the local IP (127.0.0.1).\n",
                    "flag": "-l",
                    "long": "--local"
                },
                {
                    "name": "-d, --httpd",
                    "content": "The HTTP daemon command-line that will be executed. Command-line options may be specified\nhere, and the configuration file will be added at the end of the command-line. Currently\napache2, lighttpd, mongoose, plackup, python and webrick are supported. (Default:\nlighttpd)\n",
                    "flag": "-d",
                    "long": "--httpd"
                },
                {
                    "name": "-m, --module-path",
                    "content": "The module path (only needed if httpd is Apache). (Default: /usr/lib/apache2/modules)\n",
                    "flag": "-m",
                    "long": "--module-path"
                },
                {
                    "name": "-p, --port",
                    "content": "The port number to bind the httpd to. (Default: 1234)\n",
                    "flag": "-p",
                    "long": "--port"
                },
                {
                    "name": "-b, --browser",
                    "content": "The web browser that should be used to view the gitweb page. This will be passed to the\ngit web--browse helper script along with the URL of the gitweb instance. See git-\nweb--browse(1) for more information about this. If the script fails, the URL will be\nprinted to stdout.\n\nstart, --start\nStart the httpd instance and exit. Regenerate configuration files as necessary for\nspawning a new instance.\n\nstop, --stop\nStop the httpd instance and exit. This does not generate any of the configuration files\nfor spawning a new instance, nor does it close the browser.\n\nrestart, --restart\nRestart the httpd instance and exit. Regenerate configuration files as necessary for\nspawning a new instance.\n",
                    "flag": "-b",
                    "long": "--browser"
                }
            ]
        },
        "CONFIGURATION": {
            "content": "You may specify configuration in your .git/config\n\n[instaweb]\nlocal = true\nhttpd = apache2 -f\nport = 4321\nbrowser = konqueror\nmodulePath = /usr/lib/apache2/modules\n\n\nIf the configuration variable instaweb.browser is not set, web.browser will be used instead\nif it is defined. See git-web--browse(1) for more information about this.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "gitweb(1)\n",
            "subsections": []
        },
        "GIT": {
            "content": "Part of the git(1) suite\n\n\n\nGit 2.34.1                                   02/26/2026                              GIT-INSTAWEB(1)",
            "subsections": []
        }
    },
    "summary": "git-instaweb - Instantly browse your working repository in gitweb",
    "flags": [
        {
            "flag": "-l",
            "long": "--local",
            "arg": null,
            "description": "Only bind the web server to the local IP (127.0.0.1)."
        },
        {
            "flag": "-d",
            "long": "--httpd",
            "arg": null,
            "description": "The HTTP daemon command-line that will be executed. Command-line options may be specified here, and the configuration file will be added at the end of the command-line. Currently apache2, lighttpd, mongoose, plackup, python and webrick are supported. (Default: lighttpd)"
        },
        {
            "flag": "-m",
            "long": "--module-path",
            "arg": null,
            "description": "The module path (only needed if httpd is Apache). (Default: /usr/lib/apache2/modules)"
        },
        {
            "flag": "-p",
            "long": "--port",
            "arg": null,
            "description": "The port number to bind the httpd to. (Default: 1234)"
        },
        {
            "flag": "-b",
            "long": "--browser",
            "arg": null,
            "description": "The web browser that should be used to view the gitweb page. This will be passed to the git web--browse helper script along with the URL of the gitweb instance. See git- web--browse(1) for more information about this. If the script fails, the URL will be printed to stdout. start, --start Start the httpd instance and exit. Regenerate configuration files as necessary for spawning a new instance. stop, --stop Stop the httpd instance and exit. This does not generate any of the configuration files for spawning a new instance, nor does it close the browser. restart, --restart Restart the httpd instance and exit. Regenerate configuration files as necessary for spawning a new instance."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "gitweb",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/gitweb/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Helper to launch a GitWeb server.",
        "examples": [
            {
                "description": "Launch a GitWeb server for the current Git repository",
                "command": "git instaweb --start"
            },
            {
                "description": "Listen only on localhost",
                "command": "git instaweb --start {{-l|--local}}"
            },
            {
                "description": "Listen on a specific port",
                "command": "git instaweb --start {{-p|--port}} {{1234}}"
            },
            {
                "description": "Use a specified HTTP daemon",
                "command": "git instaweb --start {{-d|--httpd}} {{lighttpd|apache2|mongoose|plackup|webrick}}"
            },
            {
                "description": "Also auto-launch a web browser",
                "command": "git instaweb --start {{-b|--browser}}"
            },
            {
                "description": "Stop the currently running GitWeb server",
                "command": "git instaweb --stop"
            },
            {
                "description": "Restart the currently running GitWeb server",
                "command": "git instaweb --restart"
            }
        ]
    }
}