Skip to content
/ ownfoil Public
forked from a1ex4/ownfoil

Switch library manager, with a self-hosted Tinfoil Shop.

Notifications You must be signed in to change notification settings

drbeat/ownfoil

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ownfoil

Docker Pulls Docker Image Size (latest semver)

Ownfoil is a Nintendo Switch library manager, that will also turn your library into a fully customizable and self-hosted Tinfoil Shop. The goal of this project is to manage your library, identify any missing content (DLCs or updates) and provide a user friendly way to browse your content. Some of the features include:

  • multi user authentication
  • web interface for configuration
  • web interface for browsing the library
  • content identification using decryption or filename
  • Tinfoil shop customization

The project is still in development, expect things to break or change without notice.

Table of Contents

Installation

Using Docker

Docker run

Running this command will start the shop on port 8465 with the library in /your/game/directory :

docker run -d -p 8465:8465 -v /your/game/directory:/games -v /your/config/directory:/app/config --name ownfoil a1ex4/ownfoil

The shop is now accessible with your computer/server IP and port, i.e. http://localhost:8465 from the same computer or http://192.168.1.100:8465 from a device in your network.

Docker compose

Create a file named docker-compose.yml with the following content:

version: "3"

services:
  ownfoil:
    container_name: ownfoil
    image: a1ex4/ownfoil
   # environment:
   #   # For write permission in config directory
   #   - PUID=1000
   #   - PGID=1000
    volumes:
      - /your/game/directory:/games
      - ./config:/app/config
    ports:
      - "8465:8465"

Note

You can control the UID and GID of the user running the app in the container with the PUID and PGID environment variables. By default the user is created with 1000:1000. If you want to have the same ownership for mounted directories, you need to set those variables with the UID and GID returned by the id command.

You can then create and start the container with the command (executed in the same directory as the docker-compose file):

docker-compose up -d

This is usefull if you don't want to remember the docker run command and have a persistent and reproductible container configuration.

Using Python

Clone the repository using git, install the dependencies and you're good to go:

$ git clone --recurse-submodules https://github.com/a1ex4/ownfoil
$ cd ownfoil
$ pip install -r requirements.txt
$ python app/app.py

To update the app you will need to pull the latest commits.

Tinfoil setup

In Tinfoil, add a shop with the following settings:

  • Protocol: http (or https if using a SSL enabled reverse proxy)
  • Host: server/computer IP, i.e. 192.168.1.100
  • Port: host port of the container, i.e. 8000
  • Username: username as created in Ownfoil settings (if the shop is set to Private)
  • Password: password as created in Ownfoil settings (if the shop is set to Private)

Usage

Once Ownfoil is running you can access the Shop Web UI by navigating to the http://<computer/server IP>:8465.

User administration

Ownfoil requires an admin user to be created to enable Authentication for your Shop. Go to the Settings to create a first user that will have admin rights. Then you can add more users to your shop the same way.

Library administration

In the Settings page under the Library section, you can add directories containing your content. You can then manually trigger the library scan: Ownfoil will scan the content of the directories and try to identify every supported file (currently nsp, nsz, xci, xcz). There is watchdog in place for all your added directories: files moved, renamed, added or removed will be reflected directly in your library.

Titles configuration

In the Settings page under the Titles section is where you specify the language of your Shop (currently the same for all users).

This is where you can also upload your console keys file to enable content identification using decryption, instead of only using filenames. If you do not provide keys, Ownfoil expects the files to be named [APP_ID][vVERSION].

Shop customization

In the Settings page under the Shop section is where you customize your Shop, like the message displayed when successfully accessing the shop from Tinfoil or if the shop is private or public.

Roadmap

Planned feature, in no particular order.

  • Library browser:
    • Add "details" view for every content, to display versions etc
  • Library management:
    • Rename and organize library after content identification
    • Delete older updates
    • Automatic nsp/xci -> nsz conversion
  • Shop customization:
    • Encrypt shop
  • Support emulator Roms
    • Scrape box arts
    • Automatically create NSP forwarders
  • Saves manager:
    • Automatically discover Swicth device based on Tinfoil connection
    • Only backup and serve saves based on the user/Switch
  • External services:
    • Integrate torrent indexer Jackett to download updates automatically

Similar Projects

If you want to create your personal NSP Shop then check out these other similar projects:

About

Switch library manager, with a self-hosted Tinfoil Shop.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 49.0%
  • HTML 48.4%
  • CSS 1.5%
  • Other 1.1%