Skip to content

Commit 836e892

Browse files
committed
Update installation instructions and troubleshooting guide for clarity and fallback options
1 parent 2e0e51a commit 836e892

File tree

4 files changed

+57
-4
lines changed

4 files changed

+57
-4
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,19 @@ devbox focuses on fast, disposable, Docker-native development environments with
3333
## Installation
3434

3535
```bash
36-
# Using the install script
36+
# Using the install script (primary)
37+
curl -fsSL https://raw.githubusercontent.com/itzcozi/devbox/main/install.sh | bash
38+
39+
# Mirror (CDN)
3740
curl -fsSL https://devbox.ar0.eu/install.sh | bash
3841
# Or manually: https://devbox.ar0.eu/docs/install/#manual-build-from-source
3942
```
4043

41-
Note: devbox supports Linux environments only (Debian/Ubuntu). On Windows, use WSL2 with an Ubuntu distribution.
44+
Notes:
45+
- Some managed shell environments (e.g., AWS CloudShell) may block or challenge CDN traffic, resulting in HTTP 403 when hitting the mirror. Use the primary GitHub Raw URL above in those environments.
46+
- devbox supports Linux environments only (Debian/Ubuntu). On Windows, use WSL2 with an Ubuntu distribution.
47+
48+
4249

4350
## Quick Start
4451

docs/functions/install.sh.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ export async function onRequest(context) {
3131
return new Response(upstream.body, { status: 200, headers: respHeaders });
3232
}
3333

34-
return new Response('Failed to fetch install script', { status: 502 });
34+
// Fallback: redirect client to fetch directly from GitHub raw if proxying fails
35+
return Response.redirect(upstreamUrl, 302);
3536
} catch (err) {
36-
return new Response('Failed to fetch install script', { status: 502 });
37+
// Network error fetching from upstream; try redirecting the client
38+
return Response.redirect(upstreamUrl, 302);
3739
}
3840
}

docs/src/content/docs/docs/install.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@ description: How to install devbox on your Debian/Ubuntu system
44
---
55

66
```bash
7+
# Primary (recommended)
8+
curl -fsSL https://raw.githubusercontent.com/itzcozi/devbox/main/install.sh | bash
9+
10+
# Mirror (CDN)
711
curl -fsSL https://devbox.ar0.eu/install.sh | bash
812
```
913

14+
If you encounter a 403 when using the mirror (common in some managed shells like AWS CloudShell), use the primary GitHub Raw URL instead.
15+
1016
This script will automatically:
1117
- Check system compatibility (Debian/Ubuntu only)
1218
- Install Go, Docker, make, and git if needed

docs/src/content/docs/docs/troubleshooting.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,44 @@ Common issues and quick fixes.
88
## Installation Issues
99
---
1010

11+
##### "403 Forbidden" when running install script
12+
13+
**Problem**: Running `curl -fsSL https://devbox.ar0.eu/install.sh | bash` returns 403 (often in managed shells like AWS CloudShell).
14+
15+
**Explanation**: Some environments block or challenge CDN traffic. Our mirror uses a CDN and may be affected. We've added a server-side fallback to redirect to GitHub Raw, but certain environments still enforce restrictions.
16+
17+
**Solutions**:
18+
```bash
19+
# Use the primary GitHub Raw URL
20+
curl -fsSL https://raw.githubusercontent.com/itzcozi/devbox/main/install.sh | bash
21+
22+
# Or download and run locally
23+
curl -fsSL -o install.sh https://raw.githubusercontent.com/itzcozi/devbox/main/install.sh
24+
bash install.sh
25+
```
26+
27+
##### Amazon Linux 2023
28+
29+
**Problem**: The install script reports an unsupported OS on Amazon Linux 2023.
30+
31+
**Explanation**: devbox officially supports Debian/Ubuntu. Amazon Linux 2023 (AL2023) is Fedora-like and uses `dnf` instead of `apt`.
32+
33+
**Workaround (manual)**:
34+
```bash
35+
# Install deps (rough equivalent)
36+
sudo dnf install -y git make golang docker
37+
sudo systemctl enable --now docker
38+
sudo usermod -aG docker $USER
39+
40+
# Build and install devbox
41+
git clone https://github.com/itzcozi/devbox.git
42+
cd devbox
43+
make build
44+
sudo make install
45+
```
46+
47+
> Note: We may add broader distro support in the future; contributions welcome.
48+
1149
##### "Command not found: devbox"
1250

1351
**Problem**: After installation, `devbox` command is not recognized.

0 commit comments

Comments
 (0)