Services

Web Terminal instellen met ttyd

Published:
Kelvin Wuite
By Kelvin Wuite β€’ 6 min read
Share

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 init om 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:

bash
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

bash
asd terminal start

ttyd start op een automatisch toegewezen poort. Voor status en toegangs-URL's, open het interactieve menu:

bash
asd terminal

Stap 3: Benader het

Na het starten krijg je drie toegangsmethoden:

MethodeURL FormaatGebruik
Lokaalhttp://localhost:<poort>/Zelfde machine
Caddyhttp://asd.localhost/asde/ttyd/Lokaal netwerk
Tunnelhttps://hub-xxx.cicd.eu1.asd.engineer/asde/ttyd/Overal

Toegang op afstand via tunnel

Om je terminal overal ter wereld te benaderen:

bash
# 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 menu

Configuratieopties

VariabeleVerplichtStandaardBeschrijving
TTYD_USERNAMEJaβ€”Inlognaam
TTYD_PASSWORDJaβ€”Inlogwachtwoord
TTYD_PORTNee(auto)Poortnummer
TTYD_SHELL_CMDNeebashShell om te draaien
TTYD_CWDNeeworkspaceStartdirectory
TTYD_PATHNee/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

bash
asd terminal stop

Problemen oplossen

ProbleemOplossing
"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

Kelvin Wuite
Written by

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