|
| 1 | +# ONEComputer OSS installation |
| 2 | + |
| 3 | +The supported public installation path is a small source bootstrapper followed |
| 4 | +by a deterministic local setup script. This keeps the first-run experience |
| 5 | +short while keeping the source, package lockfile, database migrations, and |
| 6 | +gateway code visible and reproducible. |
| 7 | + |
| 8 | +## One-line setup |
| 9 | + |
| 10 | +```bash |
| 11 | +curl -fsSL https://raw.githubusercontent.com/ONE-Computer/onecomputer/main/scripts/install.sh | sh |
| 12 | +``` |
| 13 | + |
| 14 | +The default flow: |
| 15 | + |
| 16 | +1. Clones `ONE-Computer/onecomputer` into `~/.onecomputer/src`. |
| 17 | +2. Reuses an existing checkout if that path already contains Git metadata. |
| 18 | +3. Checks Node.js, pnpm, Docker, and Docker Compose before changing the repo. |
| 19 | +4. Creates `.env` from `.env.example` with mode `600` if it does not exist. |
| 20 | +5. Generates missing local encryption and gateway secrets without printing them. |
| 21 | +6. Chooses PostgreSQL port `5432`, falling back to `5433` when the default is busy. |
| 22 | +7. Installs from `pnpm-lock.yaml`, generates Prisma, starts PostgreSQL, and migrates. |
| 23 | +8. Starts `pnpm dev`, which runs the web app and Rust gateway from source. |
| 24 | + |
| 25 | +The script does not install Docker, Node.js, or Rust with `sudo`. Missing |
| 26 | +prerequisites produce a direct installation instruction instead. This avoids a |
| 27 | +privileged package-manager action hidden inside a `curl | sh` command. |
| 28 | + |
| 29 | +## Useful options |
| 30 | + |
| 31 | +```bash |
| 32 | +# Prepare dependencies and PostgreSQL, then return to the shell. |
| 33 | +curl -fsSL https://raw.githubusercontent.com/ONE-Computer/onecomputer/main/scripts/install.sh \ |
| 34 | + | sh -s -- --no-start |
| 35 | + |
| 36 | +# Preview the plan without cloning or changing anything. |
| 37 | +curl -fsSL https://raw.githubusercontent.com/ONE-Computer/onecomputer/main/scripts/install.sh \ |
| 38 | + | sh -s -- --dry-run --no-start |
| 39 | + |
| 40 | +# Use an existing local checkout. |
| 41 | +./scripts/install.sh --source-dir . --no-start |
| 42 | + |
| 43 | +# Use a non-default PostgreSQL port. |
| 44 | +./scripts/onecomputer/setup.sh --postgres-port 5433 --no-start |
| 45 | +``` |
| 46 | + |
| 47 | +The setup script also accepts `--app-port` and `--gateway-port`. Rerunning it |
| 48 | +does not remove containers or volumes. Existing `.env` values are preserved; |
| 49 | +only empty or known placeholder values are generated. |
| 50 | + |
| 51 | +## Prerequisites |
| 52 | + |
| 53 | +- Git |
| 54 | +- Node.js 18 or newer |
| 55 | +- pnpm 9, enabled with Corepack when available |
| 56 | +- Docker Engine or Docker Desktop with Docker Compose v2 |
| 57 | +- Rust/Cargo for the gateway development process |
| 58 | + |
| 59 | +The installer checks Node, pnpm, and Docker before making changes. Rust is |
| 60 | +needed when `pnpm dev` starts the gateway; install it through |
| 61 | +[rustup](https://rustup.rs/) if it is missing. |
| 62 | + |
| 63 | +## Security behavior |
| 64 | + |
| 65 | +- The installer has no telemetry or analytics. |
| 66 | +- It never prints `.env` values, wallet material, API keys, or generated keys. |
| 67 | +- It does not modify Git remotes, force-reset branches, or delete data volumes. |
| 68 | +- `.env` is created with mode `600` and is not committed by the repository. |
| 69 | +- The public source path is intentionally used for OSS development while the |
| 70 | + Azure path remains governed by the deployment runbook and external OpenVTC |
| 71 | + wallet boundary. |
| 72 | + |
| 73 | +Inspect the script before running it in a sensitive environment. For a reviewable |
| 74 | +flow, clone the repository first and run `./scripts/install.sh --source-dir .`. |
| 75 | + |
| 76 | +## Updating |
| 77 | + |
| 78 | +Rerunning the installer reuses the existing checkout. It does not silently |
| 79 | +discard local changes. Update deliberately: |
| 80 | + |
| 81 | +```bash |
| 82 | +cd ~/.onecomputer/src |
| 83 | +git pull --ff-only |
| 84 | +./scripts/onecomputer/setup.sh --no-start |
| 85 | +``` |
| 86 | + |
| 87 | +## Scope boundary |
| 88 | + |
| 89 | +This installer is for local OSS development and the local E2E path. It does not |
| 90 | +provision Azure, Entra ID, OpenVTC/VTI services, TLS, DNS, or production |
| 91 | +credentials. Use the Azure E2E runbook for those environments. |
0 commit comments