Coder Social home page Coder Social logo

shawly / docker-nut Goto Github PK

View Code? Open in Web Editor NEW
61.0 61.0 8.0 98 KB

Docker container for https://github.com/blawar/NUT. "latest" & "v3" tags use stable release v3.3. "edge" tag uses latest master source code.

License: GNU General Public License v3.0

Dockerfile 100.00%
docker docker-container docker-image hacktoberfest nut

docker-nut's People

Contributors

github-actions[bot] avatar shawly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker-nut's Issues

Compatibility report: Raspberry Pi 4B

Device:
e.g. Raspberry Pi 1B+
Raspberry Pi 4B 8GB(likely works on lower ram models as well)

Status:
[x] works
[ ] not working

Additional steps to get it to work?

  • none

Add option to specify user/password

Add option to change user/pass, according to the original readme it should be possible:

The IP/Port/User/Password are the information needed to login to the NUT server. To the right of those, you can also see a USB Status indicator, indicating whether a Tinfoil client is connected via USB with the server.

https://github.com/blawar/nut

markupsafe error

Changing the markupsafe version to 2.0.1 fixes the issue

pip install markupsafe==2.0.1

Update titledb flag is incorrect

The script in /var/run/s6/etc/cont-init.d/03-update-titledb is looking for UPDATE_TITLEDB instead of TITLEDB_UPDATE.

The documentation says that the latter should be correct.

5: TITLEDB_UPDATE=${UPDATE_TITLEDB:-true}

[HELP] try to access server

Hello,

thank you for this project. I would need some help. I have installed in synology docker this project and I have run it in docker following all the parameters. In principle it does not give any error and is working. I have created the folders and I have put some NSZ to test.

From browser I get a blank page when I want to access the ip/port after logging in with the user and password guest and from nintendo switch I configure it in tinfoil and it does not load anything at all.

What should I do?

Thanks!

[HELP] Ram usage

I have read and followed all troubleshooting steps from the README.md?

Yes

Running on an Unraid Server, i5 gen 12 with 16GB of Ram.
Scans a folder with 60+ Images of all types.
I can see Ram usage rising forever until it freezes my server.

Output of docker version:

 Version:           20.10.24
 API version:       1.41
 Go version:        go1.19.7
 Git commit:        297e128
 Built:             Tue Apr  4 18:17:06 2023
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.24
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.19.7
  Git commit:       5d6db84
  Built:            Tue Apr  4 18:23:02 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.6.20
  GitCommit:        2806fc1057397dbaeefbea0e4e17bddfbd388f38
 runc:
  Version:          1.1.5
  GitCommit:        v1.1.5-0-gf19387a6
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Output of docker ps -a -f "ancestor=shawly/nut":

CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES```

Output of `docker logs CONTAINERNAME` (replace *CONTAINERNAME* with your nut container's name):
``` docker logs nut
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-adduser: executing... 

-------------------------------------
GID/UID
-------------------------------------

User uid:    99
User gid:    100
-------------------------------------

[cont-init.d] 00-adduser: exited 0.
[cont-init.d] 01-create_configs: executing... 

-------------------------------------
Checking conf folder... 
-------------------------------------

Downloading latest blacklist.online.txt...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1615  100  1615    0     0   9443      0 --:--:-- --:--:-- --:--:--  9500

keys.txt not found! Copying keys_template.txt...
'/nut/keys_template.txt' -> '/nut/conf/keys_template.txt'

Changing ownership of /nut/conf folder...

-------------------------------------

[cont-init.d] 01-create_configs: exited 0.
[cont-init.d] 02-fix-ownership: executing... 

-------------------------------------
Checking ownership of /nut folder
-------------------------------------
USER_ID differs from default, adjusting ownership...
GROUP_ID differs from default, adjusting ownership...

Done.
-------------------------------------

[cont-init.d] 02-fix-ownership: exited 0.
[cont-init.d] 03-update-titledb: executing... 

-------------------------------------
Updating titledb...
-------------------------------------
Updating titledb, this might take some time...
Removing blockchain.json
Removing db.bin
Removing demos.txt
Removing ranks.txt
Updating files: 100% (70/70), done.
HEAD is now at e44747b meta
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint: 
hint:   git config pull.rebase false  # merge (the default strategy)
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.
error: pack-objects died of signal 9
fatal: failed to run repack
Importing titledb...
loading blacklist /nut/conf/blacklist.online.txt
could not load find or load keys.txt, all crypto operations will fail. See keys_template.txt for an example of how this file should look
loaded user outerbeam
loaded user crontab
                        ,;:;;,
                       ;;;;;
               .=',    ;:;;:,
              /_', "=. ';:;:;
              @=:__,  \,;:;:'
                _(\.=  ;:;;'
               `"_(  _/="`
                `"'
downloading titledb files
could not get title id from filename, name needs to contain [titleId] : titledb/db.nza
unknown extension titledb/db.nza
loaded titledb/BG.en.json in 0.23823208804242313 seconds
loaded titledb/BR.en.json in 0.2786967830033973 seconds
loaded titledb/BR.pt.json in 0.25442978797946125 seconds
loaded titledb/CH.fr.json in 0.3129976249765605 seconds
loaded titledb/CH.de.json in 0.2833185640629381 seconds
loaded titledb/CH.it.json in 0.20778160297777504 seconds
loaded titledb/CY.en.json in 0.32592927501536906 seconds
loaded titledb/EE.en.json in 0.217059409013018 seconds
loaded titledb/HR.en.json in 0.3280035461066291 seconds
loaded titledb/IE.en.json in 0.20759940205607563 seconds
loaded titledb/LT.en.json in 0.3745210620108992 seconds
loaded titledb/LU.fr.json in 0.22442532505374402 seconds
loaded titledb/LU.de.json in 0.2370595260290429 seconds
loaded titledb/LV.en.json in 0.22769209509715438 seconds
loaded titledb/MT.en.json in 0.3804416839266196 seconds
loaded titledb/RO.en.json in 0.24732681398745626 seconds
loaded titledb/SI.en.json in 0.20107219193596393 seconds
loaded titledb/SK.en.json in 0.21566999901551753 seconds
loaded titledb/CO.en.json in 0.41167985007632524 seconds
loaded titledb/CO.es.json in 0.1925435570301488 seconds
loaded titledb/AR.en.json in 0.1786764229182154 seconds
loaded titledb/AR.es.json in 0.22418079292401671 seconds
loaded titledb/CL.en.json in 0.15865069394931197 seconds
loaded titledb/CL.es.json in 0.5119115631096065 seconds
loaded titledb/PE.en.json in 0.2225921950303018 seconds
loaded titledb/PE.es.json in 0.06662097200751305 seconds
loaded titledb/KR.ko.json in 0.2605207309825346 seconds
loaded titledb/HK.zh.json in 0.21654023602604866 seconds
loaded titledb/CN.zh.json in 0.001914230058901012 seconds
loaded titledb/NZ.en.json in 0.3120957480277866 seconds
loaded titledb/AT.de.json in 0.26717358792666346 seconds
loaded titledb/BE.fr.json in 0.7716057630022988 seconds
loaded titledb/BE.nl.json in 0.330633657053113 seconds
loaded titledb/CZ.en.json in 0.36277278105262667 seconds
loaded titledb/DK.en.json in 0.33124052197672427 seconds
loaded titledb/ES.es.json in 0.8273201079573482 seconds
loaded titledb/FI.en.json in 0.3281622489448637 seconds
loaded titledb/GR.en.json in 0.2636249699862674 seconds
loaded titledb/HU.en.json in 0.4083807209972292 seconds
loaded titledb/NL.nl.json in 0.05970189091749489 seconds
loaded titledb/NO.en.json in 0.2530761630041525 seconds
loaded titledb/PL.en.json in 0.06725593900773674 seconds
loaded titledb/PT.pt.json in 0.26215814298484474 seconds
loaded titledb/RU.ru.json in 0.4702012409688905 seconds
loaded titledb/ZA.en.json in 0.9067188119515777 seconds
loaded titledb/SE.en.json in 0.21341966302134097 seconds
loaded titledb/MX.en.json in 0.3219240440521389 seconds
loaded titledb/MX.es.json in 0.3498591741081327 seconds
loaded titledb/IT.it.json in 0.24887360201682895 seconds
loaded titledb/CA.en.json in 0.3427913310006261 seconds
loaded titledb/CA.fr.json in 0.3960959539981559 seconds
loaded titledb/FR.fr.json in 0.3958309319568798 seconds
loaded titledb/DE.de.json in 1.0443688619416207 seconds
loaded titledb/JP.ja.json in 0.3880105720600113 seconds
loaded titledb/AU.en.json in 0.3048323739785701 seconds
loaded titledb/GB.en.json in 0.3167701020138338 seconds
loaded titledb/US.en.json in 0.3143638380570337 seconds
loaded titledb/US.es.json in 0.321275805006735 seconds
loaded titledb/demos.txt in 0.019343390013091266 seconds
loaded titledb/ranks.txt in 0.31630631897132844 seconds
loaded titledb/versions.txt in 0.5123124519595876 seconds
loaded titledb/titles.json in 0.5696608698926866 seconds
loaded file list in 0.00015079102013260126 seconds
loaded titledb/demos.txt in 0.014075087034143507 seconds
loaded titledb/ranks.txt in 0.2646115570096299 seconds
loaded titledb/versions.txt in 0.3857278940267861 seconds
loaded titledb/demos.txt in 0.014465661020949483 seconds
loaded titledb/ranks.txt in 0.2933268820634112 seconds
loaded titledb/versions.txt in 0.37920851202216 seconds
nut exception: 0

Done.
-------------------------------------

[cont-init.d] 03-update-titledb: exited 0.
[cont-init.d] 04-update-crontabs: executing... 

-------------------------------------
Updating /etc/crontabs/root...
-------------------------------------
Checking if there is a crontab user in your users.conf...
Found crontab user!

Found schedule for command scan: 0/30 * * * *
Added scan schedule to /etc/crontabs/root...

Done.
-------------------------------------

[cont-init.d] 04-update-crontabs: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
loading blacklist /nut/conf/blacklist.online.txt
could not load find or load keys.txt, all crypto operations will fail. See keys_template.txt for an example of how this file should look
loaded user outerbeam
loaded user crontab
                        ,;:;;,
                       ;;;;;
               .=',    ;:;;:,
              /_', "=. ';:;:;
              @=:__,  \,;:;:'
                _(\.=  ;:;;'
               `"_(  _/="`
                `"'
loaded titledb/titles.json in 0.6121993530541658 seconds
loaded file list in 5.36689767614007e-05 seconds
scanning .
scanning Animal Crossing New Horizons [DLC Nook Inc silk rug] [01006F800232712D][v0].nsp
scanning Animal Crossing New Horizons [DLC Special Order Ticket ACPC Tie-in Campaign] [01006F800232712C][v0].nsp
scanning Animal Crossing New Horizons [DLC Special Order Ticket Pocket Camp tie-in campaign] [01006F800232712C][v0].nsp```

**### Had to delete 590 lines with DLCs...**

```scanning The Legend of Zelda Skyward Sword HD [01002DA013484000][v0] (7.07 GB).nsp
Sat Dec 16 12:50:28 2023 Server Starts - 0.0.0.0:9000
routing to getScan
scanning .
127.0.0.1 - - [16/Dec/2023 13:00:00] "GET /api/scan HTTP/1.1" 200 -
[NUT API Script] Executing scan successful!```

Output of `id` (you should be logged in with the user that owns your games directory):
```on server :
root@Server:~# id
uid=0(root) gid=0(root) groups=0(root)

in the container : 
/nut # id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)

Output of docker exec --user nut CONTAINERNAME id (replace CONTAINERNAME with your nut container's name):

uid=99(nut) gid=100(users) groups=100(users)

Output of ls -l /path/to/your/games/folder:

total 26718332
drwxrwxrwx 1 nobody users        220 Nov 21 16:52 Alien\ Isolation\ [NSZ]/
drwxrwxrwx 1 nobody users         86 Nov 15 12:46 Animal\ Crossing\ New\ Horizons\ [NSP]/
drwxrwxrwx 1 nobody users        186 Nov 15 10:10 Celeste\ [NSZ]/
drwxrwxrwx 1 nobody users        214 Nov 21 15:16 Chained\ Echoes\ [NSZ]/
drwxrwxrwx 1 nobody users        186 Dec 14 11:48 Chants\ of\ Sennaar\ [NSP]/
drwxrwxrwx 1 nobody users        766 Nov 15 09:31 Dead\ Cells\ [NSP]/
drwxrwxrwx 1 nobody users        202 Nov 21 14:42 Death's\ Door\ [NSZ]/
drwxrwxrwx 1 nobody users        228 Dec 14 11:54 Destroy\ All\ Humans\ [NSZ]/
drwxrwxrwx 1 nobody users         40 Dec 14 12:22 Diablo\ 3\ [NSP]/
drwxrwxrwx 1 nobody users        414 Nov 21 15:35 Dragon\ Quest\ XI\ S\ Echoes\ of\ an\ Elusive\ Age\ Definitive\ Edition\ [NSZ]/
drwxrwxrwx 1 nobody users         66 Nov 15 09:58 Enter,\ Exit\ the\ Gungeon\ [NSZ]/
drwxrwxrwx 1 nobody users        226 Dec 14 11:45 FIST\ Forged\ in\ Shadow\ Torch\ [NSP]/
drwxrwxrwx 1 nobody users        232 Nov 15 09:55 Fire\ Emblem\ Three\ Houses\ [NSP]/
drwxrwxrwx 1 nobody users        138 Nov 15 09:09 Hades\ [NSP]/
drwxrwxrwx 1 nobody users        194 Nov 15 09:58 Hellboy\ Web\ of\ Wyrd\ [NSP]/
drwxrwxrwx 1 nobody users        210 Nov 15 08:32 Hollow\ Knight\ [NSZ]/
drwxrwxrwx 1 nobody users        182 Nov 15 09:01 Inside\ [NSZ]/
drwxrwxrwx 1 nobody users         77 Apr  1  2022 Kirby\ and\ the\ Forgotten\ Land\ [NSP]/
-rw-rw-rw- 1 nobody users 8276406883 Jun  8  2022 Luigi's\ Mansion\ 3\ [0100DCA0064A6000]\ [v327680]\ (1G+1U+2D).nsp
drwxrwxrwx 1 nobody users        162 Mar  5  2022 Luigis\ Mansion\ 3\ [NSZ]/
drwxrwxrwx 1 nobody users        388 Nov 15 09:26 Mario\ Kart\ 8\ Deluxe\ [NSZ]/
drwxrwxrwx 1 nobody users        250 Nov 15 09:59 Mario\ plus\ Rabbids\ Sparks\ of\ Hope\ [NSP]/
-rw-rw-rw- 1 nobody users 4470874072 Jun  8  2022 Metroid\ Dread\ [010093801237C000]\ [v262144]\ (1G+1U).nsp
drwxrwxrwx 1 nobody users        139 Mar  5  2022 Metroid\ Dread\ [NSZ]/
drwxrwxrwx 1 nobody users        102 Nov 15 09:08 Metroid\ Prime\ Remastered\ [NSP]/
drwxrwxrwx 1 nobody users        344 Nov 15 11:38 Monster\ Hunter\ Rise\ [NSP]/
drwxrwxrwx 1 nobody users        328 Nov 15 09:50 Moonlighter\ [NSZ]/
drwxrwxrwx 1 nobody users        194 Nov 15 10:30 My\ Time\ at\ Sandrock\ [NSP]/
drwxrwxrwx 1 nobody users       1720 Dec 16 02:24 NES,\ SNES\ -\ Nintendo\ Switch\ Online\ (NSO\ Official\ Games)\ [NSZ]/
drwxrwxrwx 1 nobody users        436 Nov 21 14:39 NieR\ Automata\ The\ End\ of\ YoRHa\ Edition\ [NSP]/
drwxrwxrwx 1 nobody users        196 Nov 15 09:59 Octopath\ Traveler\ 2\ [NSP]/
drwxrwxrwx 1 nobody users        274 Nov 15 09:25 Ori\ and\ the\ Will\ of\ the\ Wisps\ [NSZ]/
drwxrwxrwx 1 nobody users        200 Dec 14 11:09 Outer\ Wilds\ [NSZ]/
drwxrwxrwx 1 nobody users        228 Nov 15 09:35 Paper\ Mario\ The\ Origami\ King\ [NSP]/
drwxrwxrwx 1 nobody users        150 Nov 15 10:43 Pikmin\ 4\ [NSP]/
drwxrwxrwx 1 nobody users        202 Mar  5  2022 Pokemon\ Legends\ Arceus\ [NSZ]/
drwxrwxrwx 1 nobody users        162 Nov 15 10:06 Pokemon\ Lets\ Go\ Eevee\ +\ Pikachu\ +\ Quest\ +\ Torunament\ DX\ [NSP]/
drwxrwxrwx 1 nobody users        244 Nov 15 10:48 Remnant\ From\ the\ Ashes\ [NSZ]/
drwxrwxrwx 1 nobody users         52 Dec 14 11:59 Rogue\ Legacy\ 1-2\ [NSZ]/
drwxrwxrwx 1 nobody users        206 Nov 15 09:32 Sea\ of\ Stars\ [NSZ]/
drwxrwxrwx 1 nobody users        172 Nov 15 10:51 Snowrunner\ [NSP]/
drwxrwxrwx 1 nobody users        180 Nov 15 10:33 Sonic\ Origins\ [NSP]/
drwxrwxrwx 1 nobody users        170 Nov 15 11:05 Splatoon\ 3\ [NSP]/
drwxrwxrwx 1 nobody users        214 Nov 15 08:47 Stardew\ Valley\ [NSZ]/
-rw-rw-rw- 1 nobody users 3086483216 Aug 13  2022 Super\ Mario\ 3D\ World\ Bowsers\ Fury\ [010028600EBDA000][v0]\ (2.87\ GB).nsp
drwxrwxrwx 1 nobody users        178 Mar  5  2022 Super\ Mario\ 3D\ World\ Bowsers\ Fury\ [NSZ]/
drwxrwxrwx 1 nobody users        102 Nov 15 08:26 Super\ Mario\ Bros\ Wonder\ [NSP]/
drwxrwxrwx 1 nobody users        318 Nov 15 11:24 Super\ Mario\ Maker\ 2\ [NSP]/
drwxrwxrwx 1 nobody users        119 Mar  5  2022 Super\ Mario\ Odyssey\ [NSP]/
-rw-rw-rw- 1 nobody users 3930764176 Jun  8  2022 Super\ Smash\ Bros\ Ultimate\ [01006A800016E800][v1769472]\ (3.66\ GB).nsp
drwxrwxrwx 1 nobody users        184 Mar  5  2022 Super\ Smash\ Bros\ Ultimate\ [NSZ]/
drwxrwxrwx 1 nobody users       4096 Mar  5  2022 The\ Legend\ of\ Zelda\ Breath\ of\ the\ Wild\ [NSP]/
drwxrwxrwx 1 nobody users        276 Nov 15 08:48 The\ Legend\ of\ Zelda\ Links\ Awakening\ [NSZ]/
-rw-rw-rw- 1 nobody users 7595029776 Jun  8  2022 The\ Legend\ of\ Zelda\ Skyward\ Sword\ HD\ [01002DA013484000][v0]\ (7.07\ GB).nsp
drwxrwxrwx 1 nobody users        184 Mar  5  2022 The\ Legend\ of\ Zelda\ Skyward\ Sword\ HD\ [NSZ]/
drwxrwxrwx 1 nobody users        278 Nov 15 08:55 The\ Legend\ of\ Zelda\ Tears\ of\ the\ Kingdom\ [NSP]/
drwxrwxrwx 1 nobody users        204 Dec 14 11:42 Undertale\ [NSP]/
drwxrwxrwx 1 nobody users         40 Dec 10 10:32 Vampire\ Survivors\ [NSZ]/
drwxrwxrwx 1 nobody users        320 Dec 14 12:00 Void\ Bastards\ [NSZ]/
drwxrwxrwx 1 nobody users         88 Nov 15 08:49 WarioWare\ Move\ It\ [NSP]/
drwxrwxrwx 1 nobody users        218 Nov 21 16:22 Xenoblade\ Chronicles\ 3\ [NSP]/
drwxr-xr-x 1 nobody users       2016 Dec 16 11:05 images/

Output of docker exec CONTAINERNAME ls -l /nut/titles (replace CONTAINERNAME with your nut container's name):

total 26718332
drwxrwxrwx 1 nut users        220 Nov 21 16:52 Alien Isolation [NSZ]
drwxrwxrwx 1 nut users         86 Nov 15 12:46 Animal Crossing New Horizons [NSP]
drwxrwxrwx 1 nut users        186 Nov 15 10:10 Celeste [NSZ]
drwxrwxrwx 1 nut users        214 Nov 21 15:16 Chained Echoes [NSZ]
drwxrwxrwx 1 nut users        186 Dec 14 11:48 Chants of Sennaar [NSP]
drwxrwxrwx 1 nut users        766 Nov 15 09:31 Dead Cells [NSP]
drwxrwxrwx 1 nut users        202 Nov 21 14:42 Death's Door [NSZ]
drwxrwxrwx 1 nut users        228 Dec 14 11:54 Destroy All Humans [NSZ]
drwxrwxrwx 1 nut users         40 Dec 14 12:22 Diablo 3 [NSP]
drwxrwxrwx 1 nut users        414 Nov 21 15:35 Dragon Quest XI S Echoes of an Elusive Age Definitive Edition [NSZ]
drwxrwxrwx 1 nut users         66 Nov 15 09:58 Enter, Exit the Gungeon [NSZ]
drwxrwxrwx 1 nut users        226 Dec 14 11:45 FIST Forged in Shadow Torch [NSP]
drwxrwxrwx 1 nut users        232 Nov 15 09:55 Fire Emblem Three Houses [NSP]
drwxrwxrwx 1 nut users        138 Nov 15 09:09 Hades [NSP]
drwxrwxrwx 1 nut users        194 Nov 15 09:58 Hellboy Web of Wyrd [NSP]
drwxrwxrwx 1 nut users        210 Nov 15 08:32 Hollow Knight [NSZ]
drwxrwxrwx 1 nut users        182 Nov 15 09:01 Inside [NSZ]
drwxrwxrwx 1 nut users         77 Apr  1  2022 Kirby and the Forgotten Land [NSP]
-rw-rw-rw- 1 nut users 8276406883 Jun  8  2022 Luigi's Mansion 3 [0100DCA0064A6000] [v327680] (1G+1U+2D).nsp
drwxrwxrwx 1 nut users        162 Mar  5  2022 Luigis Mansion 3 [NSZ]
drwxrwxrwx 1 nut users        388 Nov 15 09:26 Mario Kart 8 Deluxe [NSZ]
drwxrwxrwx 1 nut users        250 Nov 15 09:59 Mario plus Rabbids Sparks of Hope [NSP]
-rw-rw-rw- 1 nut users 4470874072 Jun  8  2022 Metroid Dread [010093801237C000] [v262144] (1G+1U).nsp
drwxrwxrwx 1 nut users        139 Mar  5  2022 Metroid Dread [NSZ]
drwxrwxrwx 1 nut users        102 Nov 15 09:08 Metroid Prime Remastered [NSP]
drwxrwxrwx 1 nut users        344 Nov 15 11:38 Monster Hunter Rise [NSP]
drwxrwxrwx 1 nut users        328 Nov 15 09:50 Moonlighter [NSZ]
drwxrwxrwx 1 nut users        194 Nov 15 10:30 My Time at Sandrock [NSP]
drwxrwxrwx 1 nut users       1720 Dec 16 02:24 NES, SNES - Nintendo Switch Online (NSO Official Games) [NSZ]
drwxrwxrwx 1 nut users        436 Nov 21 14:39 NieR Automata The End of YoRHa Edition [NSP]
drwxrwxrwx 1 nut users        196 Nov 15 09:59 Octopath Traveler 2 [NSP]
drwxrwxrwx 1 nut users        274 Nov 15 09:25 Ori and the Will of the Wisps [NSZ]
drwxrwxrwx 1 nut users        200 Dec 14 11:09 Outer Wilds [NSZ]
drwxrwxrwx 1 nut users        228 Nov 15 09:35 Paper Mario The Origami King [NSP]
drwxrwxrwx 1 nut users        150 Nov 15 10:43 Pikmin 4 [NSP]
drwxrwxrwx 1 nut users        202 Mar  5  2022 Pokemon Legends Arceus [NSZ]
drwxrwxrwx 1 nut users        162 Nov 15 10:06 Pokemon Lets Go Eevee + Pikachu + Quest + Torunament DX [NSP]
drwxrwxrwx 1 nut users        244 Nov 15 10:48 Remnant From the Ashes [NSZ]
drwxrwxrwx 1 nut users         52 Dec 14 11:59 Rogue Legacy 1-2 [NSZ]
drwxrwxrwx 1 nut users        206 Nov 15 09:32 Sea of Stars [NSZ]
drwxrwxrwx 1 nut users        172 Nov 15 10:51 Snowrunner [NSP]
drwxrwxrwx 1 nut users        180 Nov 15 10:33 Sonic Origins [NSP]
drwxrwxrwx 1 nut users        170 Nov 15 11:05 Splatoon 3 [NSP]
drwxrwxrwx 1 nut users        214 Nov 15 08:47 Stardew Valley [NSZ]
-rw-rw-rw- 1 nut users 3086483216 Aug 13  2022 Super Mario 3D World Bowsers Fury [010028600EBDA000][v0] (2.87 GB).nsp
drwxrwxrwx 1 nut users        178 Mar  5  2022 Super Mario 3D World Bowsers Fury [NSZ]
drwxrwxrwx 1 nut users        102 Nov 15 08:26 Super Mario Bros Wonder [NSP]
drwxrwxrwx 1 nut users        318 Nov 15 11:24 Super Mario Maker 2 [NSP]
drwxrwxrwx 1 nut users        119 Mar  5  2022 Super Mario Odyssey [NSP]
-rw-rw-rw- 1 nut users 3930764176 Jun  8  2022 Super Smash Bros Ultimate [01006A800016E800][v1769472] (3.66 GB).nsp
drwxrwxrwx 1 nut users        184 Mar  5  2022 Super Smash Bros Ultimate [NSZ]
drwxrwxrwx 1 nut users       4096 Mar  5  2022 The Legend of Zelda Breath of the Wild [NSP]
drwxrwxrwx 1 nut users        276 Nov 15 08:48 The Legend of Zelda Links Awakening [NSZ]
-rw-rw-rw- 1 nut users 7595029776 Jun  8  2022 The Legend of Zelda Skyward Sword HD [01002DA013484000][v0] (7.07 GB).nsp
drwxrwxrwx 1 nut users        184 Mar  5  2022 The Legend of Zelda Skyward Sword HD [NSZ]
drwxrwxrwx 1 nut users        278 Nov 15 08:55 The Legend of Zelda Tears of the Kingdom [NSP]
drwxrwxrwx 1 nut users        204 Dec 14 11:42 Undertale [NSP]
drwxrwxrwx 1 nut users         40 Dec 10 10:32 Vampire Survivors [NSZ]
drwxrwxrwx 1 nut users        320 Dec 14 12:00 Void Bastards [NSZ]
drwxrwxrwx 1 nut users         88 Nov 15 08:49 WarioWare Move It [NSP]
drwxrwxrwx 1 nut users        218 Nov 21 16:22 Xenoblade Chronicles 3 [NSP]
drwxr-xr-x 1 nut users       2016 Dec 16 11:05 images

My docker run command or my docker-compose.yml:
/usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker create --name='nut' --net='bridge' -e TZ="America/Los_Angeles" -e HOST_OS="Unraid" -e HOST_HOSTNAME="Server" -e HOST_CONTAINERNAME="nut" -e 'FIX_OWNERSHIP'='true' -e 'TITLEDB_UPDATE'='true' -e 'TITLEDB_URL'='https://github.com/blawar/titledb' -e 'TITLEDB_REGION'='US' -e 'TITLEDB_LANGUAGE'='en' -e 'NUT_API_SCHEDULES'='[{"scan": "0/30 * * * *"}]' -e 'USER_ID'='99' -e 'GROUP_ID'='100' -e 'UMASK'='022' -l net.unraid.docker.managed=dockerman -l net.unraid.docker.webui='http://[IP]:[PORT:9000]' -l net.unraid.docker.icon='https://raw.githubusercontent.com/A75G/docker-templates/master/templates/icons/nut.png' -l 'traefik.http.services.nut.loadbalancer.server.port'='9000' -l 'traefik.enable'='true' -l 'traefik.http.routers.nut.rule'='Host(`nut.outerbeam.com`)' -l 'traefik.http.routers.nut.entryPoints'='http' -p '9000:9000/tcp' -v '/mnt/user/APPLICATIONS/GAMES/SWITCH/':'/nut/titles':'rw' -v '/mnt/user/APPLICATIONS/GAMES/SWITCH HOMEBREWS/NUT/CONF':'/nut/conf':'rw' -v '/mnt/user/APPLICATIONS/GAMES/SWITCH HOMEBREWS/NUT/NSP_OUT':'/nut/_NSPOUT':'rw' -v '/mnt/user/APPLICATIONS/GAMES/SWITCH HOMEBREWS/NUT/DB':'/nut/titledb':'rw' --memory=6G 'shawly/nut:edge'

Here's the visible log after server freeze :

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1615  100  1615    0     0   8485      0 --:--:-- --:--:-- --:--:--  8500
Updating files: 100% (70/70), done.
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint: 
hint:   git config pull.rebase false  # merge (the default strategy)
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.
scanning Luigi's Mansion 3 [0100DCA0064A6000] [v327680] (1G+1U+2D).nsp
scanning Metroid Dread [010093801237C000] [v262144] (1G+1U).nsp
scanning Super Mario 3D World Bowsers Fury [010028600EBDA000][v0] (2.87 GB).nsp
scanning Super Smash Bros Ultimate [01006A800016E800][v1769472] (3.66 GB).nsp
scanning The Legend of Zelda Skyward Sword HD [01002DA013484000][v0] (7.07 GB).nsp
Sat Dec 16 12:50:28 2023 Server Starts - 0.0.0.0:9000
routing to getScan
scanning .
[NUT API Script] Executing scan successful!
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-adduser: executing... 
usermod: no changes

-------------------------------------
GID/UID
-------------------------------------

User uid:    99
User gid:    100
-------------------------------------

[cont-init.d] 00-adduser: exited 0.
[cont-init.d] 01-create_configs: executing... 

-------------------------------------
Checking conf folder... 
-------------------------------------

Downloading latest blacklist.online.txt...

keys.txt not found! Copying keys_template.txt...
'/nut/keys_template.txt' -> '/nut/conf/keys_template.txt'

Changing ownership of /nut/conf folder...

-------------------------------------

[cont-init.d] 01-create_configs: exited 0.
[cont-init.d] 02-fix-ownership: executing... 

-------------------------------------
Checking ownership of /nut folder
-------------------------------------
USER_ID differs from default, adjusting ownership...
GROUP_ID differs from default, adjusting ownership...

Done.
-------------------------------------

[cont-init.d] 02-fix-ownership: exited 0.
[cont-init.d] 03-update-titledb: executing... 

-------------------------------------
Updating titledb...
-------------------------------------
Updating titledb, this might take some time...
Removing blockchain.json
Removing db.bin
Removing demos.txt
Removing files.json
Removing ranks.txt
Removing titles.json
HEAD is now at e44747b meta

When limiting RAM to 2G, I get :

Updating titledb, this might take some time...
HEAD is now at e44747b meta
error: pack-objects died of signal 9
fatal: failed to run repack
Importing titledb...
loading blacklist /nut/conf/blacklist.online.txt
could not load find or load keys.txt, all crypto operations will fail. See keys_template.txt for an example of how this file should look
loaded user outerbeam
loaded user crontab
                        ,;:;;,
                       ;;;;;
               .=',    ;:;;:,
              /_', "=. ';:;:;
              @=:__,  \,;:;:'
                _(\.=  ;:;;'
               `"_(  _/="`
                `"'
downloading titledb files
Killed                                             

Done.
-------------------------------------

[cont-init.d] 03-update-titledb: exited 0.
[cont-init.d] 04-update-crontabs: executing... 

-------------------------------------
Updating /etc/crontabs/root...
-------------------------------------
Checking if there is a crontab user in your users.conf...
Found crontab user!

Found schedule for command scan: 0/30 * * * *
Added scan schedule to /etc/crontabs/root...

Done.
-------------------------------------

[cont-init.d] 04-update-crontabs: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
loading blacklist /nut/conf/blacklist.online.txt
could not load find or load keys.txt, all crypto operations will fail. See keys_template.txt for an example of how this file should look
loaded user outerbeam
loaded user crontab
                        ,;:;;,
                       ;;;;;
               .=',    ;:;;:,
              /_', "=. ';:;:;
              @=:__,  \,;:;:'
                _(\.=  ;:;;'
               `"_(  _/="`
                `"'
downloading titledb files
./run: line 8:   329 Killed                  s6-setuidgid nut python /nut/nut.py --scan --server
loading blacklist /nut/conf/blacklist.online.txt
could not load find or load keys.txt, all crypto operations will fail. See keys_template.txt for an example of how this file should look
loaded user outerbeam
loaded user crontab
                        ,;:;;,
                       ;;;;;
               .=',    ;:;;:,
              /_', "=. ';:;:;
              @=:__,  \,;:;:'
                _(\.=  ;:;;'
               `"_(  _/="`
                `"'
downloading titledb files

Organize API returns 404

Calling http://localhost:9000/api/organize (with the appropriate host) returns 404 error (and does not organize files).
The scan API however works fine.

Tested both the latest and edge releases on amd64.

AttributeError: module 'collections' has no attribute 'Mapping'

The docker has an issue running nut.py

The error seems related to Python 3.10+

Traceback (most recent call last):
  File "/nut/./nut.py", line 18, in <module>
    from nut import Title
  File "/nut/nut/__init__.py", line 24, in <module>
    import Fs
  File "/nut/Fs/__init__.py", line 1, in <module>
    from Fs.Xci import Xci
  File "/nut/Fs/Xci.py", line 2, in <module>
    from Fs.File import File
  File "/nut/Fs/File.py", line 4, in <module>
    from nut import Print
  File "/nut/nut/Print.py", line 1, in <module>
    from nut import Status
  File "/nut/nut/Status.py", line 4, in <module>
    from nut import Config
  File "/nut/nut/Config.py", line 871, in <module>
    load('conf/nut.conf')
  File "/nut/nut/Config.py", line 323, in load
    original = dict_merge(original, j)
  File "/nut/nut/Config.py", line 48, in dict_merge
    and isinstance(merge_dct[k], collections.Mapping)):
AttributeError: module 'collections' has no attribute 'Mapping'```

Found files in the titles folder

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I would like a way to debug if it works correctly on the NUT end, as i can connect to my nut server just fine, but it does not show any of the three nsp files i have in there, all of which work just fine if i load up the nut server on my windows machine.

Describe the solution you'd like
A clear and concise description of what you want to happen.
a flag you can enable so it will list files in the titles folder that is found, can be some output of NUT or just a check of the files to check it sees the folder correctly.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
nothing really, other than trying different folders, since the current way is that the folder is actually hosted on my NAS, and is mapped as a local folder so all things should just see it as a folder, not some mysterious black hole.

Additional context
Add any other context or screenshots about the feature request here.
nothing really. i think i asked for what i wanted without too many spelling mistakes :P

Add support for custom parameters at startup

Is your feature request related to a problem? Please describe.
I want to add --organize to the parameters

Describe the solution you'd like
Add a docker variable for extra parameters

Describe alternatives you've considered
.

Additional context
.

[HELP] infinite loop i can't figure out

Hi,

I managed to get the container running on my Synology NAS. I had a bit of trouble initially with permission issues, but I believe I've resolved everything now. However, I could use some help with an issue—I'm still encountering an error at startup that I can't seem to figure out and the program seems to be stuck in an endless loop. I'm having trouble pinpointing what I might have done wrong.

tail of the log:

downloading titledb files
[NUT API Script] Using api url: http://localhost:9000/api
[NUT API Script] Executing scan failed!
[NUT API Script] Using api url: http://localhost:9000/api
[NUT API Script] Executing scan failed!
...

Thanks! (And thanks for the project!)

System configuration:
DSM 7.2-64570 Update 3

Output of docker version:

Client:
 Version:           20.10.23
 API version:       1.41
 Go version:        go1.19.1
 Git commit:        876964a
 Built:             Fri Sep  8 08:19:45 2023
 OS/Arch:           linux/arm64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.23
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.19.1
  Git commit:       5fcb1cf
  Built:            Fri Sep  8 08:17:14 2023
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          v1.6.15
  GitCommit:        b23a389d8c181697302d163356e97dec04eb8d88
 runc:
  Version:          v1.1.4
  GitCommit:        5af893d
 docker-init:
  Version:          0.19.0
  GitCommit:        ed96d00

Output of docker ps -a -f "ancestor=shawly/nut":

CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES

Output of docker logs CONTAINERNAME (replace CONTAINERNAME with your nut container's name):

s6-svwait: fatal: unable to subscribe to events for /var/run/s6/services/s6-fdholderd: Operation timed out
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-adduser: executing... 
usermod: no changes
-------------------------------------
GID/UID
-------------------------------------
User uid:    1026
User gid:    100
-------------------------------------
[cont-init.d] 00-adduser: exited 0.
[cont-init.d] 01-create_configs: executing... 
-------------------------------------
Checking conf folder... 
-------------------------------------
Downloading latest blacklist.online.txt...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  1615  100  1615    0     0   4271      0 --:--:-- --:--:-- --:--:--  4283
Found keys.txt! Copying back to /nut...
'/nut/conf/keys.txt' -> '/nut/keys.txt'
Changing ownership of /nut/conf folder...
-------------------------------------
[cont-init.d] 01-create_configs: exited 0.
[cont-init.d] 02-fix-ownership: executing... 
-------------------------------------
Checking ownership of /nut folder
-------------------------------------
USER_ID differs from default, adjusting ownership...
GROUP_ID differs from default, adjusting ownership...
Done.
-------------------------------------
[cont-init.d] 02-fix-ownership: exited 0.
[cont-init.d] 03-update-titledb: executing... 
-------------------------------------
Updating titledb...
-------------------------------------
TITLEDB_UPDATE was disabled, skipping titledb update.
Done.
-------------------------------------
[cont-init.d] 03-update-titledb: exited 0.
[cont-init.d] 04-update-crontabs: executing... 
-------------------------------------
Updating /etc/crontabs/root...
-------------------------------------
Checking if there is a crontab user in your users.conf...
Found crontab user!
Found schedule for command scan: 0/30 * * * *
Added scan schedule to /etc/crontabs/root...
Done.
-------------------------------------
[cont-init.d] 04-update-crontabs: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
loading blacklist /nut/conf/blacklist.online.txt
loaded user guest
loaded user crontab
                        ,;:;;,
                       ;;;;;
               .=',    ;:;;:,
              /_', "=. ';:;:;
              @=:__,  \,;:;:'
                _(\.=  ;:;;'
               `"_(  _/="`
                `"'
downloading titledb files
[NUT API Script] Using api url: http://localhost:9000/api
[NUT API Script] Executing scan failed!

Output of id (you should be logged in with the user that owns your games directory):

uid=1026(yz) gid=100(users) groups=100(users),101(administrators)

Output of docker exec --user nut CONTAINERNAME id (replace CONTAINERNAME with your nut container's name):

uid=1026(nut) gid=100(users) groups=100(users)

Output of ls -l /path/to/your/games/folder:

total 4
drwxrwxrwx 2 yz users 4096 Nov 10 21:30 images

Output of docker exec CONTAINERNAME ls -l /nut/titles (replace CONTAINERNAME with your nut container's name):

total 4
drwxrwxrwx 2 nut users 4096 Nov 10 20:30 images

My docker run command or my docker-compose.yml:

docker run -d --name=nut -e USER_ID=1026 -e GROUP_ID=100 -p 9001:9000 -v /volume1/nut/titles:/nut/titles:rw -v /volume1/nut/conf:/nut/conf:rw -v /volume1/nut/_NSPOUT:/nut/_NSPOUT:rw -v /volume1/nut/titledb:/nut/titledb:rw shawly/nut

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.