Blueprints · Docker & Databases
Jupyter on localhost
Publishes Jupyter on 127.0.0.1. The start script refuses to run while the token is change-me.
Why this should not be public
A Jupyter server runs arbitrary code by design. A public one with a weak or missing token is remote code execution, and exposed notebooks are a common cryptomining target.
Live config
Baked-in protections
- The host port is 127.0.0.1
- An empty token is not the default
- change-me blocks the start script
Step 1 · yaml
Compose file
/opt/jupyter-loopback/compose.yaml
Written under the compose directory. It is not started. The image tag is the release this blueprint was checked with: look at the project's release notes and use the newest patched tag.
services:
app:
image: jupyter/base-notebook:python-3.11
ports:
- "127.0.0.1:8888:8888"
environment:
JUPYTER_TOKEN: change-me
security_opt:
- no-new-privileges:true
restart: unless-stopped
Step 2 · bash
Start script
/opt/jupyter-loopback/up.sh
Review the image tag and the password, then run this yourself.
#!/bin/sh set -eu cd "/opt/jupyter-loopback" if grep -q 'change-me' compose.yaml; then echo "Replace change-me before starting." exit 1 fi docker compose up -d
Step 3 · bash
Read-only check
/root/portgate-blueprints/jupyter-loopback-check.sh
Prints status. It does not change the service.
#!/bin/sh
set -eu
if command -v docker >/dev/null 2>&1; then
docker ps --format '{{.Names}} {{.Ports}}' || echo "Docker is installed but the daemon did not answer."
else
echo "Docker is not installed. The compose file is staged only."
fi