Quick Start (Docker)¶
This is the recommended way to run PoracleWeb.NET in production.
Not using Docker?
See the Standalone Setup guide for running PoracleWeb.NET directly — no Docker or .NET experience required.
1. Get the files¶
git clone https://github.com/PGAN-Dev/PoracleWeb.NET.git
cd PoracleWeb.NET
# Check out the newest release. Without this you are on whatever the default
# branch resolves to; a tag pins you to a released version.
git checkout "$(git describe --tags --abbrev=0)"
Or download and extract a release. Everything below runs from this root directory.
develop is the beta channel
develop receives every merged pull request and is published as the :beta Docker image. main only moves when a release is published. It is where changes soak before a release, so it can contain work that has never been in a released version. Build from a release tag unless you specifically want to test unreleased changes — and if you do, prefer the :beta image over building from source so you get the exact artifact that was tested.
2. Create your .env and docker-compose.yml¶
Both files ship as .example templates so your local copies aren't clobbered by upstream updates. All user configuration lives in .env; docker-compose.yml rarely needs changes because it loads settings from .env via env_file.
# Interactive setup (recommended — generates JWT secret, prompts for values)
./scripts/setup.sh
# Or copy the templates manually and edit
cp .env.example .env
cp docker-compose.yml.example docker-compose.yml
Open .env in any editor and fill in the values below. Lines starting with # are comments.
Required settings¶
# Port — the port you'll access PoracleWeb.NET on (http://your-server:8082)
PORT=8082
# PoracleWeb.NET database — PoracleWeb.NET's own data, and the only database it connects to
# Create this database first (see step 3 below), tables are auto-created
WEB_DB_HOST=localhost # IP or hostname of your database server
WEB_DB_PORT=3306
WEB_DB_NAME=poracle_web
WEB_DB_USER=root
WEB_DB_PASSWORD=your_db_password
# JWT Secret — any random string, at least 32 characters
# Generate one: openssl rand -base64 48
JWT_SECRET=generate-a-long-random-secret-key-at-least-32-chars
# Sign-in: configure at least one of Discord, Telegram (below) or an OIDC provider.
# Discord is optional: delete both lines below for a Telegram-only or SSO-only site.
# Discord OAuth2 — create an app at https://discord.com/developers/applications
# Set the OAuth2 redirect URI to: http://your-server:8082/api/auth/discord/callback
DISCORD_CLIENT_ID=your_discord_client_id
DISCORD_CLIENT_SECRET=your_discord_client_secret
# Optional: needed for the geofence review forum posts, and for restricting login to
# holders of a Discord role — that also needs DISCORD_GUILD_ID plus the enable_roles and
# allowed_role_ids site settings. Without enable_roles switched on, role IDs are ignored.
DISCORD_BOT_TOKEN=your_discord_bot_token
# Poracle API — your running PoracleNG instance
# This is how PoracleWeb.NET talks to Poracle. It must be reachable from the container.
PORACLE_API_ADDRESS=http://host.docker.internal:3030
PORACLE_API_SECRET=your_poracle_api_secret # Must match PoracleNG's server.apiSecret
PORACLE_ADMIN_IDS=your_user_id # Comma-separated Discord or Telegram user IDs for admin access
# CORS origin — the URL you'll access PoracleWeb.NET from.
# Required in production (the container exits on startup if missing).
CORS_ORIGIN=http://localhost:8082
PoracleNG 5.4.0 or newer
Point PORACLE_API_ADDRESS at PoracleNG 5.4.0 or later. Against an older server PoracleWeb.NET still starts, but it logs an error at startup, shows the detected version on Admin → Server settings, and anything that needs a 5.4.0 route fails with a message saying so. Upgrade PoracleNG first.
Optional settings¶
# Poracle config directory — mount for DTS template previews
PORACLE_CONFIG_DIR=/path/to/PoracleNG/config
# Koji geofence API (required for custom geofences feature)
KOJI_API_ADDRESS=http://host.docker.internal:8080
KOJI_BEARER_TOKEN=your_koji_bearer_token
KOJI_PROJECT_ID=1
KOJI_PROJECT_NAME=your_koji_project_name
# Discord forum channel for geofence submission threads
DISCORD_GEOFENCE_FORUM_CHANNEL_ID=
# Scanner DB for gym picker in raid/egg dialogs (optional)
# SCANNER_DB_CONNECTION=Server=host.docker.internal;Port=3306;Database=golbat;User=root;Password=your_password
# Telegram sign-in (optional). Setting the token and username turns it on by itself.
TELEGRAM_BOT_TOKEN=
TELEGRAM_BOT_USERNAME=
See the Configuration Reference for the full list of settings.
Public URL and reverse proxies¶
PUBLIC_URL is the origin people reach the instance on, and it pins the OAuth callback for both Discord and OIDC instead of letting the app guess one from each incoming request. Whatever you put here is what the provider must have registered. It is an origin only — no trailing path, no query — and an unusable value stops the app at startup rather than producing a callback the provider silently refuses.
Leave it unset if the container is exposed directly, or if people reach it on several hostnames and you want the callback to follow whichever one they used. It is also the base for the links PoracleWeb.NET puts in geofence review threads, so set it if you use the Discord submission forum.
If anything terminates TLS in front of the container — nginx, Caddy, Traefik, a Cloudflare Tunnel — also name it. X-Forwarded-For and X-Forwarded-Proto are believed only from declared addresses, because a header trusted from anyone lets a caller invent a new address per request and hand itself a fresh rate-limit allowance on the sign-in endpoints.
# One or both. Comma-separated. Use the address the proxy connects FROM.
PROXY_KNOWN_PROXIES=127.0.0.1
PROXY_KNOWN_NETWORKS=172.18.0.0/16
With neither set, the app falls back to the connection address. That is safe but wrong in two visible ways: every user behind the proxy shares one sign-in rate-limit bucket, and callback URLs are built from the scheme the app received — http:// — which Discord and OIDC providers reject. PUBLIC_URL fixes the callback half on its own; only these two fix the rate-limit bucket.
Version checking¶
The Versions card under Admin → Server settings compares your PoracleWeb.NET and PoracleNG versions against the latest releases. Opening that page makes two anonymous GETs, to api.github.com and raw.githubusercontent.com, with no identifiers sent. There is no scheduler behind it: the result is cached for six hours, so an instance whose admins never open the page never calls GitHub at all. If your egress policy blocks it, or you'd rather it didn't happen, switch off Check for updates (stored as disable_update_check) under Admin → Server settings.
3. Create the PoracleWeb.NET database¶
PoracleWeb.NET needs its own database (separate from your Poracle bot database). Tables are created automatically on first start — you just need to create the empty database:
# If you ran ./scripts/setup.sh, it offered to create this for you.
# Otherwise, run manually:
mysql -u root -p -e "CREATE DATABASE IF NOT EXISTS poracle_web CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"
Or in a MySQL client:
Note
PoracleWeb.NET doesn't connect to Poracle's database. It reaches Poracle only through PoracleNG's API.
4. Start¶
The container runs as uid 999 and keeps its keys and caches in ./data. Create that directory with
the right owner first, or Docker creates it as root and the app can't write to it:
docker-compose.yml pulls ghcr.io/pgan-dev/poracleweb.net:latest unless you say otherwise, so
point its image: line at the tag you are about to build, or it will start the published image
and ignore yours:
Or without the scripts: docker build -t poracleweb.net:latest . && docker compose up -d
The app is now running at http://localhost:8082 (or whatever port you set in .env).
Check the logs to make sure everything started cleanly:
5. Set up Discord OAuth2¶
Skip this step if your site doesn't offer Discord sign-in. Telegram or an OIDC provider on its own is enough; see Sign-in methods.
- Go to your Discord Developer Portal and select your app
- Under OAuth2, add a redirect URI:
http://your-server:PORT/api/auth/discord/callback(e.g.,http://192.168.1.50:8082/api/auth/discord/callback) - Make sure the client ID and secret in your
.envmatch
See the Discord OAuth2 guide for detailed instructions.
Changing the port¶
Set PORT in your .env file:
Then restart:
The app will now be available at http://your-server:9090. Remember to update your Discord OAuth2 redirect URI to match the new port.
Updating¶
git fetch --tags
git checkout "$(git describe --tags --abbrev=0 origin/main)"
./scripts/docker.sh update
Or without the script: docker build -t poracleweb.net:latest . && docker compose up -d --force-recreate
A plain git pull tracks the beta channel
git pull moves you to the newest commit on your current branch. On develop that is the beta channel. Fetch tags and check the newest one out to stay on released code.
Common issues¶
Container won't start / exits immediately
: Check logs with docker compose logs. Usually a missing or invalid required setting in .env.
Container crashes: "Configuration 'Cors:AllowedOrigins' is required"
: Set CORS_ORIGIN in your .env to the URL you access PoracleWeb.NET from (e.g., CORS_ORIGIN=http://192.168.1.50:8082). This is required in production mode.
Maps show "API KEY REQUIRED" or "Access blocked" : A tile provider is refusing the request and drawing the refusal into the image — it still returns success, so nothing appears in the logs. A fresh install needs no map configuration at all; if you have set one, see Maps and Troubleshooting.
Can't connect to database
: If your database is on the host machine (not in Docker), set WEB_DB_HOST=host.docker.internal in .env. The default in .env.example is localhost (for standalone use); Docker users connecting to the host must change this.
Poracle API errors / alarms don't save
: PORACLE_API_ADDRESS must be reachable from inside the container. If Poracle runs on the host, use http://host.docker.internal:3030. If it's on another machine, use that machine's IP.
Discord login fails
: The redirect URI in your Discord app must match exactly: http://your-server:PORT/api/auth/discord/callback. Check both the port and the hostname/IP. If you serve the site over HTTPS through a reverse proxy and Discord reports the callback as http://, set PUBLIC_URL — see Public URL and reverse proxies above and the troubleshooting entry.