ubunatic.com

Go library · ssh deploy · cross-arch builds

goself install a Go binary anywhere, from itself.

A pure Go library that lets a CLI or service install itself on the local host or on remote hosts over ssh. It replicates the running binary, builds the local checkout, rebuilds the exact version for another architecture, or fetches a checksum-verified release.

go get ubunatic.com/goself@latest

Key facts

12-week commit activity

2026-10-26
View 12-week data table
Week startingCommits
2026-08-030
2026-08-100
2026-08-170
2026-08-240
2026-08-310
2026-09-070
2026-09-140
2026-09-210
2026-09-280
2026-10-050
2026-10-120
2026-10-190

Key Features

  • Deploys binaries to remote hosts requiring only SSH, /bin/sh, and uname on the target.
  • Automatic cross-architecture detection and zero-CGO recompilation from build info.
  • Multiple resolution strategies: checkout build, running executable self-stream, release archive, or upstream go install.
  • Atomic temp-file staging and rename replacement preventing truncation of running services.

Verified Engineering Milestones

  • Bootstrap to v0.2.2: pure Go SSH deploy engine (#001, 84d8e4b)
  • Cross-architecture build info inspection and fallback strategies (#005, e259599)
  • Consumer onboarding and harness integration (96b6e27)

Stack

Go 1.24, pure-Go SSH client, cross-compilation engine

Deploy without remote toolchains

No remote checkout or Go

The target only needs ssh, /bin/sh and uname. goself builds or fetches the binary locally and streams it over the system ssh client.

Cross-architecture by default

When the target's platform differs, goself rebuilds the running binary's exact version from its build info with CGO_ENABLED=0 for that platform.

Safe replacement

Binaries are written to a temp file and renamed over the target, so a running copy is never truncated.

Where the binary comes from

Strategy Source
auto checkout → build; same platform → self; otherwise → go
self the running executable
build the local checkout, cross-compiled when needed
release a release archive with SHA256 checksum check
go go install pkg@version upstream
res, err := goself.New(goself.Options{Strategy: goself.Auto}).
	Deploy(ctx, goself.Target{Runner: goself.SSH("user@host")})

Project details

Stack
Go 1.24, pure-Go SSH client, cross-compilation engine
Milestones
Bootstrap to v0.2.2: pure Go SSH deploy engine (#001, 84d8e4b) · Cross-architecture build info inspection and fallback strategies (#005, e259599) · Consumer onboarding and harness integration (96b6e27)

Layer composition

Terminal
CLI self-deployment, SSH streaming
Desktop
—
Inference / AI
—
Containers / VM
OCI container testing
Web
—

goself: the story behind the project

Date: 2026-10-25, one session (Claude Opus 5.5 as host, no subagents). - Previous story: none. Baseline is the first commit bc30900 (chore: bootstrap goself). The only earlier study is the topic study prior-art-self-replication.md , written…

Read the engineering story