Initial project setup for FreeTAKServer & FreeTAKHub deployment

This commit is contained in:
dev
2026-05-03 14:09:14 +02:00
commit 4d84816da2
5 changed files with 244 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
# FreeTAKServer Security Configuration
FTS_FED_PASSWORD=changeme_federation_password
FTS_CLIENT_CERT_PASSWORD=changeme_cert_password
FTS_WEBSOCKET_KEY=changeme_websocket_key
FTS_SECRET_KEY=changeme_secret_key_$(openssl rand -hex 16)
# Server Configuration
FTS_IP=192.168.0.152
FTS_CONNECTION_MESSAGE=Welcome to TacAware FreeTAKServer
FTS_LOG_LEVEL=info
# API Configuration
FTS_API_KEY=Bearer your_api_token_here
+12
View File
@@ -0,0 +1,12 @@
# Environment files with secrets
.env
# Docker volumes data
**/data/
**/*.db
**/logs/
# Temporary files
*.tmp
*.log
.DS_Store
+99
View File
@@ -0,0 +1,99 @@
# TacAware - FreeTAKServer & FreeTAKHub Deployment
This project deploys FreeTAKServer and FreeTAKHub components using Docker Compose to a Proxmox container.
## Architecture
- **FreeTAKServer**: Core TAK server implementation
- **FreeTAKServer-UI**: Web interface for server management
- **Target**: Proxmox container 111 on askaban (192.168.0.152)
## Prerequisites
- Proxmox host with container 111 running Docker
- SSH access to askaban (192.168.0.152)
- Docker and docker-compose in container 111
## Quick Start
1. **Clone the repository**
```bash
git clone git@git.homelab.lukasbenner.de:Lukas/tac-aware.git
cd tac-aware
```
2. **Configure environment**
```bash
cp .env.example .env
# Edit .env with your settings
nano .env
```
3. **Deploy to container 111**
```bash
chmod +x deploy.sh
./deploy.sh
```
## Services
| Service | Port | Description |
|---------|------|-------------|
| FreeTAKServer | 8080 | Data Package Port |
| FreeTAKServer | 8087 | CoT Port (TCP) |
| FreeTAKServer | 8089 | SSL CoT Port |
| FreeTAKServer | 8443 | SSL Data Package Port |
| FreeTAKServer | 9000 | Federation Port |
| FreeTAKServer | 19023 | API Port |
| FreeTAKServer-UI | 5000 | Web Interface |
## Management
### On container 111 (via Proxmox host):
```bash
# SSH to container
ssh root@192.168.0.152
pct enter 111
# Or execute directly
ssh root@192.168.0.152 "pct exec 111 -- docker ps"
ssh root@192.168.0.152 "pct exec 111 -- docker compose -f /root/tac-aware/docker-compose.yml logs -f"
```
### View logs:
```bash
ssh root@192.168.0.152 "pct exec 111 -- docker logs freetakserver"
ssh root@192.168.0.152 "pct exec 111 -- docker logs freetakserver-ui"
```
### Stop services:
```bash
ssh root@192.168.0.152 "pct exec 111 -- docker compose -f /root/tac-aware/docker-compose.yml down"
```
## Development Workflow
1. Make changes to configuration/files
2. Commit and push to repo:
```bash
git add .
git commit -m "Update configuration"
git push origin main
```
3. Deploy changes:
```bash
./deploy.sh
```
## Security Notes
- Change all default passwords in `.env`
- Use strong passwords for FTS_FED_PASSWORD and FTS_CLIENT_CERT_PASSWORD
- Consider using SSL/TLS for production deployments
- Review port exposure - some ports may not need external access
## Links
- [FreeTAKServer Documentation](https://freetakteam.github.io/FreeTAKServer-User-Docs/)
- [FreeTAKTeam GitHub](https://github.com/FreeTAKTeam)
- [Repository](https://git.homelab.lukasbenner.de/Lukas/tac-aware)
Executable
+46
View File
@@ -0,0 +1,46 @@
#!/bin/bash
# Deploy FreeTAKServer to Proxmox container 111 on askaban
set -e
ASKABAN_IP="192.168.0.152"
CONTAINER_ID="111"
REMOTE_DIR="/root/tac-aware"
echo "=== TacAware FreeTAKServer Deployment ==="
echo "Target: ${ASKABAN_IP}, Container: ${CONTAINER_ID}"
echo
# Check if .env exists
if [ ! -f .env ]; then
echo "Warning: .env file not found. Creating from .env.example..."
cp .env.example .env
echo "Please edit .env with your settings before deploying."
exit 1
fi
# Copy files to container 111 on askaban
echo "Copying files to container ${CONTAINER_ID}..."
ssh root@${ASKABAN_IP} "pct exec ${CONTAINER_ID} -- mkdir -p ${REMOTE_DIR}"
# Use rsync or scp to copy files
rsync -avz --exclude='.git' --exclude='node_modules' \
./ root@${ASKABAN_IP}:/tmp/tac-aware-deploy/
ssh root@${ASKABAN_IP} "pct push ${CONTAINER_ID} /tmp/tac-aware-deploy ${REMOTE_DIR} --perms --repeat"
# Deploy on container
echo "Starting deployment in container..."
ssh root@${ASKABAN_IP} << EOF
pct exec ${CONTAINER_ID} -- bash -c "cd ${REMOTE_DIR} && \
docker compose down && \
docker compose pull && \
docker compose up -d && \
echo '=== Containers Status ===' && \
docker ps"
EOF
echo
echo "Deployment complete!"
echo "FreeTAKServer UI should be available at: http://${FTS_IP:-192.168.0.152}:5000"
echo "FreeTAKServer ports: 8080, 8087, 8089, 8443, 9000, 19023"
+74
View File
@@ -0,0 +1,74 @@
services:
freetakserver:
image: ghcr.io/freetakteam/freetakserver:latest
hostname: freetakserver
restart: unless-stopped
networks:
- taknet
volumes:
- fts-data:/opt/fts/
ports:
- 8080:8080 # DataPackagePort
- 8087:8087 # CoTPort
- 8089:8089 # SSLCoTPort
- 8443:8443 # SSLDataPackagePort
- 9000:9000 # FederationPort
- 19023:19023 # APIPort
environment:
# Security - CHANGE THESE IN .env FILE
FTS_FED_PASSWORD: "${FTS_FED_PASSWORD:-defaultpass}"
FTS_CLIENT_CERT_PASSWORD: "${FTS_CLIENT_CERT_PASSWORD:-supersecret}"
FTS_WEBSOCKET_KEY: "${FTS_WEBSOCKET_KEY:-YourWebsocketKey}"
FTS_SECRET_KEY: "${FTS_SECRET_KEY:-vnkdjnfjknfl1232#}"
FTS_CONNECTION_MESSAGE: "${FTS_CONNECTION_MESSAGE:-Welcome to FreeTAKServer}"
# Networking
FTS_COT_PORT: 8087
FTS_SSLCOT_PORT: 8089
FTS_API_PORT: 19023
FTS_FED_PORT: 9000
FTS_DP_ADDRESS: 'freetakserver'
FTS_USER_ADDRESS: 'freetakserver'
FTS_API_ADDRESS: 'freetakserver'
# Performance
FTS_OPTIMIZE_API: True
FTS_DATA_RECEPTION_BUFFER: 1024
FTS_MAX_RECEPTION_TIME: 4
FTS_NUM_ROUTING_WORKERS: 3
FTS_MAINLOOP_DELAY: 100
FTS_COT_TO_DB: True
FTS_EMERGENCY_RADIUS: 0
FTS_LOG_LEVEL: "${FTS_LOG_LEVEL:-info}"
freetakserver-ui:
image: ghcr.io/freetakteam/ui:latest
hostname: freetakserver-ui
restart: unless-stopped
networks:
- taknet
ports:
- 5000:5000
volumes:
- fts-ui-data:/home/freetak/
environment:
FTS_IP: "${FTS_IP:-localhost}"
FTS_API_PORT: 19023
FTS_API_PROTO: 'http'
FTS_UI_EXPOSED_IP: 'freetakserver-ui'
FTS_MAP_EXPOSED_IP: '127.0.0.1'
FTS_MAP_PORT: 8000
FTS_MAP_PROTO: 'http'
FTS_UI_PORT: 5000
FTS_UI_WSKEY: "${FTS_WEBSOCKET_KEY:-YourWebsocketKey}"
FTS_API_KEY: "${FTS_API_KEY:-Bearer token}"
FTS_UI_SQLALCHEMY_DATABASE_URI: 'sqlite:////home/freetak/FTSServer-UI.db'
volumes:
fts-data:
fts-ui-data:
networks:
taknet:
driver: bridge