Skip to content

Commit 2018bb9

Browse files
committed
docs(quick-start): default to root SSH user, emphasize DNS A record requirement
1 parent fe79e93 commit 2018bb9

1 file changed

Lines changed: 20 additions & 11 deletions

File tree

website/src/content/docs/docs/quick-start.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,31 @@ Inside [Claude Code](https://claude.com/claude-code), the `shipnode` skill knows
1414
| You need | Why |
1515
|---|---|
1616
| **A VPS** running Ubuntu 22.04+ or Debian 12+ | ShipNode provisions Node, PM2, Caddy on this OS. |
17-
| **A non-root SSH user** with `sudo` and a public key in `~/.ssh/authorized_keys` | All `shipnode` commands run as this user. |
18-
| **A domain** pointing an A record at the VPS IP | Caddy will issue an HTTPS cert automatically. |
17+
| **SSH access as `root`** with your public key in `/root/.ssh/authorized_keys` | The simplest path — what most fresh VPS images give you. |
18+
| **A domain name** with an **A record pointing at the VPS public IP** | Required. Caddy uses the domain to issue an HTTPS cert automatically — no domain, no TLS. |
1919
| **Node.js 18+ locally** | The CLI is a Node.js package. |
2020

21-
If your VPS only has a root user right now, create the deploy user first:
21+
### Point your domain at the server
22+
23+
Before anything else, log into your DNS provider (Cloudflare, Namecheap, Route 53, OVH…) and create an **A record**:
24+
25+
| Type | Name | Value | TTL |
26+
|---|---|---|---|
27+
| `A` | `api` *(or `@` for the apex)* | `203.0.113.10` *(your VPS IP)* | Auto / 300 |
28+
29+
Verify it resolves before you deploy:
2230

2331
```bash
24-
ssh root@your.vps.ip
25-
adduser deploy
26-
usermod -aG sudo deploy
27-
mkdir -p /home/deploy/.ssh
28-
cp ~/.ssh/authorized_keys /home/deploy/.ssh/
29-
chown -R deploy:deploy /home/deploy/.ssh
30-
chmod 700 /home/deploy/.ssh && chmod 600 /home/deploy/.ssh/authorized_keys
32+
dig +short api.example.com
33+
# should print your VPS IP
3134
```
3235

36+
DNS can take a few minutes (sometimes longer with Cloudflare proxying — turn the orange cloud off initially so Caddy can issue the cert via HTTP-01).
37+
38+
### About the root user
39+
40+
This walkthrough uses **`root`** to keep the path short. ShipNode runs fine as root on a single-purpose VPS, and `shipnode setup` / `harden` will lock the server down afterwards (no password auth, fail2ban, firewall). If you'd rather create a dedicated `deploy` user instead, change the `user` field in `shipnode.config.ts` and make sure that user has `sudo` and your SSH key.
41+
3342
## 1. Install shipnode in your project
3443

3544
```bash
@@ -63,7 +72,7 @@ import { shipnode } from '@devalade/shipnode';
6372

6473
export default shipnode
6574
.backend()
66-
.ssh({ host: '203.0.113.10', user: 'deploy' })
75+
.ssh({ host: '203.0.113.10', user: 'root' })
6776
.deployTo('/var/www/api')
6877
.pm2('api', { instances: 2 })
6978
.port(3000)

0 commit comments

Comments
 (0)