Server Integrations Setup
Installing and configuring Tailscale, the Minecraft server, and Pl3xMap on the production server.
Optional services that extend dashboard functionality. Configure only what you need - the app degrades gracefully when any of these are absent.
Tailscale (Network Tab)
The Network tab shows all devices on the club's shared Tailscale network and surfaces join requests from members.
Install Tailscale on the server
$ curl -fsSL https://tailscale.com/install.sh | sh
$ sudo tailscale upFollow the login URL printed by tailscale up to authenticate with the club Tailscale account.
Generate an API key for the dashboard
- Tailscale admin console → Settings → Keys → Generate access token
- Give it a description (e.g.
dashboard) and set an expiry - Add to
.env.production:
$ TAILSCALE_API_KEY=<paste here>
$ TAILSCALE_TAILNET=-Restart the dashboard to pick up the new values:
$ sudo systemctl restart trickfire-dashboardNote
TAILSCALE_TAILNET=- is a special value meaning "the tailnet that owns this API key". You can
also use your tailnet name explicitly (e.g. trickfirerobotics.com).
Danger
The key is shown once. If it leaks, rotate it immediately in the Tailscale admin console and
update .env.production.
Connect other devices
On any device you want on the network:
$ sudo tailscale upLog in with the club Tailscale account. The device will appear in the Tailscale admin console and in the dashboard Network tab.
Quick reference
| Task | Command / Location |
|---|---|
| Check status | tailscale status |
| Get device IP | tailscale ip |
| List devices | Tailscale admin console → Machines |
| Remove a device | Tailscale admin console → Machines → … → Remove |
| Rotate API key | Tailscale admin console → Settings → Keys |
| View logs | journalctl -u tailscaled -f |
OnShape Simulation Export Proxy
/api/sim/export lets external tooling - notably our simulation software - pull a OnShape model through the dashboard's own OnShape credentials and get back a generated simulation asset archive, without every script needing its own OnShape API keys. Callers authenticate with the club's current 6-digit sim access code, read off the dashboard's API Keys page and sent as an X-Access-Code header (see Security for how it rotates). See External Integrations for how the export/cache/streaming code itself works.
Generated archives are cached on disk under SIM_CACHE_DIR (default /var/cache/trickfire-sim). The Next.js server runs as the trickfire user, but /var/cache/ itself is root-owned, so the process can't create its own subdirectory there. Create it and hand ownership to trickfire before starting the server:
$ sudo mkdir -p /var/cache/trickfire-sim
$ sudo chown trickfire: /var/cache/trickfire-simWarning
Without this, export requests fail with a 500 EACCES: permission denied, mkdir '/var/cache/trickfire-sim'.
Minecraft Server
The Minecraft server runs as an independent systemd service managed by Azalea. The dashboard can start and stop it, stream its logs, and send console commands via RCON - without the server depending on the dashboard process.
Install Azalea
Azalea requires Python 3.9+. Ubuntu 20.04 ships Python 3.8, so install 3.9 first if needed:
$ sudo apt-get install -y python3.9 python3.9-venv
$ python3.9 -m pip install --user git+https://github.com/matejstastny/azalea.git
$ sudo ln -sf /home/trickfire/.local/bin/azalea /usr/local/bin/azalea
$ azalea --versionCreate the systemd service
Create /etc/systemd/system/minecraft.service:
[Unit]
Description=Minecraft Server
After=network.target
[Service]
Type=simple
User=trickfire
WorkingDirectory=/home/trickfire/minecraft
ExecStart=/usr/local/bin/azalea server run
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target$ sudo systemctl daemon-reload
$ sudo systemctl enable minecraft # enable but don't start - the dashboard controls thatConfigure RCON
The dashboard sends console commands to the server via RCON. Enable it in /home/trickfire/minecraft/server.properties:
enable-rcon=true
rcon.port=25575
rcon.password=<openssl rand -hex 16>Note
The Minecraft server must be restarted after changing server.properties for RCON to take
effect.
Environment variables
Add these to .env.production:
$ MINECRAFT_SERVER_HOST=localhost
$ MINECRAFT_SERVER_PORT=25565
$ MINECRAFT_SERVER_PATH=/home/trickfire/minecraft
$ MINECRAFT_WORLD_PATH=/home/trickfire/minecraft/world
$ MINECRAFT_RCON_PORT=25575
$ MINECRAFT_RCON_PASSWORD=<same password as server.properties>
$ MINECRAFT_BOT_SKIN_URL=https://your-skin-host/bot.pngBot names aren't configured here - they're detected automatically from a Minecraft scoreboard team named bots via RCON (see External Integrations). MINECRAFT_BOT_SKIN_URL only controls what skin those detected bots render with on the dashboard.
Restart the dashboard to pick up the new values:
$ sudo systemctl restart trickfire-dashboardTroubleshooting
Verify MINECRAFT_SERVER_HOST and MINECRAFT_SERVER_PORT are correct in .env.production
and that the dashboard server can reach the Minecraft server on the LAN. The status check
fails gracefully to "offline" - it's not a crash.
Pl3xMap (World Map)
The Minecraft page embeds the Pl3xMap world map. The dashboard proxies it at /pl3xmap so it's accessible via the dashboard URL without exposing Pl3xMap's port publicly.
Install Pl3xMap
Pl3xMap is a server-side Minecraft mod. Follow the official Pl3xMap docs for your server type (Fabric, Paper, etc.). Its internal web server runs on port 8080 by default.
Configure the dashboard
Add to .env.production:
# If Pl3xMap runs on the same machine as the dashboard:
$ PL3XMAP_URL=http://localhost:8080
# If Pl3xMap runs on a separate machine:
$ PL3XMAP_URL=http://<minecraft-server-ip>:8080Restart: sudo systemctl restart trickfire-dashboard
Warning
Port 8080 must not be open to the internet. The dashboard is the only entry point. If
Pl3xMap is on a separate server, the dashboard host needs LAN access to port 8080 on that
machine.
Troubleshooting
- Confirm Pl3xMap is running:
curl http://<pl3xmap-host>:8080should return HTML. - Check
PL3XMAP_URLin.env.productionpoints to the correct host and port, and the dashboard server can reach it on the LAN. - Restart after any env change:
sudo systemctl restart trickfire-dashboard - If the map loads but tiles are empty, Pl3xMap may still be rendering the world - check its logs on the Minecraft server.