Skip to content
GurtOS

Turn remote access on

POST
/remote
curl --request POST \
--url http://127.0.0.1:7700/api/remote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "rosa" }'

Owner only. Asks the relay to enroll name, starts the tunnel and a Let’s Encrypt certificate on the box, and returns at once with state: starting. Poll GET /remote until connected, which takes 5 to 60 seconds for a new certificate. TLS ends on the box, so the relay cannot read the traffic. Requests through the address carry X-Forwarded-For, so they need a device token like any outside request.

Media typeapplication/json
object
name
required

Lowercase letters, digits and single hyphens, not at either end. The relay reserves some names.

string
>= 3 characters <= 30 characters /^[a-z0-9]+(-[a-z0-9]+)*$/

Example

{
"name": "rosa"
}

The state, usually starting.

Media typeapplication/json
object
enabled
required
boolean
name
required
string | null
url
required

The box’s own https address.

string | null
state
required
string
Allowed values: off starting connected error
error

Why it failed, in words. If the relay no longer holds this box’s name (freed after 30 days offline, or given to another computer), it says to turn remote access off and on again.

string
relay
required

The relay’s host name.

string

Example

{
"state": "off"
}

A bad name.

Media typeapplication/json
object
error
required

What went wrong

string

Example generated

{
"error": "example"
}

The owner’s route, called by someone who is not the box’s own screen or a device paired as the owner.

Media typeapplication/json
object
error
required

What went wrong

string

Example

{
"error": "only this computer's own screen or the owner's paired device can do this"
}

The name is taken or reserved, or this box already has another name. Turn remote access off first to change it.

Media typeapplication/json
object
error
required

What went wrong

string

Example generated

{
"error": "example"
}

The relay is rate limiting this box.

Media typeapplication/json
object
error
required

What went wrong

string

Example generated

{
"error": "example"
}

The relay cannot be reached, or sent an answer the box does not accept.

Media typeapplication/json
object
error
required

What went wrong

string

Example generated

{
"error": "example"
}