Web Terminal instellen met ttyd
ASD bevat een ingebouwde web terminal aangedreven door ttyd. Het geeft je een volledige shell-sessie in elke browser β desktop, tablet of telefoon. Geen SSH-client nodig. Gecombineerd met ASD tunnels kun je je ontwikkelmachine overal benaderen.
Wat je krijgt
- Volledige shell-sessie in elke browser
- Werkt op desktop, tablet en mobiel
- Geen SSH-client installatie nodig
- Toegang op afstand via ASD tunnels
- Standaard met wachtwoord beveiligd
Vereisten
- ASD CLI geinstalleerd (
asd initom je workspace op te zetten) - Het ttyd binary (automatisch gedownload tijdens
asd init)
Stap 1: Stel credentials in
ttyd vereist authenticatie. Voeg credentials toe aan je .env bestand:
TTYD_USERNAME=admin
TTYD_PASSWORD=jouw-veilige-wachtwoord
Als je asd init hebt uitgevoerd, zijn deze al ingesteld met
automatisch gegenereerde waarden via het macro-systeem.
Stap 2: Start de terminal
asd terminal startttyd start op een automatisch toegewezen poort. Voor status en toegangs-URL's, open het interactieve menu:
asd terminalStap 3: Benader het
Na het starten krijg je drie toegangsmethoden:
| Methode | URL Formaat | Gebruik |
|---|---|---|
| Lokaal | http://localhost:<poort>/ | Zelfde machine |
| Caddy | http://asd.localhost/asde/ttyd/ | Lokaal netwerk |
| Tunnel | https://hub-xxx.cicd.eu1.asd.engineer/asde/ttyd/ | Overal |
Toegang op afstand via tunnel
Om je terminal overal ter wereld te benaderen:
# Start de terminal
asd terminal start
# Schakel tunnels in (als ze nog niet actief zijn)
asd net apply --tunnel
# Verkrijg de remote URL
asd terminal
# Zoek naar de "Tunnel:" URL in het menuConfiguratieopties
| Variabele | Verplicht | Standaard | Beschrijving |
|---|---|---|---|
TTYD_USERNAME | Ja | β | Inlognaam |
TTYD_PASSWORD | Ja | β | Inlogwachtwoord |
TTYD_PORT | Nee | (auto) | Poortnummer |
TTYD_SHELL_CMD | Nee | bash | Shell om te draaien |
TTYD_CWD | Nee | workspace | Startdirectory |
TTYD_PATH | Nee | / | URL pad-prefix |
Beveiligingsoverwegingen
ttyd biedt volledige shell-toegang β behandel credentials serieus:
- Gebruik sterke wachtwoorden (12+ karakters)
- Deel credentials niet publiekelijk
- Stop de service wanneer niet nodig:
asd terminal stop
Stoppen
asd terminal stopProblemen oplossen
| Probleem | Oplossing |
|---|---|
| "Missing username/password" | Stel TTYD_USERNAME en TTYD_PASSWORD in via .env |
| "Port in use" | asd terminal stop of kill het proces op die poort |
| "Binary not found" | Voer asd init uit om binaries opnieuw te installeren |
Wat nu
- VS Code Server in de browser β volledige IDE naast je terminal
- Basic authenticatie toevoegen β extra beveiligingslaag
- Live Terminal in CI β ttyd in GitHub Actions
Kelvin Wuite
Kelvin Wuite is the founder of ASD B.V. With over eighteen years of development experience, he has witnessed the same patterns repeat across every software team - endless documentation, manual preparation, environment mismatches, and fragmented collaboration. His drive is to remove these barriers, enabling engineers to work together in unified environments with shorter feedback loops and hands-on collaboration. Since 2015 he has been refining these ideas, leading to ASD β a platform designed to create a faster, more integrated way for development teams to collaborate in an age where AI is thriving.
Related Articles
How to Expose Local Services with ASD Tunnels
Learn three ways to expose local services with ASD: quick expose for instant sharing, asd.yaml for daily development, and tunnel tokens for CI/CD automation.
ConfigurationHow to Configure asd.yaml for Your Project
Complete guide to configuring asd.yaml: define services, set up networking, add authentication, create automation tasks, and configure plugins for your project.
ServicesHow to Run VS Code Server in the Browser
Run VS Code in your browser with code-server and ASD. Full IDE with extensions, terminal, and Git β accessible from any device via HTTPS tunnels.