Getting started Preview
This documents the unpublished integration candidate. Local event/team operation is implemented; cloud platform deployment and complete catalog playability are not verified release claims.
Start a local competition
Prepare Git, Make, Bun 1.4.4 and the reviewed checkout on macOS or Linux (including WSL2). Docker Engine with Compose is needed for Docker exercises. Run from the repository root:
git clone https://github.com/susumutomita/TenkaCloud.git
cd TenkaCloud
make install
make local
Before startup, make local acquires the Git sources (URL and ref) or local sources (path) selected in catalog-sources.json. The default is TenkaCloudChallenge's main, which requires network access. Acquisition failure stops startup. make deploy uses the same selection. Saved events retain their immutable acquisition snapshots. problems/ is a generated build view, not a Git submodule. To use an authoring branch, change the configured ref. See catalog-sources.json and downloaded-catalog.ts.
The default organizer URL is http://127.0.0.1:5174; the participant URL is http://127.0.0.1:5175. Use the URLs printed by the process. Sign in with the organizer key only; no username or password is needed. Each interactive make local start displays a new key once and revokes the previous organizer key and sessions. To rotate it while running, use make local-reset in another interactive terminal with the same data directory. Events, scores, participant keys and problem data are preserved. Noninteractive and public/container starts retain existing keys without printing them to logs.
Connect from another device
Default loopback URLs work only on the host PC. To admit participants on a trusted isolated network, specify an IPv4 already assigned to the host. Replace the example 100.96.12.34 with your host's address. Tailscale IPv4 addresses within 100.64.0.0/10 are accepted too. This command does not configure a VPN or its permissions.
make local LOCAL_ARGS="--lan 100.96.12.34 --unsafe-lan"
The organizer opens http://127.0.0.1:5174 on the host. Give participants http://100.96.12.34:5175 and their own team key. Opening 127.0.0.1 on a participant's device connects to that device, not the host. Keep the organizer key private.
--unsafe-lan acknowledges an HTTP listener; the application does not provide TLS here. The LAN command above supports native problems that do not use Docker, such as Crypto Battle. Starting, resuming or recovering Docker / Compose exercises without the dedicated isolation mode is rejected with network_isolation_required. Mac / Docker Desktop does not support that mode. Same-PC loopback exercises remain available, without the dedicated guard's isolation guarantee.
Remote Docker exercises require supported native Linux with explicit --competition-network and --docker-network-pool settings. The pool must not overlap LAN / VPN routes. Missing prerequisites, including Docker 28.4.x, a rootful local daemon and firewall / nsenter permissions, cause rejection. Read the guard prerequisites first. Selecting a LAN listener alone does not automatically change firewall or VPN settings.
On a Mac or any host that cannot use the isolation mode, a group of fully trusted participants can add --unsafe-docker-lan to run Docker exercises from other devices.
make local LOCAL_ARGS="--lan 100.96.12.34 --unsafe-lan --unsafe-docker-lan"
The flag is accepted only together with --lan <ip> --unsafe-lan. Combining it with --competition-network, --vpn-peers or public origins is rejected before startup. Docker exercises then have no network isolation between teams: an exercise can reach other teams' exercises, the host and the LAN, so use it only with participants you trust. Authentication and per-team data separation do not change. Events prepared with isolation are never started, resumed or recovered without it, even under this flag; they are rejected with network_isolation_required, and you create a new event instead. Startup prints this warning right after the LAN HTTP is unencrypted warning.
If a retained Docker unit lacks isolation, even when stopped, LAN host startup is rejected before listeners open. Existing jobs / units are not automatically stopped or migrated. Started with --unsafe-docker-lan, the host accepts such units. Otherwise, agree on maintenance with the organizer, preserve needed data, then stop and retire those environments through the original loopback host before creating isolated ones. Do not update or restart a running host without that coordination.
This boundary concerns exercise containers. Tailscale connectivity alone does not restrict a participant device's entire network access or communication between devices. This procedure does not establish verified HTTPS hosting, VM connectivity or a full multiplayer competition.
Keep the build enabled on first startup. Add --no-build only after building the same code and selected catalog. If startup rejects a missing build or mismatched catalog, rebuild on the next start by omitting that flag. Agree on a maintenance window with the organizer before changing a running host.
Join before Tailscale is configured
Share only a dedicated event host. Participants do not need to join the organizer's company tailnet. Obtain the device owner's and administrator's approval before sharing a company PC or its services. These are steps for an approved setup; a real-device rehearsal including sharing remains incomplete. Remote Docker still requires the native Linux isolation prerequisites above.
Organizer preparation
- Install Tailscale 1.104.4 or newer from the official download on an approved dedicated host. Sign in with the approved event account. Record the selected tailnet, host name and its own IPv4; compare
tailscale ip -4andtailscale status. Confirm the client and localtailscaledwithtailscale version --daemon. For a VM, use the VM's own address. - Agree with each participant on their sign-in method, account and receiving tailnet. Issuing and accepting shares requires Owner / Admin / IT admin privileges in the respective tailnets. Check the selected identity when personal and company accounts coexist.
- Administrators on both sides review effective grants / ACLs. Scope access from the receiving user to the dedicated host's TCP 5175. Only for Docker exercise gateways, also scope the configured
--gateway-portsTCP range, default 5200–5239. Do not permit 5174, SSH, unnecessary services or raw container ports. Adding a narrow permission does not constrain an existing broader allowance. Replace any allow-all rule that still covers invited users, using Tailscale 1.104.4, forwarding and policy. - In Machines, verify the event host name and IP, then use Share → Copy invite link → Copy share link to issue an individual single-use invitation. Leave reusable links disabled. Give its link only to the intended recipient: it grants access. Sharing exposes a machine, not a guaranteed single port. Read the official sharing rules.
First-time participant preparation
- Install the official app on your device. On iPhone, follow the iOS guide, approve the VPN configuration and sign in with your agreed account. The organizer does not need to give you company credentials.
- Open the invitation and verify the browser's sign-in method, account and receiving tailnet before accepting. In the app, select the same receiving account / tailnet and check Connected. If another tailnet is selected, stop and compare identities first.
- Find the event host name supplied by the organizer and check its shared IP. Do not use your phone's own IP, a different Mac or an old registration. A shared host can appear across tailnets, so visibility alone does not prove common membership.
- Compare that IP with the participant URL printed by the host and open
http://<event-host-IPv4>:5175/. This LAN setup checks IP-based Host / Origin values; do not substitute a MagicDNS hostname. If sharing assigns a different recipient-side IP because of a conflict, stop and ask the organizer rather than proceeding with that address.
Verify, play and finish
Keep the Host Console on 127.0.0.1:5174; do not forward or proxy it to participants. Give each participant only their team key. Before starting the event, verify only the 5175 page and login from the participant device. Gateways listen only while in use; every port in the range is not expected to answer continuously.
Administrators check and test effective policy for allowed 5175 / required gateways and denied 5174 / unnecessary services. Native-only events need no gateway permission. Port permissions, Tailscale machine sharing, the exercise Linux guard and application team-key authorization are separate boundaries. Sharing alone does not isolate exercises or the rest of a participant device.
On a participant PC, check only the approved event host, replacing the example IP:
EVENT_HOST_IP=100.96.12.34
curl --fail "http://${EVENT_HOST_IP}:5175/healthz"
nc -vz -w 3 "$EVENT_HOST_IP" 5175
nc -vz -w 3 "$EVENT_HOST_IP" 5174
Expect health status: ok / role: participant, successful TCP 5175 and unreachable 5174. On a phone, open the same /healthz in the browser. A failed 5174 connection alone does not prove ACL enforcement; administrators also verify policy tests. Check the actual issued gateway URL and active port, not responses from every unused port.
Start the event after everyone connects. Check native actions and scores; for Docker, use the portal-issued gateway URL to reach that team’s exercise. Check correct/incorrect submissions and hints where the problem supports them. End Event stops scoring; preserve needed results. Use Stop (keep data) to retain environments, then have the organizer stop the host through the maintenance procedure. Before selecting Teardown, confirm the deletion target and data impact.
Finally, the organizer uses the event host's Share dialog to Revoke invite for the recipient and cancel unused invitations. Verify in the Share dialog that the recipient and unused invitations are revoked. Failed participant reconnection is a supplementary check: failure after host shutdown alone does not prove revocation. This revokes sharing without deleting someone else's device. Joining again requires a fresh invitation and acceptance. Use a recipient-side removal menu only after verifying its target and scope; do not confuse it with generic Remove machine.
Tailscale 1.104.4, forwarding and policy
TenkaCloud does not install Tailscale, and this repository does not pin it in a container image, install script or IaC module. Install 1.104.4 or newer on the event host and on each participant device. tailscale version prints the client. tailscale version --daemon also prints local tailscaled. Require 1.104.4 or newer for both. That release fixes TS-2026-014, TS-2026-015, TS-2026-016 and TS-2026-017. Tailscale explains the findings in Tailscale SSH: Findings and fixes.
The participant path is HTTP on TCP 5175. Add the configured gateway range only while a Docker exercise is running. Leave Tailscale SSH off. tailscale set --ssh defaults to false; if SSH was enabled, run tailscale set --ssh=false. On the event host, set TS_SSH_DISABLE_FORWARDING=1 in the tailscaled service environment and restart tailscaled before participants connect. TS-2026-014 reports that Unix-socket forwarding ran as root, so an authorized peer could reach root-only sockets such as the Docker socket or the tailscaled local API. The variable disables forwarding and leaves Tailscale SSH itself available. Restarting tailscaled drops tailnet connectivity until the node returns; then compare tailscale ip -4 again. Do not point tailscale serve at the Docker socket or the local API socket, and leave TS_SERVE_ALLOW_ALL_INTERFACES unset.
The documented flow does not enable Tailscale SSH or Tailscale Serve. Those four bulletins apply to nodes where the named feature is on. The event host may still have a Docker socket, and turning SSH on later meets the condition in TS-2026-014. Set the version and the forwarding variable before the event.
Disabling forwarding stops ssh -L, ssh -R, Unix-socket forwarding and agent forwarding through Tailscale SSH. This procedure does not use them. An organizer who uses those forwards for their own administration loses them until the variable is removed.
On systemd, put the variable in a drop-in, reload and restart. On another installer, set the same variable in the environment that starts tailscaled, then restart that service.
# /etc/systemd/system/tailscaled.service.d/50-disable-ssh-forwarding.conf
[Service]
Environment=TS_SSH_DISABLE_FORWARDING=1
sudo systemctl daemon-reload
sudo systemctl restart tailscaled
Sharing shows the recipient only the shared machine. The tailnet policy still chooses which ports on that machine answer. The default policy allows every port. Adding a narrow grant does not remove a broader allow that remains. On a dedicated event tailnet, replace the allow-all rule. Give autogroup:shared only TCP 5175, and TCP 5200–5239 only when Docker gateways are used. Keep the organizer's own access in a separate grant, for example autogroup:admin. Do not add an ssh rule for participants or for a tag on the event host. Tailscale documents that a user can SSH to a tagged device shared with them when an SSH rule and port 22 are both allowed. Leave the default SSH destination as autogroup:self.
{
"grants": [
{
"src": ["autogroup:admin"],
"dst": ["*"],
"ip": ["*"]
},
{
"src": ["autogroup:shared"],
"dst": ["*"],
"ip": ["5175"]
}
]
}
Bare port numbers in ip are TCP, matching Tailscale's sharing example. Add "5200-5239" to the shared grant only for Docker gateways. This fragment is not a complete policy. Keep the default ssh rule's dst as autogroup:self, remove any * or *:* allow that still includes invited users, and add a policy test that the invited user is denied :22 and :5174 and accepted on :5175. autogroup:member includes invited users when the destination device is shared with them.
This repository does not install or configure headscale. Use Tailscale's control plane for an event. The bulletins above do not name a patched headscale release. The headscale 0.29.6 changelog (2026-10-24) records a Tailscale Go dependency bump to v1.102.0 and does not mention TS-2026-014 through TS-2026-017. That dependency is the control server's library. Nodes run their own Tailscale client. The public Tailworm report is not a Tailscale bulletin. It says headscale 0.29.5 attaches forwarding to every accepted SSH session, with no policy switch to turn forwarding off, and it describes unauthenticated availability issues in that server. Do not grant Tailscale SSH on a headscale network until that project publishes a fix. Nodes on Tailscale 1.104.4 or newer still need the client upgrade and TS_SSH_DISABLE_FORWARDING=1.
When the event host IP changes
--lan binds the IPv4 selected at startup; it does not follow changes to Tailscale registration or the selected tailnet. Recheck the host's own tailscale ip -4, its selected tailnet, and the host name/IP shown to the recipient. Do not bind a participant's IP or a conflict-remapped recipient address. If only the recipient sees a different IP, stop this IP-based setup and review the route with the administrators; that case is outside this procedure's supported path.
Arrange a maintenance window, preserve data with make down, then start make local with the correct IPv4 in --lan. Carry over the reviewed --data, CATALOG_SOURCES, isolation and gateway options; keep the build enabled. For a custom --data, also stop with make down LOCAL_ARGS="--data <same-directory>". These are operations for the organizer to review and perform. An IP change requires neither local-clear nor deleting data.
Redistribute the new http://<host-IPv4>:5175/ from the startup log and recheck /healthz, login and any active gateways. The organizer still uses http://127.0.0.1:5174. Administrators separately review IP-dependent sharing and effective permissions; startup does not repair Tailscale or OS settings. See options.ts and server.ts for the binding and URL behavior.
Check startup and connectivity
Check the organizer page on the host and the participant page from the participant's device. Replace the example IP with the actual host IP.
# Run on the host
curl --fail --silent --output /dev/null --write-out '%{http_code}\n' http://127.0.0.1:5174/
# Run on the participant's device
curl --fail --silent --output /dev/null --write-out '%{http_code}\n' http://100.96.12.34:5175/
Expect 200 from each, then open the login pages in a browser. If unreachable, check the startup URLs, that the IP belongs to the host and the existing route between devices. HTTP responses alone do not verify authentication, scoring or exercise access. Follow the event steps below and check both correct and incorrect submissions and the score.
Implementation evidence: options.ts , server.ts, LAN engine composition and Docker rejection conditions. Developers can run the following regression checks for listener/origin behavior, rejection of unisolated LAN exercises, acquisition failures and snapshot/build consistency. These tests do not prove isolation on a real network.
make catalog-download catalog-prepare
bun test scripts/local-host/tests/public-mode.test.ts scripts/local-host/tests/catalog-startup.test.ts scripts/local-host/tests/lan-isolation.test.ts
Create and play an event
- In the organizer console, create an event, its teams and selected problems.
- Prepare the selected jobs and inspect every result. New Docker jobs are dormant until a participant starts them; AWS exercises keep their deployment flow.
- Start the event from Schedule and give each team the participant URL and its team key.
- Open the participant portal with that key. For Docker, choose Start / resume, read and solve the problem, then check the score. Use Stop (keep data) when finished with that environment.
This is one competition system for organizers and participants. There is no separate individual-practice login. Docker catalog/workbench restoration is in progress: catalog visibility is not proof that all 26 current problems, terminals or real Docker browser routes have passed.
Stop and resume without resetting data
In another terminal, from the same checkout:
make down
make local
make down stops the managed local process and owned Docker runtimes while preserving the database, scores, keys and Docker data. It does not end the event or remove AWS exercise stacks. The next start restores retained event data; new on-demand Docker jobs remain stopped until participants resume them. Writable layers and volumes survive Stop, but RAM does not. The event clock is not reset. End Event stops scoring; explicit environment teardown removes owned environments. Keep the data directory until cleanup succeeds.
Options use LOCAL_ARGS, for example make local LOCAL_ARGS="--no-build". When using a custom --data directory, pass the same directory to make down.
After stopping the host, make local-clear confirms removal of competition data and owned Docker exercises while retaining organizer access and host settings. make down preserves data; make local-reset rotates organizer access.
Set up cloud hosting
Select your intended AWS CLI profile and check it with aws sts get-caller-identity. Run make env-init ENV=development to enter the organizer email, hosting account ID and region. The wizard creates the selected .env only if it is absent. Existing files must be edited when their settings need changes.
For Turso, run make turso-live ENV=development. It guides CLI installation/login, database creation, SSM token storage and an authenticated check, then asks before deployment. For DynamoDB, run make deploy ENV=development after env-init. make turso-live-guide shows offline instructions; make turso-token-rotate ENV=development renews the database token without printing it. Use ROTATE_ARGS="--expiration 30d" for a finite lifetime, and rotate before it expires. See the checkout's infrastructure/README.md for prerequisites, profile selection and every confirmation.
Cloud deployment status
make deploy and make destroy use the current Lambda + Turso/DynamoDB CLI after reviewed IAM setup. Cloud hosting uses Lambda and Cognito, selectable Turso or DynamoDB, generic CloudFormation deployment, flag/multi-flag and scheduled scoring, participant Console/CLI access, and native coordination including Cryptography Battle. Destroy confirms targets and honors deployed removal policies. Ordinary make destroy leaves external Turso rows; make destroy-all explicitly resets them. Exercise teardown is separate. The restored cloud backend does not promise a zero-cost deployment. AWS-service problems are cloud-only. Docker/Compose exercises are local-only and are not listed in the cloud catalog. Live AWS and hosted Turso event capacity remain unverified. The cloud pipeline defaults to the current CLI; review its source settings and deployment role before starting a build.
Try native problems through Codespaces forwarding
Inside Codespaces, make local validates CODESPACES=true, CODESPACE_NAME, and GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN=app.github.dev, then derives exact HTTPS origins using the selected ports. Defaults are https://<name>-5174.app.github.dev and https://<name>-5175.app.github.dev; use the startup log URLs. Explicit --public-admin-origin / --public-participant-origin take precedence. A partial pair or invalid environment values are rejected. Explicit LAN, VPN and console appliance paths are not switched. Ordinary Mac / Linux hosting keeps the organizer on loopback.
This uses existing native public mode, with both listeners bound to 0.0.0.0 inside the codespace. Keep organizer port 5174 Private and open it with the organizer's GitHub authentication and TenkaCloud organizer key. Public startup does not log keys. To obtain a key, use make local-reset in another private interactive terminal, passing the same custom --data directory when used. This rotates the organizer key and revokes old organizer sessions. Participants use 5175 and their team key. Port visibility is never changed automatically; sharing/publication is a separate decision. Trusting X-Forwarded-For through --behind-proxy is not enabled automatically either.
Public mode does not offer Docker / Compose problems. See the README for Bun initialization. Exact forwarded origins, authentication rejection and URL delivery are covered by local fixtures; live Codespaces proxy/browser behavior, restart and multiplayer events remain unverified. Review codespace stopping and storage limits too. See official port forwarding and lifecycle.
Next: organizer manual, participant manual and deployment boundaries.
Use local problem directories
Mix Git entries ({ "url": "https://…", "ref": "main" }) and local entries ({ "path": "../TenkaCloudChallenge" }) in catalog-sources.json's sources array. Multiple local directories are supported. Relative paths resolve from the configuration file's directory; absolute paths are accepted. For private Git, obtain an authorized checkout yourself and select its path. TenkaCloud needs no credentials for this route. Direct Git acquisition remains unauthenticated HTTPS.
{
"schemaVersion": 1,
"sources": [
{ "path": "../TenkaCloudChallenge" },
{ "path": "../private-event-problems" }
]
}
Each problem's metadata.json is the source of the problem list; there is no separate list to edit. Keep the existing challenges/<id>/metadata.json / battles/<id>/metadata.json layout, or a standard pack's declared problemsRoot. Ordinary files such as READMEs are not listed as problems. Missing required metadata/files, invalid values, ID/directory mismatches and duplicate IDs across sources fail validation. A second repository cannot override an existing problem ID.
Both make local and make deploy preparation capture uncommitted additions and edits into validated immutable snapshots, then consume those snapshots. The author directory is unchanged. Acquisition or validation failure preserves the previous selection and stops startup/build. Saved events retain their definitions; no running host is automatically updated or restarted. Keep the build enabled on the next start after editing content.
Select a dedicated problem directory and keep real credentials out of teaching content. Copying excludes dot entries including .git, .dockerignore and .htaccess, node_modules, dist, coverage, conventional credentials / secret filenames, and common private-key file extensions. This does not detect secrets embedded in arbitrary filenames or file content. If a required teaching asset is excluded, separate it from secrets and use an appropriate name/layout before validation. Source-root and included symlinks, and special files, are refused. Retained local editions are verified from their snapshots without rereading mutable author files. A local revision's commit field is an internal ID made from the first 40 hex digits of its content digest, not a Git commit. A local lock alone cannot restore content on another machine without its snapshot store.
Use CATALOG_SOURCES=./config/my-catalogs.json make local for another configuration file. CATALOG_SOURCES=./config/my-catalogs.json make deploy ENV=development uses the same selection but also performs the normal deployment: review target, cost and permissions first. To check acquisition without starting or deploying, use make catalog-download CATALOG_SOURCES=./config/my-catalogs.json, then make catalog-prepare. Retained Git revisions in an existing lock may still require network access even when the current selection contains only local paths.
Books and compatibility
自分で作るクラウド競技 and Build Your Own Cloud Competition explain the teaching examples and design. The source of truth for current behaviour is this documentation and its matching checkout. The book source revision in zenn-article PR #304 was merged on 2026-10-05. A source merge does not verify publication or playability.
New installations use tenkacloud-cloud stack names; existing tenkacloud-lite stacks keep their names. The CLI discovers Lite/cloud installations; if both exist, explicitly choose TENKACLOUD_STACK_LAYOUT=lite or cloud. Original Lite updates verify ownership and persistent resource IDs. Original unpinned Lite installations require a one-time confirmation that no active competitions remain, after resource/schema checks and before bootstrap, source upload or deployment. Keep active competitions on their installed version until completion. After verifying that condition, confirm interactively or use CLOUD_ARGS="--confirm-no-active-events" for a noninteractive upgrade; generic --yes cannot bypass this check. A legacy catalog key alone does not prove a safe upgrade, and historical data is not migrated automatically. New and already-restored installations keep ordinary automatic make deploy behavior. Published cloud-v1 resource/database layouts cannot be updated in place, and no data is migrated automatically. --drain-events is unavailable; finish event Teardown before removing the platform.
Both databases admit 99 teams; SQL coordination retains the original 4 MiB state policy. All eight current catalog templates fit within the 51,200-byte TemplateBody limit, and TemplateURL is not implemented. This is not an all-AWS-problems deployment claim.
See the formal source contract, schema, mixed-source example and verification commands.