Euphoria DevelopmentEuphoria Development Docs

Deployment Options

  • Hosted: use https://nitrocraft.uk directly.
  • Self-hosted: run locally with pnpm workflows, Docker Compose, or your own orchestration.

For route and parameter details, use NitroCraft API Docs.

Local Development

Recommended local workflow from repository scripts:

corepack enable
nvm use
pnpm install
pnpm dev

Additional scripts:

pnpm test
pnpm lint

Build and Run Production Output

pnpm build
pnpm start

This runs the built Nitro output for production-style testing.

Docker Quick Start

cp .env.example .env
docker compose up -d

Useful follow-up:

docker compose logs -f

Render endpoints require native canvas dependencies in the runtime image/environment.

Key Environment Values

  • CACHE_BACKEND: redis, memory, or none.
  • REDIS_URL: Redis connection string when using Redis backend.
  • SESSIONS_RATE_LIMIT: outbound Mojang session request limit.
  • REQUESTS_RATE_LIMIT and related window/key/trust options for inbound limiting.
  • STATUS_ALLOW_PRIVATE_TARGETS: allow/disallow private target checks in status routes.
  • STATUS_BROWSER_* values: browser probe limits, source timeouts, and source feeds.
  • PORT, BIND, EXTERNAL_URL: network/runtime settings.
  • CORS_ORIGIN: CORS policy for browser integrations.
  • RETENTION_*: cleanup retention and interval controls.

Pterodactyl and Release Automation

  • Pterodactyl egg: egg-nitrocraft.json
  • Docker Hub workflow: .github/workflows/docker-publish.yml
  • Release artifact workflow: .github/workflows/build-release.yml

Docker Hub workflow supports branch pushes, semantic version tags, schedule, and manual dispatch.

Reverse Proxy Example (NGINX)

server {
  listen 443 ssl http2;
  server_name nitrocraft.example.com;

  location / {
    proxy_pass http://127.0.0.1:3000;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  }
}

Validation and Troubleshooting

curl -fsS https://nitrocraft.example.com/docs
curl -fsS https://nitrocraft.example.com/metrics
curl -fsS "https://nitrocraft.example.com/status/server?address=example.org&edition=auto"
  • If render routes fail, verify runtime has required native dependencies for canvas.
  • If status probes fail unexpectedly, check STATUS_ALLOW_PRIVATE_TARGETS and rate-limit settings.
  • If browser calls are blocked, verify CORS_ORIGIN and reverse proxy headers.
  • If Redis is unavailable, switch to memory backend and review fallback persistence settings.