Skip to content

Commit 270dfc0

Browse files
committed
docs(quick-start): add troubleshooting section
1 parent cef7d34 commit 270dfc0

1 file changed

Lines changed: 70 additions & 0 deletions

File tree

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

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,76 @@ Audit it anytime:
186186
npx shipnode doctor --security
187187
```
188188

189+
## Troubleshooting
190+
191+
### `Permission denied (publickey)` on any command
192+
193+
The SSH connection is failing before shipnode does anything. Confirm you can connect manually with the same host and user from your config:
194+
195+
```bash
196+
ssh root@203.0.113.10
197+
```
198+
199+
If that prompts for a password or fails, your public key isn't in the server's `~/.ssh/authorized_keys`. Fix that first.
200+
201+
### `dig` returns no IP / wrong IP
202+
203+
Your A record hasn't propagated yet, or it points somewhere else. Wait a few minutes and retry. With Cloudflare, turn the proxy (orange cloud) off until Caddy has issued the certificate — the HTTP-01 challenge needs a direct connection to your server on port 80.
204+
205+
### Caddy can't issue an HTTPS certificate
206+
207+
Caddy needs ports **80 and 443 reachable from the public internet** to complete the ACME challenge. Common causes:
208+
209+
- Hosting firewall blocks 80/443 (check your provider's security group / network rules).
210+
- UFW is enabled and didn't allow web traffic — `shipnode harden` opens 80 and 443 automatically, but a manual UFW config might not.
211+
- Cloudflare proxy is on and rewriting the challenge. Toggle it off, deploy, then turn it back on.
212+
213+
Inspect Caddy logs on the server:
214+
215+
```bash
216+
sudo journalctl -u caddy -n 100 --no-pager
217+
```
218+
219+
### Health check fails after deploy
220+
221+
The release was discarded and the symlink stayed on the previous one — your app isn't healthy. Run:
222+
223+
```bash
224+
npx shipnode logs
225+
```
226+
227+
Most common reasons:
228+
229+
- The `healthCheck` path in `shipnode.config.ts` doesn't exist in your app (404).
230+
- The app didn't bind to the port from `.port(...)`.
231+
- A required env var isn't set — re-check `npx shipnode env --file .env.production`.
232+
233+
### `Deploy is locked` even though nothing is running
234+
235+
A previous deploy was killed mid-flight and left a stale lock at `<deployPath>/.shipnode/deploy.lock`. After confirming nothing is actually deploying:
236+
237+
```bash
238+
npx shipnode unlock
239+
```
240+
241+
### Node version mismatch / build fails on the server
242+
243+
`shipnode setup` installs Node via mise based on `nodeVersion` in your config. If you bumped that field after running setup, re-run it:
244+
245+
```bash
246+
npx shipnode setup
247+
```
248+
249+
### Pre-flight check before anything else
250+
251+
When in doubt:
252+
253+
```bash
254+
npx shipnode doctor
255+
```
256+
257+
It validates the config, SSH, sudo, Node, PM2, Caddy, disk space, and the live domain. Fix what it flags before running `deploy`.
258+
189259
## What's next
190260

191261
- [shipnode.config.ts reference](/docs/configuration/) — every method, every option

0 commit comments

Comments
 (0)