[{"data":1,"prerenderedAt":471},["ShallowReactive",2],{"docs-\u002Fdocs\u002Finstallation":3},{"id":4,"title":5,"body":6,"description":463,"extension":464,"meta":465,"navigation":466,"path":467,"seo":468,"stem":469,"__hash__":470},"docs\u002Fdocs\u002Finstallation\u002Findex.md","Download & install",{"type":7,"value":8,"toc":457},"minimark",[9,13,21,26,59,77,134,167,170,197,208,212,215,218,268,272,275,318,322,408,411,440,453],[10,11,5],"h1",{"id":12},"download-install",[14,15,16,20],"p",{},[17,18,19],"code",{},"sg"," is one static binary. It runs on your workstation (the docs call it the controller) and reaches your servers over SSH. Nothing gets installed on the servers ahead of time.",[22,23,25],"h2",{"id":24},"install-with-one-command","Install with one command",[27,28,33],"pre",{"className":29,"code":30,"language":31,"meta":32,"style":32},"language-bash shiki shiki-themes github-dark-high-contrast","curl -fsSL https:\u002F\u002Fgen.slostack.io\u002Finstall.sh | bash\n","bash","",[17,34,35],{"__ignoreMap":32},[36,37,40,44,48,52,56],"span",{"class":38,"line":39},"line",1,[36,41,43],{"class":42},"s_sBn","curl",[36,45,47],{"class":46},"sCcAr"," -fsSL",[36,49,51],{"class":50},"sTRMh"," https:\u002F\u002Fgen.slostack.io\u002Finstall.sh",[36,53,55],{"class":54},"sWyjQ"," |",[36,57,58],{"class":42}," bash\n",[14,60,61,62,65,66,68,69,72,73,76],{},"The script picks the right build for your OS and CPU, checks it against the published ",[17,63,64],{},"SHA256SUMS",", and puts ",[17,67,19],{}," in ",[17,70,71],{},"~\u002F.local\u002Fbin",". It never uses ",[17,74,75],{},"sudo",".",[78,79,80,96],"table",{},[81,82,83],"thead",{},[84,85,86,90,93],"tr",{},[87,88,89],"th",{},"Variable",[87,91,92],{},"Default",[87,94,95],{},"Use it to",[97,98,99,118],"tbody",{},[84,100,101,107,111],{},[102,103,104],"td",{},[17,105,106],{},"SG_INSTALL_DIR",[102,108,109],{},[17,110,71],{},[102,112,113,114,117],{},"Install somewhere else, e.g. ",[17,115,116],{},"SG_INSTALL_DIR=\u002Fusr\u002Flocal\u002Fbin"," (run as a user who can write there)",[84,119,120,125,128],{},[102,121,122],{},[17,123,124],{},"SG_VERSION",[102,126,127],{},"the latest release",[102,129,130,131],{},"Pin a release, e.g. ",[17,132,133],{},"SG_VERSION=v0.1.0-dev",[27,135,137],{"className":29,"code":136,"language":31,"meta":32,"style":32},"curl -fsSL https:\u002F\u002Fgen.slostack.io\u002Finstall.sh | SG_INSTALL_DIR=\"$HOME\u002Fbin\" bash\n",[17,138,139],{"__ignoreMap":32},[36,140,141,143,145,147,149,153,156,159,162,165],{"class":38,"line":39},[36,142,43],{"class":42},[36,144,47],{"class":46},[36,146,51],{"class":50},[36,148,55],{"class":54},[36,150,152],{"class":151},"sMAXC"," SG_INSTALL_DIR",[36,154,155],{"class":54},"=",[36,157,158],{"class":50},"\"",[36,160,161],{"class":151},"$HOME",[36,163,164],{"class":50},"\u002Fbin\"",[36,166,58],{"class":42},[14,168,169],{},"Check it:",[27,171,173],{"className":29,"code":172,"language":31,"meta":32,"style":32},"sg version\n# sg 0.1.0-dev\nsg help\n",[17,174,175,182,189],{"__ignoreMap":32},[36,176,177,179],{"class":38,"line":39},[36,178,19],{"class":42},[36,180,181],{"class":50}," version\n",[36,183,185],{"class":38,"line":184},2,[36,186,188],{"class":187},"sQrFR","# sg 0.1.0-dev\n",[36,190,192,194],{"class":38,"line":191},3,[36,193,19],{"class":42},[36,195,196],{"class":50}," help\n",[14,198,199,200,203,204,207],{},"If your shell says ",[17,201,202],{},"command not found",", add the install directory to your ",[17,205,206],{},"PATH"," and open a new terminal.",[22,209,211],{"id":210},"download-directly","Download directly",[213,214],"release-downloads",{},[14,216,217],{},"Install a download by hand:",[27,219,221],{"className":29,"code":220,"language":31,"meta":32,"style":32},"tar -xzf sg_0.1.0-dev_linux_amd64.tar.gz\nsha256sum -c --ignore-missing SHA256SUMS     # macOS: shasum -a 256 -c SHA256SUMS\ninstall -m 0755 sg_0.1.0-dev_linux_amd64\u002Fsg ~\u002F.local\u002Fbin\u002Fsg\n",[17,222,223,234,251],{"__ignoreMap":32},[36,224,225,228,231],{"class":38,"line":39},[36,226,227],{"class":42},"tar",[36,229,230],{"class":46}," -xzf",[36,232,233],{"class":50}," sg_0.1.0-dev_linux_amd64.tar.gz\n",[36,235,236,239,242,245,248],{"class":38,"line":184},[36,237,238],{"class":42},"sha256sum",[36,240,241],{"class":46}," -c",[36,243,244],{"class":46}," --ignore-missing",[36,246,247],{"class":50}," SHA256SUMS",[36,249,250],{"class":187},"     # macOS: shasum -a 256 -c SHA256SUMS\n",[36,252,253,256,259,262,265],{"class":38,"line":191},[36,254,255],{"class":42},"install",[36,257,258],{"class":46}," -m",[36,260,261],{"class":46}," 0755",[36,263,264],{"class":50}," sg_0.1.0-dev_linux_amd64\u002Fsg",[36,266,267],{"class":50}," ~\u002F.local\u002Fbin\u002Fsg\n",[22,269,271],{"id":270},"build-from-source","Build from source",[14,273,274],{},"You need Go 1.22 or newer. No CGO; the SQLite ledger is pure Go.",[27,276,278],{"className":29,"code":277,"language":31,"meta":32,"style":32},"git clone https:\u002F\u002Fgitlab.com\u002Fslostack\u002Fgenesis.git\ncd genesis\nmake build            # CGO_ENABLED=0 go build -o bin\u002Fsg .\u002Fcmd\u002Fsg\n.\u002Fbin\u002Fsg version\n",[17,279,280,291,299,310],{"__ignoreMap":32},[36,281,282,285,288],{"class":38,"line":39},[36,283,284],{"class":42},"git",[36,286,287],{"class":50}," clone",[36,289,290],{"class":50}," https:\u002F\u002Fgitlab.com\u002Fslostack\u002Fgenesis.git\n",[36,292,293,296],{"class":38,"line":184},[36,294,295],{"class":46},"cd",[36,297,298],{"class":50}," genesis\n",[36,300,301,304,307],{"class":38,"line":191},[36,302,303],{"class":42},"make",[36,305,306],{"class":50}," build",[36,308,309],{"class":187},"            # CGO_ENABLED=0 go build -o bin\u002Fsg .\u002Fcmd\u002Fsg\n",[36,311,313,316],{"class":38,"line":312},4,[36,314,315],{"class":42},".\u002Fbin\u002Fsg",[36,317,181],{"class":50},[22,319,321],{"id":320},"what-the-controller-needs","What the controller needs",[78,323,324,334],{},[81,325,326],{},[84,327,328,331],{},[87,329,330],{},"Need",[87,332,333],{},"Why",[97,335,336,354,376,389,400],{},[84,337,338,346],{},[102,339,340,341,345],{},"An SSH ",[342,343,344],"strong",{},"private"," key that logs into each server as root",[102,347,348,350,351,76],{},[17,349,19],{}," connects with it. Set as ",[17,352,353],{},"machine.ssh.key_path",[84,355,356,363],{},[102,357,358,359,362],{},"The matching ",[342,360,361],{},"public"," key file",[102,364,365,366,369,370,372,373,76],{},"Installed for the ",[17,367,368],{},"deploy"," user ",[17,371,19],{}," creates. Set as ",[17,374,375],{},"bootstrap.deploy_user.key_path",[84,377,378,384],{},[102,379,380,381],{},"Each server's host key in ",[17,382,383],{},"~\u002F.ssh\u002Fknown_hosts",[102,385,386,388],{},[17,387,19],{}," checks every connection against it and never edits the file. SSH in once and check the fingerprint.",[84,390,391,394],{},[102,392,393],{},"A Tailscale auth key in an environment variable",[102,395,396,397,76],{},"Each machine joins your tailnet with it. The default name is ",[17,398,399],{},"TS_AUTHKEY",[84,401,402,405],{},[102,403,404],{},"Tailscale on the controller, in the same tailnet",[102,406,407],{},"Cluster addresses, the LXD API and your application ports all live on the tailnet.",[14,409,410],{},"The servers need Ubuntu 22.04 or 24.04 LTS and root SSH access with your key. A fresh VPS is perfect.",[412,413,415],"note",{"kind":414},"check",[416,417,418,428,434],"ul",{},[419,420,421,424,425,76],"li",{},[17,422,423],{},"sg version"," prints ",[17,426,427],{},"sg 0.1.0-dev",[419,429,430,433],{},[17,431,432],{},"ssh root@\u003Cyour-server>"," works with your key, without a host-key prompt.",[419,435,436,439],{},[17,437,438],{},"tailscale status"," on your workstation shows you're connected.",[14,441,442,443,448,449,76],{},"Next: ",[444,445,447],"a",{"href":446},"\u002Fdocs\u002Fgetting-started\u002Fquick-start","Quick start",", or go straight to ",[444,450,452],{"href":451},"\u002Fdocs\u002Fmachines\u002Ffirst-machine","Launch your first machine",[454,455,456],"style",{},"html pre.shiki code .s_sBn, html code.shiki .s_sBn{--shiki-default:#FFB757}html pre.shiki code .sCcAr, html code.shiki .sCcAr{--shiki-default:#91CBFF}html pre.shiki code .sTRMh, html code.shiki .sTRMh{--shiki-default:#ADDCFF}html pre.shiki code .sWyjQ, html code.shiki .sWyjQ{--shiki-default:#FF9492}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .sMAXC, html code.shiki .sMAXC{--shiki-default:#F0F3F6}html pre.shiki code .sQrFR, html code.shiki .sQrFR{--shiki-default:#BDC4CC}",{"title":32,"searchDepth":184,"depth":184,"links":458},[459,460,461,462],{"id":24,"depth":184,"text":25},{"id":210,"depth":184,"text":211},{"id":270,"depth":184,"text":271},{"id":320,"depth":184,"text":321},"Install the sg binary with one command or a direct download, check it, and get your workstation ready to manage hosts.","md",{},true,"\u002Fdocs\u002Finstallation",{"title":5,"description":463},"docs\u002Finstallation\u002Findex","7etVDYCguExNIQj0k4KcR9VHnjYDdHROLfDRgBFJ_UU",1796464240880]