Files
IRC-kosmi-relay/docs/setup/QUICKSTART.md

131 lines
3.2 KiB
Markdown
Raw Normal View History

2025-10-31 16:17:04 -04:00
# Quick Start Guide
Get the Kosmi-IRC bridge running in minutes.
2025-10-31 16:17:04 -04:00
## Prerequisites
- Go 1.23 or higher
- Chrome/Chromium (only needed for email/password authentication)
- A Kosmi room URL
2025-10-31 16:17:04 -04:00
- (Optional) IRC server access for full relay
## Step 1: Build the Bridge
2025-10-31 16:17:04 -04:00
```bash
cd irc-kosmi-relay
2025-10-31 16:17:04 -04:00
# Download dependencies
go mod download
2025-10-31 16:17:04 -04:00
# Build
go build -o matterbridge .
2025-10-31 16:17:04 -04:00
```
## Step 2: Configure
2025-10-31 16:17:04 -04:00
Copy and edit the example configuration:
2025-10-31 16:17:04 -04:00
```bash
cp matterbridge.toml.example matterbridge.toml
nano matterbridge.toml
```
2025-10-31 16:17:04 -04:00
Update these values:
2025-10-31 16:17:04 -04:00
```toml
[kosmi.hyperspaceout]
RoomURL="https://app.kosmi.io/room/@YOUR_ROOM"
2025-10-31 16:17:04 -04:00
[irc.zeronode]
Server="irc.libera.chat:6697"
Nick="your-bot-nick"
UseTLS=true
2025-10-31 16:17:04 -04:00
[[gateway.inout]]
account="irc.zeronode"
channel="#your-channel"
2025-10-31 16:17:04 -04:00
```
**Important**: The Kosmi channel is always `"main"` (one channel per room). The IRC channel must include `#`.
2025-10-31 16:17:04 -04:00
### Optional: Authenticated Kosmi Access
2025-10-31 16:17:04 -04:00
To use a Kosmi account instead of anonymous access, add credentials:
2025-10-31 16:17:04 -04:00
```toml
[kosmi.hyperspaceout]
RoomURL="https://app.kosmi.io/room/@YOUR_ROOM"
Email="your-email@example.com"
Password="your-password"
2025-10-31 16:17:04 -04:00
```
This requires Chrome/Chromium for the initial browser-based login. The JWT is cached locally for subsequent runs.
2025-10-31 16:17:04 -04:00
## Step 3: Run
2025-10-31 16:17:04 -04:00
```bash
./matterbridge -conf matterbridge.toml
```
Or with debug logging:
2025-10-31 16:17:04 -04:00
```bash
./matterbridge -conf matterbridge.toml -debug
```
### Expected Output (Success)
2025-10-31 16:17:04 -04:00
```
INFO Running version ...
INFO Connecting to Kosmi
INFO Extracted room ID: @YOUR_ROOM
INFO No credentials provided, using anonymous access
INFO Successfully connected to Kosmi
INFO Connection succeeded (IRC)
INFO Gateway(s) started successfully. Now relaying messages
```
## Step 4: Test the Relay
1. **Kosmi --> IRC**: Send a message in your Kosmi room. It should appear in IRC as:
2025-10-31 16:17:04 -04:00
```
[kosmi] <username> your message here
2025-10-31 16:17:04 -04:00
```
2. **IRC --> Kosmi**: Send a message in your IRC channel. It should appear in Kosmi as:
2025-10-31 16:17:04 -04:00
```
[irc] <username> your message here
2025-10-31 16:17:04 -04:00
```
## Troubleshooting
### Kosmi connection fails
2025-10-31 16:17:04 -04:00
- Verify the room URL is correct (use the full URL from your browser)
- Check network connectivity: `curl -I https://app.kosmi.io`
- Run with `-debug` for detailed WebSocket connection logs
2025-10-31 16:17:04 -04:00
**Supported room URL formats:**
2025-10-31 16:17:04 -04:00
- `https://app.kosmi.io/room/@roomname`
- `https://app.kosmi.io/room/roomid`
### Authentication issues
2025-10-31 16:17:04 -04:00
- Verify Chrome/Chromium is installed: `which chromium chromium-browser google-chrome`
- Check credentials are correct by logging in manually at `app.kosmi.io`
- Delete the token cache to force a fresh login: `rm -f data/kosmi_token_cache.json`
- See [BROWSER_AUTH_GUIDE.md](BROWSER_AUTH_GUIDE.md) for detailed auth troubleshooting
2025-10-31 16:17:04 -04:00
### Messages not relaying
2025-10-31 16:17:04 -04:00
- Confirm both bridges are connected (look for success messages in logs)
- Verify channel names match in the gateway configuration
- Enable debug logging to trace message flow
2025-10-31 16:17:04 -04:00
## Next Steps
- [DOCKER_QUICKSTART.md](DOCKER_QUICKSTART.md) -- Deploy with Docker
- [JACKBOX_INTEGRATION.md](JACKBOX_INTEGRATION.md) -- Enable Jackbox Game Picker
- [IRC.md](../IRC.md) -- IRC commands and voting reference
- [MUTE_CONTROL.md](MUTE_CONTROL.md) -- Control Jackbox announcement muting