This tutorial walks a new institution administrator through the complete end-to-end flow: deploying the gateway, connecting a physical lab computer, and watching a user reach an authenticated remote-desktop session.
Estimated time: 60–90 minutes for a first deployment on a fresh server.
Prerequisites: you have completed one of the installation guides and all containers are
running (docker compose ps shows every service as Up).
flowchart LR
User["User browser / Marketplace"] --> Gateway["Institution server<br/>Lab Gateway"]
Gateway --> OpenResty["OpenResty"]
Gateway --> Guac["Guacamole"]
Gateway --> Backend["blockchain-services"]
Guac -- "internal RDP" --> LabPc["Windows lab computer<br/>Lab Station + app"]
Backend --> Chain["Smart contracts<br/>reservation check"]
The gateway receives the user, validates their blockchain reservation, issues a session token, and opens an authenticated Guacamole window pointing at your lab computer.
Provider registration follows a two-system handshake: the Marketplace generates a signed provisioning token, and the Lab Gateway applies it to complete the remote on-chain registration and the local configuration commit.
Precondition: this tutorial assumes you deployed Lab Gateway in provider+consumer mode by following one of the installation guides. If you installed in consumer-only mode, provider registration and lab publishing are not available.
Open https://marketplace-decentralabs.vercel.app and sign in using your institution's
eduGAIN / SSO credentials (university username and password). You must have the
institution admin role. If you do not yet have that role, contact the Marketplace
platform administrator.
- Go to your user dashboard and find the Institutional Provisioning Token card.
- Select token type Provider.
- Enter the public base URL of your Lab Gateway (e.g.
https://lab.your-institution.edu). This is the URL the Marketplace will use to reach your gateway's auth endpoints. - Click Generate Provisioning Token.
- Copy the token — it is short-lived (typically 15–30 minutes) and single-use.
The token is a signed JWT issued by the Marketplace that encodes your institution name, email, country, organisation domain, and gateway URL. It also authorises the Marketplace to complete the on-chain provider registration on your behalf.
- Open
https://lab.your-institution.edu/wallet-dashboard. - Enter your
ADMIN_ACCESS_TOKENwhen prompted. - Find the Apply Provisioning Token section and paste the token you copied.
- Click Apply.
What happens next (automatically):
blockchain-servicesvalidates the token signature against the Marketplace JWKS.blockchain-servicescalls back to the Marketplace to trigger on-chain registration: wallet address receivesPROVIDER_ROLEandINSTITUTION_ROLE, and the gateway's auth endpoint is recorded in the smart contract.- After the Marketplace confirms the transaction,
blockchain-serviceswrites the token-derived fields andprovider.registeredtogether as one atomic replacement ofconfig/provider.properties. The dashboard shows Provider Token Applied only after this local snapshot is committed as well.
If the local snapshot cannot be committed after the on-chain transaction, the endpoint returns a retryable
LOCAL_REGISTRATION_PERSISTENCE_FAILEDresponse. The previous properties snapshot is left intact; fix the filesystem/configuration issue and retry the same provisioning token so the Marketplace can reconcile its already-active registration without submitting a duplicate provider transaction.
The gateway must be able to reach the lab computer on port 3389 (RDP). Test from the gateway host:
# Replace 192.168.1.100 with your lab computer's IP
nc -zv 192.168.1.100 3389If using a separate network interface or VLAN, verify the routing is in place.
- Enable Remote Desktop: Settings → System → Remote Desktop → Enable.
- Create a dedicated Windows user account for lab sessions (avoid using administrator accounts for day-to-day lab access).
- Note the exact path of the Lab Station
AppControl.exeand the window class name of the lab application. See the Lab Station README for instructions on how to find the window class.
- Open
https://lab.your-institution.edu/guacamole. - Log in with the Guacamole admin credentials set during installation.
- Go to Settings → Connections → New Connection.
- Fill in:
- Name: any descriptive name (e.g.,
Electronics Lab 1) - Protocol: RDP
- Hostname: lab computer's IP address
- Port: 3389
- Username: Windows account username
- Password: Windows account password
- Security mode: Any
- Ignore server certificate: checked
- Name: any descriptive name (e.g.,
- Under Remote App:
- Program:
AppControl.exe(or the full path if needed) - Working directory: path to the Lab Station folder on the Windows machine
- Parameters: window class and lab application path — see Lab Station docs for details
- Program:
- Click Save.
Still in Guacamole admin view, click the connection name to open a direct session and confirm the desktop appears and the lab application launches.
Lab publishing can be done from either the Marketplace or the local Lab Manager. Use Marketplace publishing when the provider has eduGAIN/SSO access. Use Lab Manager publishing when the provider was onboarded with a Marketplace invitation token but does not have an eduGAIN IdP.
- Open
https://lab.your-institution.edu/lab-manager. - Enter your
LAB_MANAGER_TOKENwhen prompted. - In Labs, select an existing Guacamole connection or FMU discovered from the Gateway inventory.
- Choose Full Setup to generate metadata and upload images/documents locally, or Quick Setup to reference an externally hosted metadata JSON.
- Click Publish Lab. The Gateway stores generated metadata/assets under its
persistent lab-content volume, exposes them at
/lab-content/..., and signs the on-chain transaction with the institutional provider wallet.
- Log into
https://marketplace-decentralabs.vercel.appwith your institutional SSO credentials. - Navigate to Lab Panel in the navbar. The lab management section is only visible to registered providers.
- Click Add New Lab. A modal opens with two setup modes.
Fill in all lab details directly in the Marketplace form. No external files needed.
- Basic Information: lab name, description, keywords, category.
- Pricing and availability: hourly rate in service credits, available time slots, opening and closing dates.
- Access information: gateway access URI (your Lab Gateway URL) and access key.
- Media: upload images and documentation (up to 5 MB per file).
When you submit, the Marketplace sends a blockchain transaction that mints the lab on-chain and automatically stores the metadata. The lab is immediately bookable once the transaction confirms.
Use this mode if you already maintain a JSON metadata file hosted externally (IPFS, Arweave, GitHub Gist, your own server, etc.) and want to reference it directly rather than re-entering data in the form.
- Host your JSON metadata file at a publicly accessible HTTPS URL.
- In the Quick Setup tab, fill in the minimal on-chain fields (hourly rate, access URI, access key).
- Paste the public URL to your JSON file in the Metadata URL field.
- Submit — only the URL and on-chain fields are written to the contract.
The JSON file is optional in Full Setup — the Marketplace generates and manages metadata storage automatically. It is only required in Quick Setup.
After the transaction confirms, your lab should be listed when any user searches for
your institution on https://marketplace-decentralabs.vercel.app and available for booking.
A user visits the Marketplace, finds your lab, and books a time slot. The smart contract
records the reservation and assigns a reservationKey.
At their booked start time, the user follows the Access lab link. This initiates the authentication flow:
- The Marketplace sends a reservation-bound Marketplace JWT and SAML/WebAuthn evidence to the consumer/provider backend.
blockchain-servicesvalidates identity, PUC, reservation, time window and on-chainACCESS_AUTHORIZEDstate as required by the selected flow.- The backend returns an opaque access code; OpenResty reserves it server-to-server, validates the returned JWT locally, and commits it only after the secure JTI session mapping is ready.
- The browser is redirected to the selected gateway's Guacamole viewer without a JWT in the URL.
The Guacamole window opens and shows the Windows desktop of the lab computer with the Lab Station application running. The user interacts with the remote lab in real time.
docker compose pscurl -k https://lab.your-institution.edu/healthcurl -k https://lab.your-institution.edu/auth/.well-known/openid-configuration
curl -k https://lab.your-institution.edu/auth/jwksIn Lite mode these local /auth endpoints are intentionally blocked; inspect
the configured remote issuer instead.
docker compose logs -f blockchain-services
docker compose logs -f openresty| Symptom | Likely cause | Fix |
|---|---|---|
| User lands on Guacamole login screen instead of session | JWT not accepted by Guacamole | Check ISSUER in .env matches the blockchain-services issuer shown at /auth/.well-known/openid-configuration. |
| Reservation validation fails with 401 | Contract address mismatch | Verify CONTRACT_ADDRESS in blockchain-services/.env matches the deployed contract. |
| Guacamole shows "connection failed" | Lab computer unreachable | Check network path and Windows firewall on the lab computer. |
| RDP session opens but Lab Station app does not start | Wrong Remote App parameters | Double-check the window class and path in the Guacamole connection settings. |
| Wallet dashboard returns CORS error | Missing origin in allowlist | Add the gateway URL to CORS_ALLOWED_ORIGINS in .env and ALLOWED_ORIGINS in blockchain-services/.env. |
- eduGAIN federation guide — let institutional users log in with their university credentials
- Installation guides — other deployment modes