Importer
Upload over FTP
Send a game to the Switch over Wi-Fi with sphaira's FTP server, without taking out the SD card.
On this page
The window’s Switch over Wi-Fi (FTP) target and --out ftp://HOST:PORT both use the FTP server in sphaira, a homebrew menu for the Switch. rpynx does not have its own FTP server yet; one is planned for the Transfer milestone.
Before you start
- Turn on the FTP server in sphaira. It is anonymous, on port 5000 unless you set another.
- Note the address sphaira shows, for example
192.168.1.20:5000. It comes from your router, so it can change. - Keep the Switch in sphaira. The server stops while the rpynx loader or a game runs.
/ on that server is the SD card. The importer uses only Python’s ftplib.
python3 importer/rsl_import.py ~/Games/MyGame.zip --out ftp://192.168.1.20:5000How an upload works
The upload never leaves a half-copied game where the loader can see it:
- If
games/<id>exists and Replace (--replace) is off, nothing is sent. - Every file goes to the hidden folder
games/.uploading-<id>/, withmanifest.jsonlast. The loader skips names that start with a dot. A.uploading-<id>left by an earlier upload is removed first; it never holds saves. - On Cancel, a lost connection or any error,
.uploading-<id>is removed over a new connection, and the Switch is as it was. If that fails too, the next upload removes it. - Then it is renamed into place: the old
games/<id>becomesgames/.old-<id>,.uploading-<id>becomesgames/<id>, the oldgame/saves/and any pictures chosen before are moved into the new folder, and.old-<id>is deleted. - If a rename in step 4 fails, the error names both folders. A leftover
.old-<id>may hold saves, so the next upload of that game refuses until it is moved or deleted by hand.
switch/renpy-loader/saves/ is never touched. Unlike an SD card export, which only swaps game/ and manifest.json, an upload replaces the whole games/<id>/ folder.
Speed
Uploads of thousands of small files run at about 1–2 MB/s, one file at a time. The status line shows how much of a large file is sent, and Cancel stops within the current file.
note
A USB transfer is planned after Milestone 7 (libnx usbComms on the Switch, libusb on the desktop), for tens of MB/s. MTP is not planned: macOS has no MTP support, and an MTP responder such as haze is GPL, which would make the MIT loader GPL.