Skip to content

Commit 6f00924

Browse files
committed
docs(readme): simplify and add sequence diagram
1 parent 8c516f7 commit 6f00924

1 file changed

Lines changed: 58 additions & 139 deletions

File tree

README.md

Lines changed: 58 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -1,184 +1,103 @@
1-
# SlimeVR Server + Web GUI (Docker)
1+
# SlimeVR Docker
22

3-
![Stars](https://img.shields.io/github/stars/madkoding/docker-slimevr-web-server)
4-
![Forks](https://img.shields.io/github/forks/madkoding/docker-slimevr-web-server)
5-
[![Publish Status](https://github.com/madkoding/docker-slimevr-web-server/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/madkoding/docker-slimevr-web-server/actions/workflows/docker-publish.yml)
6-
![Docker Pulls](https://img.shields.io/docker/pulls/madkoding/slimevr-web-server)
3+
Run [SlimeVR Server](https://github.com/SlimeVR/SlimeVR-Server) + Web GUI in Docker.
74

8-
Run [SlimeVR Server](https://github.com/SlimeVR/SlimeVR-Server) and its Web GUI in Docker with a setup that works across Linux, macOS, and Windows, plus an optimized Linux hotplug mode for direct USB tracker usage.
9-
10-
## Quick Start (Linux)
11-
12-
1. Install Docker + Compose (`docker compose version` should work).
13-
2. Run:
5+
## Quick Start
146

157
```bash
16-
./slimevrctl up
17-
```
18-
19-
3. Open:
20-
21-
```text
22-
http://localhost:8080
8+
docker compose up -d --build
9+
open http://localhost:8080
2310
```
2411

2512
Stop:
26-
2713
```bash
28-
./slimevrctl down
14+
docker compose down
2915
```
3016

31-
This repo defaults to Linux USB hotplug mode, so no extra `-f ...` flags are needed.
32-
33-
Optional commands:
34-
35-
```bash
36-
./slimevrctl status
37-
./slimevrctl logs
38-
./slimevrctl restart
39-
./slimevrctl doctor
17+
## What it does
18+
19+
```mermaid
20+
sequenceDiagram
21+
participant User
22+
participant Nginx
23+
participant SlimeVR
24+
participant Tracker
25+
26+
Note over SlimeVR: Starts, downloads latest version<br/>from GitHub automatically
27+
SlimeVR->>Tracker: Detect trackers via USB/HID
28+
SlimeVR->>Nginx: Copy GUI to /gui_mount
29+
User->>Nginx: GET /:8080
30+
Nginx-->>User: 302 → /?ip=<host_ip>
31+
User->>Nginx: GET /?ip=<host_ip>
32+
Nginx->>User: Serve SlimeVR Web GUI
33+
User->>SlimeVR: WebSocket connections
34+
Tracker->>SlimeVR: Tracking data (port 6969)
4035
```
4136

42-
## Features
43-
44-
- Auto-downloads `slimevr.jar` and `slimevr-gui-dist.tar.gz` from official releases
45-
- Single `.env` configuration for version and Web GUI port
46-
- Nginx-served Web GUI with automatic `?ip=` redirect
47-
- Cross-platform default compose profile (Docker Desktop friendly)
48-
- Linux override profile for stable USB/HID hotplug behavior
49-
50-
## Project Structure
51-
52-
```text
53-
.
54-
|- .env
55-
|- docker-compose.yml
56-
|- docker-compose.linux.yml
57-
|- nginx/
58-
| |- Dockerfile
59-
| |- entrypoint.sh
60-
| \- templates/
61-
| \- default.conf.template
62-
\- slimevr/
63-
\- Dockerfile
64-
```
37+
## Architecture
6538

66-
## Requirements
39+
| Container | Purpose | Network |
40+
|-----------|---------|---------|
41+
| `slimevr` | Java server + tracker comms | host |
42+
| `nginx` | Serves Web GUI | host |
6743

68-
- Docker Engine 24+ (or Docker Desktop)
69-
- Docker Compose v2 (`docker compose`)
44+
- **slimevr**: Downloads latest SlimeVR from GitHub, copies GUI to volume
45+
- **nginx**: Serves GUI, auto-redirects with `?ip=` parameter for WebSocket connection
7046

7147
## Configuration
7248

73-
Edit `.env`:
49+
Create `.env` if you need custom values (all optional):
7450

7551
```env
76-
SLIMEVR_VERSION=19.0.0-rc.1
7752
WEBGUI_PORT=8080
78-
COMPOSE_FILE=docker-compose.linux.yml
79-
```
80-
81-
`COMPOSE_FILE` selects which compose file is used by default.
82-
83-
> On Linux, keep this enabled for direct USB tracker access.
84-
> On macOS/Windows, change it to `COMPOSE_FILE=docker-compose.yml`.
85-
86-
## Run
87-
88-
### Option A: Cross-platform default (Linux/macOS/Windows)
89-
90-
```bash
91-
COMPOSE_FILE=docker-compose.yml docker compose up -d
53+
SLIMEVR_VERSION=latest
9254
```
9355

94-
Or set it in `.env` and run:
95-
96-
```bash
97-
docker compose up -d
98-
```
99-
100-
This mode uses explicit port mappings and is the recommended default for Docker Desktop users.
101-
102-
### Option B: Linux USB hotplug mode (recommended for direct USB trackers)
103-
104-
```bash
105-
docker compose -f docker-compose.linux.yml up -d
106-
```
107-
108-
This mode enables host networking and mounts `/dev` + `/run/udev` for resilient USB/HID reattach behavior.
109-
110-
## Access the Web GUI
111-
112-
Open:
113-
114-
```text
115-
http://<HOST_IP>:<WEBGUI_PORT>/
116-
```
117-
118-
The GUI auto-redirects to:
119-
120-
```text
121-
http://<HOST_IP>:<WEBGUI_PORT>/?ip=<HOST_IP>
122-
```
123-
124-
## Ports
125-
126-
| Service | Port(s) | Protocol |
127-
|---|---|---|
128-
| SlimeVR Trackers | 6969 | UDP |
129-
| Web GUI | `WEBGUI_PORT` | TCP |
130-
| WebSocket Bridge | 21110 | TCP |
131-
| OSC Router | 9000, 9002 | TCP/UDP |
132-
| VRC OSC | 9000, 9001 | TCP/UDP |
133-
| VMC | 39539, 39540 | TCP/UDP |
134-
| Legacy Discovery | 4768 | UDP |
56+
Without `.env`, defaults are used (port `8080`, latest version).
13557

13658
## Volumes
13759

138-
- `slimevr-config`: persistent SlimeVR config (`vrconfig.yml`)
139-
- `slimevr-gui`: GUI static assets shared between app and Nginx
60+
| Volume | Purpose |
61+
|--------|---------|
62+
| `slimevr-config` | Persists `vrconfig.yml` |
63+
| `slimevr-gui` | GUI assets (slimevr → nginx) |
14064

141-
## Troubleshooting
65+
## Ports
14266

143-
- `ERR_TOO_MANY_REDIRECTS`: ensure redirect is only applied when `?ip=` is missing.
144-
- Nginx error `server directive is not allowed here`: do not replace `nginx.conf` with a `server {}` block; use `conf.d/default.conf`.
145-
- Linux USB not detected: run with `docker-compose.linux.yml` (hotplug mode).
146-
- Seeing `Welcome to nginx!` on `:8080`: rebuild/restart with `./slimevrctl restart` to apply the GUI root config.
147-
- macOS/Windows USB passthrough: Docker Desktop does not expose raw USB devices to Linux containers like native Linux does. For direct USB trackers, use Linux (native/VM/WSL2 with USB/IP).
148-
- Port already in use (`6969` or `21110`): stop conflicting processes or containers.
67+
| Port | Protocol | Purpose |
68+
|------|----------|---------|
69+
| 6969 | UDP | Tracker data |
70+
| 8080 | TCP | Web GUI |
71+
| 21110 | TCP | WebSocket VR Bridge |
72+
| 9000-9002 | TCP/UDP | OSC |
73+
| 39539-39540 | TCP/UDP | VMC |
14974

150-
Check conflicts:
75+
## Update
15176

15277
```bash
153-
sudo ss -ltnup | grep -E '(:6969|:21110)'
78+
docker compose up -d --build
15479
```
15580

156-
## Update
81+
Always downloads latest unless you set `SLIMEVR_VERSION` in `.env`.
15782

158-
To update SlimeVR, set a new `SLIMEVR_VERSION` in `.env` and recreate:
83+
## Troubleshooting
15984

16085
```bash
161-
docker compose up -d --build
162-
```
86+
# Check status
87+
docker compose ps
16388

164-
For Linux hotplug mode:
89+
# View logs
90+
docker compose logs -f
16591

166-
```bash
167-
docker compose -f docker-compose.linux.yml up -d --build
92+
# Full diagnostics
93+
./slimevrctl doctor
16894
```
16995

17096
## Credits
17197

17298
- [SlimeVR](https://slimevr.dev/)
173-
- Web GUI assets from the official [SlimeVR releases](https://github.com/SlimeVR/SlimeVR-Server/releases)
99+
- GUI from official [SlimeVR releases](https://github.com/SlimeVR/SlimeVR-Server/releases)
174100

175101
## License
176102

177-
MIT
178-
179-
## Donations
180-
181-
BTC: `bc1qrd3mexqu43qn0597d248725kdp3tr28252q64p`
182-
183-
<!-- AUTO-UPDATE-DATE -->
184-
**Last updated:** 2026-04-04
103+
MIT

0 commit comments

Comments
 (0)