The TorBox Tinfoil Server allows you to easily set up your own custom Tinfoil shop of curated items downloaded from TorBox. This allows you to use TorBox as a repository rather than storing your files on your own server, or relying on someone else to download them for you.
TorBox does not allow piracy or condone it in any way. This is meant to be used with games you own and have the rights to.
- A TorBox account. Can be a free or premium account but keep in mind free accounts have restrictions. Sign up here.
- A server or computer that can run Python or has administrator access (only necessary for Docker installation).
- A Nintendo Switch that has Tinfoil installed.
To run this project, you will need to add the following environment variables to your .env
file.
TORBOX_API_KEY
Your TorBox API key used to authenticate you with TorBox. You can find this here. This is required to use this server.
AUTH_USERNAME
The login username when adding your server to Tinfoil. Default is: admin
AUTH_PASSWORD
The login password when adding your server to Tinfoil. Default is: adminadmin
PORT
The port that the server will run on. Usually no need to change this. If you do change this and are using Docker, change your port, such as -p 9000:9000
Default is: 8000
SWITCH_UID
The specific switch UID which you want to lock the server to. The server will not accept any requests from any other switch, even if the username and password is correct. Usually not needed. This is left blank by default. You can get this from looking at the logs. Make sure not to set this on first creation, so you can get your UID.
Connection details will vary depending on how you want to expose your server/computer as well as access the TorBox Tinfoil Server.
Protocol: http
unless you know what you are doing.
Host: This will be your server/computer's local IP. You can get this by checking your router, or by running ipconfig
in a terminal. This will show all of your network interfaces. Usually it will look like 192.168.X.X
or 10.X.X.X
or 172.16.X.X
. Get this exact address. For example, 192.168.1.2
. This can also be your WAN IP or public IP, which you can find by going here
Port: The PORT
environment variable, as seen above. If you change this, make sure to update your connection details in Tinfoil. Default is 8000
.
Path: No need to change this. Keep blank.
Username: The AUTH_USERNAME
environment variable, as seen above. If you change this, make sure to update your connection details in Tinfoil. Default is admin
.
Password: The AUTH_PASSWORD
environment variable, as seen above. If you change this, make sure to update your connection details in Tinfoil. Default is adminadmin
.
Title: Anything you like. We like to keep it simple with TorBox Tinfoil Server
.
Enabled: YES
- Make sure you have Docker installed on your server/computer. If on a server, you can find instructions here (you can change your distribution in the guide). If on a computer, you can find instructions here (you can change your computer type on the left side).
- Edit the below Docker command with your proper environment variables and options.
docker run -it -d \
-p 8000:8000 \
-e TORBOX_API_KEY=<EDIT_THIS_KEY> \
-e AUTH_USERNAME=admin \
-e AUTH_PASSWORD=adminadmin \
-e PORT=8000 \
anonymoussystems/torbox-tinfoil-server:latest
or if you prefer Docker compose, this is the yaml, also found here.
name: torbox-tinfoil-server
services:
torbox-tinfoil-server:
stdin_open: true
tty: true
ports:
- 8000:8000
environment:
- TORBOX_API_KEY=<EDIT_THIS_KEY>
- AUTH_USERNAME=admin
- AUTH_PASSWORD=adminadmin
- PORT=8000
image: anonymoussystems/torbox-tinfoil-server:latest
You may also use the Github repository container found here: ghcr.io/torbox-app/torbox-tinfoil-server:latest
- Connect using the connection details found above from Tinfoil.
- Make sure you have Python installed. Anything from v3.6 should be okay.
- Download or git clone this repository.
git clone https://github.com/TorBox-App/torbox-tinfoil-server.git
or download repository zip here and extract the files.
- Create a
.env
file or rename.env.example
to.env
. - Edit or add in your environment variables to the
.env
file. - Install the requirements.
pip3 install -r requirements.txt
- If planning to run over the internet, make sure port 8000 is open. You may also edit this port using the
PORT
environment variable. - Run the
main.py
script.
python3 main.py
- Connect using the connection details found above from Tinfoil.
For support, email contact@torbox.app or join our Discord server here. We will not give sources or help with piracy in any way. This is for technical support only.
Contributions are always welcome!
Please make sure to follow Conventional Commits when creating commit messages. We will authorize most pull requests, so don't hesistate to help out!