Sign inSign up

doctorpangloss/nut

By doctorpangloss

•Updated over 7 years ago

A nut server

Image
8

100K+

doctorpangloss/nut repository overview

⁠Nut

An application for serving Switch titles.

⁠Getting Started With Docker

Here are some example snippets to help you get started creating a container.

Once you run these commands, you should be able to visit http://<your-ip>:9000, username guest, password guest.

Force a scan using http://<your-ip>:9000/api/scan. By default, scans start between 0 and 30 seconds after interacting with nut, and typically take 10 seconds to 2 minutes depending on the size of your collection.

⁠docker
docker create \
  --name=nut \
  --net=host
  -e PUID=1000 \
  -e PGID=1000 \
  -v </path/to/games>:/games \
  -v </optional/path/to/config>:/config \
  -v </optional/path/to/data>:/data \
  --restart unless-stopped \
  doctorpangloss/nut
⁠docker-compose

Compatible with docker-compose v2 schemas.

version: "2"
services:
  plex:
    image: dockerpangloss/nut
    container_name: nut
    network_mode: host
    environment:
      - PUID=1000
      - PGID=1000
    volumes:
      - </path/to/games>:/games
      - </optional/path/to/config>:/config
      - </optional/path/to/data>:/data
    restart: unless-stopped

⁠Parameters

Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate <external>:<internal> respectively. For example, -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 outside the container.

ParameterFunction
-e PUID=1000for UserID - see below for explanation
-e PGID=1000for GroupID - see below for explanation
-v /gamesGames should go here.
-v /configDirectory to copy default configuration files to. Optional. It will be populated with defaults.
-v /dataDirectory to save various nut runtime files to. Optional. It will be populated with images and other files nut needs to run.

⁠Optional Parameters

Special note - If you'd like to run nut without requiring --net=host, then you will need the following ports in your docker create command:

  -p 9000:9000

The application accepts a series of environment variables to further customize itself on boot:

ParameterFunction
-e NUT_SCAN_DEBOUNCE_SECONDS=30.0At most one scan can run in the last number of seconds specified here. This image is configured to scan automatically whenever you connect to nut.

⁠User / Group Identifiers

When using volumes (-v flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user PUID and group PGID.

Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.

In this instance PUID=1000 and PGID=1000, to find yours use id user as below:

  $ id username
    uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)

 

⁠Application Setup

There is a web UI at <your-ip>:9000. It will take some time to scan the titles, so be patient.

The default username and password is guest:guest. To change this, edit the /config/users.conf file.

⁠Docker Tips and Tricks

The rest of this document concerns running nut from a local directory on Windows, and portions of it are no longer up to date.

If the scanning takes too long, set an environment variable, NUT_SCAN_DEBOUNCE_SECONDS to a greater number of seconds, like 999, to prevent scanning from running too frequently.

To disable scanning, set the value of NUT_SCAN_DEBOUNCE_SECONDS to 99999999999.

Then, to force a scan, visit http://<your-ip>:9000/api/scan, and be patient!

Tag summary

Content type

Image

Digest

Size

118.6 MB

Last updated

over 7 years ago

docker pull doctorpangloss/nut