- Go 81.6%
- Shell 18.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .forgejo/workflows | ||
| .github/workflows | ||
| art.go | ||
| art_wordmark.go | ||
| download.go | ||
| download_test.go | ||
| embed.go | ||
| embed_test.go | ||
| envfile.go | ||
| envfile_unix.go | ||
| envfile_windows.go | ||
| go.mod | ||
| go.sum | ||
| install.go | ||
| main.go | ||
| plain.go | ||
| platform.go | ||
| provision.go | ||
| provision_test.go | ||
| README.md | ||
| review_test.go | ||
| settings.go | ||
| settings_test.go | ||
| setup.sh | ||
| source.go | ||
| trusted_keys.pem | ||
| tui.go | ||
| tui_layout.go | ||
| tui_review.go | ||
| tui_test.go | ||
| versions.go | ||
EveSynapse installer
The interactive installer for EveSynapse. Download the installer for your platform and run it; it asks for the settings the app needs, shows a review screen where every value can be changed, and then installs it.
Getting it
Download the installer for your platform from the releases (or GitHub):
evesynapse-installer-linux-amd64,evesynapse-installer-linux-arm64evesynapse-installer-darwin-amd64,evesynapse-installer-darwin-arm64evesynapse-installer-windows-amd64.exe,evesynapse-installer-windows-arm64.exe
Then run it:
# Linux
sudo ./evesynapse-installer-linux-amd64
# macOS / Windows
./evesynapse-installer-darwin-arm64
.\evesynapse-installer-windows-amd64.exe
It also runs with --dry-run (prompts and review, then stops
before installing) and --source=build|download. Every prompt
is settable by environment variable (EVESYNAPSE_SOURCE,
EVESYNAPSE_SOURCE_DIR, EVESYNAPSE_DATABASE_URL,
EVESYNAPSE_EVE_CLIENT_ID, EVESYNAPSE_EVE_CLIENT_SECRET,
EVESYNAPSE_ESI_CONTACT), so a scripted install works with
no prompts. When stdout is not a terminal, the prompts are
plain questions on stdin/stdout instead of the full-screen
interface.
What it does
On every platform the installer is offered for, it provides PostgreSQL and Go itself. Either it goes full hog or it does not offer that platform at all; there is no half state where it fails partway and leaves you to finish it by hand.
- Linux (amd64, arm64): installs the app into
/opt/evesynapse, provisions PostgreSQL from the package manager (apt on Debian/Ubuntu, dnf on RHEL family, pacman on Arch, zypper on openSUSE), creates the role and database, writes.env, installs the systemd service and starts it. Building from source fetches the official Go release when the machine's Go is missing or too old. - macOS (amd64, arm64): downloads the matching app binary,
fetches Go and the EnterpriseDB PostgreSQL binaries, starts
a local PostgreSQL under the install directory, writes
.env, starts the app and sets it to start at login (launchd). - Windows (amd64, arm64): the same, with the app set to start at logon (scheduled task).
The app listens on 127.0.0.1:8080. Your reverse proxy is yours to arrange: point Ferron, Caddy, nginx, or a Cloudflare Tunnel at 127.0.0.1:8080 to reach it from the internet.
Dependency versions
The versions the installer provisions live in one place,
versions.go, and every fetch, check and message reads from
there. Updating a dependency later is a one-line change in
that file.
| Dependency | Version | Where it comes from |
|---|---|---|
| Go | 1.27.4 | Official Go release from go.dev |
| PostgreSQL | 16 | Package manager on Linux; EnterpriseDB binaries 16.10-1 on macOS and Windows |
The macOS PostgreSQL zip is a universal build (Intel and Apple Silicon). The Windows zip is an x64 build and runs under emulation on Windows on ARM. The macOS and Windows PostgreSQL download is about 350 MB (the EnterpriseDB zip carries pgAdmin with it); the Go download is about 70 MB.
The local PostgreSQL the installer starts listens only on localhost, and its data directory is created with trusted local authentication, the same as the EnterpriseDB default.
How it picks the app build
The installer downloads the latest EveSynapse release: GitHub,
then GitLab, then natems.dev (Forgejo). A release is only ever
used when its manifest's signature checks out against the
release keys in trusted_keys.pem and the binary matches the
checksum that signed manifest names. The download is checked
to be a program for your platform (ELF on Linux, PE on
Windows, Mach-O on macOS) before anything is installed.
Building from source needs a checkout of the EveSynapse repo
on the machine and make on PATH (on macOS, the Xcode Command
Line Tools; on Windows, make is not standard, so Download is
the usual choice there).
Releasing
The installer is versioned on its own; it does not track the
app version. Tag a release (v1.0.0, v1.0.1, ...) and the
release workflow builds the six installer binaries and
publishes them to the Forgejo release, then the GitHub release.
The GitHub workflow is the primary builder; the Forgejo
workflow is the fallback. A release needs a FORGEJO_TOKEN
repository secret (a Forgejo token with repository write scope
for EveSynapse/evesynapse-installer).
The installer binaries are not signed. They are fetched over TLS from the forges; what they install (the EveSynapse app) is verified against its signed release manifest before it is installed.
Syncing from the EveSynapse repo
Two files in this repo are copies of files from the EveSynapse repo:
setup.shis a copy ofdeploy/setup.sh(the Linux install script the installer embeds and runs).trusted_keys.pemis a copy ofinternal/releasesig/trusted_keys.pem(the release keys the installer checks a downloaded release against).
When either changes in the EveSynapse repo, copy it in here:
cp <evesynapse-checkout>/deploy/setup.sh setup.sh
cp <evesynapse-checkout>/internal/releasesig/trusted_keys.pem trusted_keys.pem
The tests check the embedded copies match the files beside them.
Building it yourself
go vet ./...
go test ./...
go build -o installer .
Cross-builds:
for osarch in linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 windows/amd64 windows/arm64; do
os="${osarch%/*}"; arch="${osarch#*/}"
ext=""; [ "$os" = "windows" ] && ext=".exe"
CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" go build -o "evesynapse-installer-$os-$arch$ext" .
done