On this page
Remote server API
Everything a backend needs to speak CyberFoil's Remote protocol. AeroFoil is the reference server.
If your catalog still lives at /api/shop/sections, that path is accepted when /api/remote/sections is missing.
Related: Network & download · Install pipeline · Changelog
Connecting from CyberFoil
Point Settings at a Remote, or drop a profile under sdmc:/switch/CyberFoil/remotes/. Older shops/*.json files migrate on launch.
- Default HTTP port:
8465(HTTPS defaults to443) - Example LAN URL:
http://192.168.1.2:8465 - Auth: optional HTTP Basic (
remoteUser/remotePassin config, or per-profile) - Each profile can store
lanUrl,wanUrl(HTTPS), andconnection:auto,lan, orwan - Trailing slashes are stripped; bare hostnames get a scheme prepended
Remote profile file example:
{
"remote": {
"protocol": "http",
"host": "192.168.1.2",
"path": "",
"port": 8465,
"username": "user",
"password": "pass",
"title": "My LAN remote",
"favourite": false,
"legacyMode": false,
"lanUrl": "http://192.168.1.2:8465",
"wanUrl": "https://remote.example.com",
"connection": "auto",
"uid": ""
}
}
LAN discovery
Settings → Remote → Discover LAN Servers. The client broadcasts on UDP 8465.
- Request payload:
OWNFOIL_DISCOVER - Scan lasts about three seconds. B cancels, X scans again. Max 64 replies, 4096 bytes each.
- Reply fields used by the client:
uid,name,version,remote(optional WAN hint), HTTPport, public/private flag. Source IPv4 becomes the LAN address. - AeroFoil must enable LAN discovery. Allow UDP 8465. Client isolation, other subnets, and Docker without host networking often block broadcasts.
- Discovery never writes credentials and does not overwrite an existing WAN URL. A saved
uidupdates the same profile on the next scan.
How CyberFoil loads a catalog
- If
remoteLegacyModeis on → GET Remote root only (Tinfoil-style). - Otherwise → GET
/api/remote/sections. - On 404 or failure → GET
/api/shop/sections. - Still failing → fallback to root GET (legacy JSON or TINFOIL binary).
- After load, optional MOTD from root JSON field
success(skipped if body is TINFOIL). - Search is client-side only - filters item names in the current section. No search HTTP API.
HTTP endpoints
All catalog requests are GET. File installs use GET on each item's url (with Basic auth forwarded).
| Method | Path | Purpose |
|---|---|---|
GET | /api/remote/sections | Modern catalog (preferred) |
GET | /api/shop/sections | Same shape - used if /api/remote/sections is missing |
GET | / | Legacy catalog, MOTD, or TINFOIL payload |
GET | /api/remote/icon/{TITLEID} | Icon - 16 hex digits, uppercase. Falls back to /api/shop/icon/{TITLEID} when that prefix was used |
GET | {item.url} | Download NSP/NSZ/XCI/XCZ for install, or cheat text |
GET | /api/saves/list | Remote save backups (non-legacy mode) |
POST | /api/saves/upload/{TITLEID} | Upload save zip (multipart) |
GET | /api/saves/download/{TITLEID}.zip | Download latest save |
GET | /api/saves/download/{TITLEID}/{saveId}.zip | Download specific version |
DELETE | /api/saves/delete/{TITLEID} | Delete save(s) for title |
DELETE | /api/saves/delete/{TITLEID}/{saveId} | Delete one version |
POST | /api/cheats | Upload cheat text (AeroFoil admin) |
Remote fetch: 30s timeout, up to 4 retries on 408/429/5xx. SSL verify is disabled for Remote requests.
Modern response: /api/remote/sections
Content-Type should be JSON. Error object:
{ "error": "Invalid credentials" }
Success shape:
{
"sections": [
{
"id": "base",
"title": "Games",
"items": [
{
"name": "Example Game",
"url": "/files/example.nsp",
"size": 1234567890,
"title_id": "01007EF00011E000",
"app_version": 65536,
"app_type": "base",
"icon_url": "/api/remote/icon/01007EF00011E000",
"release_date": 20240115
}
]
}
],
"success": "Welcome - shown as message of the day"
}
Section id hints used client-side: all, updates/update, dlc, installed (local), saves/save, cheats.
Item fields
| Field | Aliases | Notes |
|---|---|---|
url | - | Required for installs and cheat download. Relative paths resolved against Remote base. URL fragment used as display name if name absent. |
name | - | Display title |
size | - | File size in bytes |
title_id | - | 16-char hex or decimal |
app_id | - | Used to infer title ID / type when title_id is missing |
app_version | - | Version number |
app_type | - | base, upd/update/patch, dlc/addon, CHEAT, or 0/1/2 |
icon_url | iconUrl | If omitted and title_id set → auto {apiPrefix}/icon/{ID} |
release_date | releaseDate, date | Integer YYYYMMDD |
build_id | - | Cheat build ID (hex). Required with title_id for cheat rows |
After parsing, CyberFoil may prompt to include related updates and DLC for selected bases. Remote titles are grouped by base / update / DLC.
Cheats (AeroFoil)
Catalog rows in a cheats section, or any item with app_type CHEAT, are not NSP/XCI installs. The client requires a valid title ID and build ID.
{
"id": "cheats",
"title": "Cheats",
"items": [
{
"app_type": "CHEAT",
"title_id": "01007EF00011E000",
"build_id": "ABCDEF0123456789",
"title_name": "Example Game",
"note": "Infinite health",
"url": "/api/cheats/01007EF00011E000/ABCDEF0123456789"
}
]
}
- Download: GET
item.url- raw cheat text. HTTP 404/405 → “this server does not support the cheat download API”. - Install path:
atmosphere/contents/<titleId>/cheats/<buildId>.txt - Upload: POST
/api/cheatsmultiparttitle_id,build_id,content, optionalnote. Needs admin Basic auth. 401/403 = not an admin. - Disabled in Tinfoil/legacy mode.
remoteHideIncompatibleCheatshides builds that do not match installed titles.
Legacy / Tinfoil mode
Enable remoteLegacyMode in Settings (Tinfoil Mode). Changes client behaviour:
- Only GET Remote root - no
/api/remote/sections - User-Agent header is empty
- Save sync and cheat APIs are disabled
- Legacy headers report version
20.0.2
Legacy JSON at root
At least one of:
sections- same as modern APIfiles/paths- array of objects or map of"Display Name": "path_or_url"directories- URLs fetched recursively for nested manifests
Per-entry URL keys: url, path, file, download_url, downloadUrl, or a plain string.
TINFOIL binary
Body starts with magic TINFOIL (optional BOM/whitespace prefix). May be AES-encrypted and/or zstd/zlib compressed. Decrypts to JSON. Encrypted remotes without the required library blob are rejected with an error.
{
"files": {
"Game [01007EF00011E000][base]": "/nsp/game.nsp"
}
}
Request headers
HTTP Basic
Standard Authorization: Basic … when username or password is configured. Credentials are sent only to the configured server origin.
User-Agent (non-legacy Remote fetch)
httpUserAgentMode | Sent value |
|---|---|
default | cyberfoil |
chrome / safari / firefox | Browser preset string |
tinfoil | (empty) |
custom | httpUserAgent from config |
Tinfoil legacy headers
When legacy auth support is available in the build, Remote requests may also send:
Theme:64 zero digitsUID:derived from console CIDVersion:/Revision:from app versionLanguage:e.g.en,frHAUTH:HMAC-like token from Remote URLUAUTH:token from URL + credentials
401/403 or HTML login pages are treated as auth failures. Redirect to a URL containing /login fails login.
Save sync (/api/saves/*)
Requires non-legacy Remote mode. Uses the same Remote URL and Basic auth. Compatible with AeroFoil-style servers.
List - GET /api/saves/list
JSON array or { "saves": [ … ] }:
{
"saves": [
{
"title_id": "01007EF00011E000",
"name": "Example Game",
"save_id": "abc123",
"note": "Before final boss",
"created_at": "2024-01-15T12:00:00Z",
"created_ts": 1705312800,
"size": 1048576,
"download_url": "/api/saves/download/01007EF00011E000/abc123.zip"
}
]
}
Field aliases: titleId, saveId, save_note, downloadUrl, etc.
Upload - POST /api/saves/upload/{TITLEID}
Multipart form:
file- zip archivetitle_id/application_id- 16-char hexnote- required from UI for bulk backup
Expect HTTP 2xx on success.
Download / delete
Download via GET on constructed or provided download_url. DELETE endpoints remove by title or by save_id.
Related client settings
| Key | Default | Effect |
|---|---|---|
remoteHideInstalled | true | Hide already-installed titles in Remote UI |
remoteHideInstalledSection | true | Hide synthetic Installed section |
remoteHideIncompatibleCheats | false | Hide cheats that do not match installed builds |
remoteAllBaseOnly | true | All section shows bases only |
remoteLegacyMode | false | Tinfoil compatibility mode |
remoteStartGridMode | false | Open Remote in grid view |
Icon cache: sdmc:/switch/CyberFoil/remote_icons/ (legacy shop_icons/ is copied on launch).
Minimal compatible server
- Listen on HTTP port
8465(or HTTPS443). - Implement
GET /api/remote/sectionsreturning{ "sections": [ … ] }./api/shop/sectionsremains accepted. - Serve files at URLs referenced in items; support relative paths.
- Optional:
GET /api/remote/icon/{TITLEID}, rootsuccessMOTD string. - For saves: implement
/api/saves/list|upload|download|deleteas above. - For cheats: catalog rows plus GET on each cheat URL and optional
POST /api/cheats. - For LAN discovery: UDP 8465 replies to
OWNFOIL_DISCOVER. - For old Tinfoil remotes: root JSON or TINFOIL binary + legacy headers if encrypted.