Skip to main content

KALNET Quick Reference Card

๐Ÿš€ Tonightโ€™s MVP Checklist

# 1. Prepare
mkdir -p ~/kalnet && cd ~/kalnet
# Copy: docker-compose.yml, main.go, Dockerfile.discovery, samba-config.conf

# 2. Build
docker-compose build kalnet-discovery

# 3. Run
docker-compose up -d

# 4. Verify
docker-compose ps                          # All containers up?
curl http://localhost:8080/discover        # Services registered?

๐Ÿ“ Service Map

WhatWherePortUse
Jellyfin Webhttp://[HOST]:80968096Watch media
n8n Webhttp://[HOST]:56785678Build workflows
KALNET APIhttp://[HOST]:80808080Service discovery
Samba NASsmb://[HOST]/storage139/445File access
Replace [HOST] with your ArchLinux machineโ€™s IP (e.g., 192.168.1.100)

๐Ÿ” Discovery API Endpoints

Get all services

curl http://localhost:8080/discover | jq .

Check specific service status

curl http://localhost:8080/service/jellyfin | jq .
curl http://localhost:8080/service/n8n | jq .
curl http://localhost:8080/service/samba | jq .

Health check

curl http://localhost:8080/health

๐Ÿ› ๏ธ Emergency Commands

View logs

docker-compose logs -f                     # All services
docker-compose logs -f kallnet-jellyfin    # Just Jellyfin
docker-compose logs -f kalnet-discovery    # Just Discovery

Restart

docker-compose restart                     # Everything
docker-compose restart jellyfin            # Specific service

Stop/start

docker-compose down                        # Stop all
docker-compose up -d                       # Start all

Nuclear reset

docker-compose down -v                     # Stop + remove volumes (DATA LOSS!)

Check running processes

docker-compose ps
docker stats

Get shell in container

docker-compose exec kalnet-discovery sh
docker-compose exec kallnet-jellyfin sh

๐ŸŒ Network Troubleshooting

Find your machineโ€™s IP

hostname -I

Test from another device (replace IP)

curl http://192.168.1.100:8080/discover

Check if port is open

netstat -tlnp | grep 8096
# or
ss -tlnp | grep 8096

Open firewall ports (if needed)

sudo ufw allow 8096/tcp
sudo ufw allow 5678/tcp
sudo ufw allow 139/tcp
sudo ufw allow 445/tcp
sudo ufw allow 8080/tcp

๐Ÿ“Š Service Health Indicators

Discovery Service checks every 30 seconds. Status can be:
  • up - Service responding
  • down - Service not responding
  • unknown - Not checked yet
View current status:
curl http://localhost:8080/discover | jq '.services[] | {name, status}'

๐ŸŽฎ Samba Mount Examples

Mac

# Cmd+K in Finder, then:
smb://192.168.1.100/storage

Windows

\\192.168.1.100\storage

Linux

sudo mount -t cifs //192.168.1.100/storage /mnt/kalnet -o username=guest

๐Ÿ“ Configuration Files

  • docker-compose.yml - All services and networking
  • main.go - Discovery service source code
  • Dockerfile.discovery - Discovery service container build
  • samba-config.conf - NAS sharing configuration

๐Ÿ’พ Data Locations

Inside containers (mounted from host):
  • Jellyfin config: jellyfin-config volume
  • Jellyfin cache: jellyfin-cache volume
  • NAS storage: nas-storage volume
  • n8n data: n8n-data volume
To find on host machine:
docker volume ls                           # List all volumes
docker volume inspect kalnet_nas-storage   # See mount point

๐Ÿ”„ Development Loop

# Make changes to Go code
vi main.go

# Rebuild discovery service
docker-compose build kalnet-discovery

# Restart it
docker-compose restart kalnet-discovery

# Verify
curl http://localhost:8080/discover

๐Ÿ“– Full Documentation

See KALNET-DEPLOYMENT.md for:
  • Complete architecture diagram
  • Step-by-step setup guide
  • Service configuration details
  • Troubleshooting guide
  • Next steps beyond MVP

Status: MVP deployed โœ…
Next: Add reverse proxy, encryption, game streaming
Team: Kalex โค๏ธ