Skip to content

FoundryVTT

Overview

Foundry Virtual Tabletop (FoundryVTT) is a self-hosted virtual tabletop platform for running tabletop roleplaying games online.

Architecture

graph LR
    subgraph External
        Players[Players/DM]
        CF[Cloudflare Tunnel]
    end

    subgraph Kubernetes
        subgraph foundryvtt namespace
            VTT[FoundryVTT Server]
            Data[(Game Data)]
        end
    end

    Players --> CF
    CF --> VTT
    VTT --> Data

Components

FoundryVTT Server

Property Value
Image felddy/foundryvtt:release
Port 30000
URL dnd.ajandrews.pro

Deployment

Kubernetes Resources

apiVersion: apps/v1
kind: Deployment
metadata:
  name: foundryvtt
  namespace: foundryvtt
spec:
  replicas: 1
  template:
    spec:
      containers:
      - name: foundryvtt
        image: felddy/foundryvtt:release
        ports:
        - containerPort: 30000
          name: http
        volumeMounts:
        - name: data
          mountPath: /data
        resources:
          requests:
            memory: "256Mi"
            cpu: "100m"
          limits:
            memory: "1Gi"
            cpu: "500m"

Service Configuration

apiVersion: v1
kind: Service
metadata:
  name: foundryvtt
  namespace: foundryvtt
spec:
  type: ClusterIP
  ports:
    - port: 80
      targetPort: 30000
      name: http
  selector:
    app: foundryvtt

Features

Game Systems

FoundryVTT supports multiple game systems:

  • D&D 5th Edition
  • Pathfinder 2e
  • Call of Cthulhu
  • Many more via modules

Key Features

Feature Description
Dynamic Lighting Real-time fog of war
Audio/Video Integrated A/V chat
Modules Extensive module ecosystem
Scenes Beautiful battle maps
Actors Character sheet management

Storage

Persistent Volume

Property Value
Size 20Gi
Storage Class longhorn
Mount Path /data

Data Structure

/data/
├── Config/
│   └── options.json
├── Data/
│   ├── systems/
│   ├── modules/
│   └── worlds/
└── Logs/

Configuration

Environment Variables

Variable Description
FOUNDRY_LICENSE_KEY License key (secret)
FOUNDRY_USERNAME Foundry account username
FOUNDRY_PASSWORD Foundry account password
FOUNDRY_ADMIN_KEY Admin password for setup

Cloudflare Tunnel

- hostname: dnd.ajandrews.pro
  service: http://foundryvtt.foundryvtt.svc:80

Performance

Resource Usage

Metric Typical Value
CPU 2-50m (idle to active)
Memory 150-300Mi
Latency ~100-150ms

Optimization Tips

  1. Compress Images - Use WebP format for maps
  2. Limit Modules - Only enable needed modules
  3. Scene Preloading - Preload upcoming scenes
  4. Audio Compression - Use compressed audio files

Administration

Access Setup

  1. Navigate to dnd.ajandrews.pro/setup
  2. Enter admin password
  3. Configure game worlds

Backup Strategy

# Manual backup
kubectl exec -n foundryvtt deployment/foundryvtt -- tar -czf /tmp/backup.tar.gz /data

# Copy to local
kubectl cp foundryvtt/foundryvtt-xxx:/tmp/backup.tar.gz ./foundry-backup.tar.gz

Troubleshooting

Common Issues

Issue Cause Resolution
License error Container restart Re-enter license in setup
Slow loading Large assets Optimize images/audio
Players can't connect Cloudflare config Check tunnel status
Module conflicts Version mismatch Update core and modules

Logs

# View application logs
kubectl logs -n foundryvtt deployment/foundryvtt -f

# Check for errors
kubectl logs -n foundryvtt deployment/foundryvtt | grep -i error

Updates

Update Process

  1. Check Foundry website for new version
  2. Backup world data
  3. Update container image tag
  4. Restart deployment
  5. Verify worlds load correctly
# Update to specific version
kubectl set image deployment/foundryvtt -n foundryvtt \
  foundryvtt=felddy/foundryvtt:11.315

# Or use latest
kubectl rollout restart deployment/foundryvtt -n foundryvtt