Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Alumulemu Switch: Difference between revisions

From GameBrew
No edit summary
No edit summary
 
Line 20: Line 20:
}}
}}
<!--https://dlhb.gamebrew.org/switchhomebrews/AlumulemuSwitch.7z-->
<!--https://dlhb.gamebrew.org/switchhomebrews/AlumulemuSwitch.7z-->
​Alumulemu is a package repository manager specifically designed for the Nintendo Switch's Horizon operating system. Its primary function is to facilitate the hosting of Tinfoil repositories, enabling users to manage and distribute software packages seamlessly. The project emphasizes simplicity in setup, usage, and maintenance, making it accessible for users seeking to establish their own repositories.
​Alumulemu is a library manager for the Nintendo Switch OS Horizon.  
 
It reads the database from [https://surrealdb.com/ SurrealDB] (Tinfoil-compatible).  


== Features ==
== Features ==
* '''SurrealDB-based backend''': Alumulemu uses [https://surrealdb.com/ SurrealDB] for efficient data storage and retrieval, allowing for the database to be easily scaled, managed, and queried. You may run the repository from an embedded instance or link it to an external SurrealDB instance.
*Support for automatically reading XCI/XCZ, and NSP/NSZ files.
* Web interface: Alumulemu provides a web interface for managing the server and viewing package metadata. The web interface is built using [https://vuejs.org/ Vue.js] and [https://tailwindcss.com/ Tailwind CSS].
*Caching TitleDB, and efficient querying and indexing using SurrealDB.
* '''REST API''': Alumulemu provides a REST API for managing the repository and querying package metadata. Documentation for the API will be available in the future.
*Full games overview.
 
*Querying TitleDB, and importing games via downloading through URLs and UltraNX's archive (Example implementation).
== Usage ==
*Extensible importer interface, so anyone can add their own title importers easily in a PR.
You will require:
*RBAC access.
 
*Configuration through environment variables.
* A Nintendo Switch or Switch 2 console (optional, jailbroken)
* A server to host Alumulemu
* SurrealDB instance (optional, recommended for better performance)
* Console-specific cryptographic keys (required, obtain from your own device or take someone else's)
* A stable network connection (optional)
* Your own game dumps (optional)
 
=== Setup ===
# Dump the keys from your console using [https://github.com/saneki/Lockpick_RCM Lockpick_RCM].
# (Optional) Set up a SurrealDB instance. You can use the [https://hub.docker.com/r/surrealdb/surrealdb official SurrealDB Docker image] somewhere or use the RocksDB backend included with Alumulemu.
# Pull the OCI image from the [https://github.com/RyouVC/alumulemu/packages/ GitHub Container Registry].
# Run the container with the required environment variables and volumes.
 
=== Configuration ===
Alumulemu is configured using environment variables. The following environment variables are required:
 
* <code>ALU_DATABASE_URL</code>: The URL of the SurrealDB instance to use. If not set, Alumulemu will use the RocksDB backend mounted at <code>/data</code> in the container, or the <code>database</code> directory in the working directory if running from source. (<code>surrealkv:///data</code> or <code>surrealkv://database</code> respectively)
** <code>ALU_DATABASE_AUTH_METHOD</code>: The authentication method for the SurrealDB instance (optional). By default it will assume no authentication is required, used for embedded instances. Available options are <code>none</code>, <code>root</code> (todo: implement namespace auth).
*** <code>ALU_SURREAL_ROOT_USERNAME</code>: The username to use for the root user (optional). Required if <code>ALU_DATABASE_AUTH_METHOD</code> is set to <code>root</code>.
*** <code>ALU_SURREAL_ROOT_PASSWORD</code>: The password to use for the root user (optional). Required if <code>ALU_DATABASE_AUTH_METHOD</code> is set to <code>root</code>.
** <code>ALU_SURREAL_NAMESPACE</code>: The namespace to use for the database (optional). If not set, Alumulemu will use the default namespace. (<code>alumulemu</code>)
** <code>ALU_SURREAL_DATABASE</code>: The database to use for the namespace (optional). If not set, Alumulemu will use the default database. (<code>alumulemu</code>)
* <code>ALU_PRIMARY_REGION</code> (optional): Primary eShop metadata region to use. Defaults to <code>US</code>.<br />
 
* <code>ALU_PRIMARY_LANGUAGE</code> (optional): Primary eShop metadata language to use. Defaults to <code>en</code>.<br />
 
The region and language code is combined to form the locale code used to query the eShop title database. You may find the list of supported locales [https://github.com/blawar/titledb/blob/master/languages.json here].
 
* <code>ALU_SECONDARY_LOCALES</code> (optional): Secondary eShop metadata locales to pull from. Defaults to blank (no secondary locales). Values are comma-separated locale codes, delimited by an underscore. For example, <code>JP_ja,US_es</code> will pull Japanese titles from the Japanese eShop and Spanish titles from the US eShop.<br />
 
* <code>ALU_PROD_KEYS</code>: The path to the Switch production keys file. This is required to decrypt data from your ROMs.<br />
 
* <code>ALU_TITLE_KEYS</code>: The path to the Switch title keys file. This is required to decrypt some titles and DLCs.<br />
 
* <code>ALU_HOST</code>: The host to bind the server to. Defaults to <code>0.0.0.0:3000</code>.<br />
 
* <code>ALU_CACHE_DIR</code>: The directory to cache title database files in. Defaults to <code>.</code> (current working directory) or <code>/var/cache/alumulemu</code> if running in a container.<br />
 
* <code>ALU_PUBLIC</code>: Whether to run the server in public mode. Defaults to <code>false</code>. If set to <code>true</code>, the server will not require authentication to access the API. However administrative endpoints will still require authentication if there are users in the database.<br />
 
==== Optimizing database performance ====
You may switch to a different SurrealDB backend for better performance. The following backends are available for SurrealDB:
 
* <code>surrealkv</code>: The default backend, using [https://surrealdb.com/docs/surrealkv SurrealKV] for key-value storage. This is the fastest local backend, but may be less reliable. It's set as default due to its speed.
* <code>rocksdb</code>: The RocksDB backend, using [https://rocksdb.org/ RocksDB] for key-value storage. This is the most reliable backend, but may be slower than SurrealKV. It's recommended to use this backend for production environments.
* <code>tikv</code>: The TiKV backend, using [https://tikv.org/ TiKV] for distributed key-value storage. This is the most scalable backend, but may be slower depending on your network configuration. It's recommended to use this backend for large-scale deployments, such as multi-node clusters.
 
You may also connect to an external SurrealDB instance using WebSockets.
 
To set the database path, set the <code>ALU_DATABASE_URL</code> environment variable to the appropriate URL. For example, to use the RocksDB backend, set <code>ALU_DATABASE_URL</code> to <code>rocksdb:///data</code>, <code>surrealkv:///data</code> for SurrealKV, or <code>ws://localhost:8000</code> for an external instance.
 
=== Access titles ===
Alumulemu provides a web interface for viewing title metadata. You can simply go to the URL of your server in a web browser to access the interface.
 
==== Using Tinfoil ====
Alumulemu also provides a Tinfoil-compatible JSON index for use with Tinfoil. You can add the following URL to Tinfoil to access the repository:
 
<pre >http://&lt;your-server-ip&gt;:3000/api/tinfoil</pre>
 
=== Running ===
You can run a Docker/Podman container with the provided example <code>docker-compose.yml</code> file.
 
You may also build this project from source.
 
Note


Once the server is running, authentication is disabled by default when there are no users in the database. You should create a user by going to <code>/admin/users</code> and creating a user. It will then automatically lock down the server to require authentication.
== Installation ==
You will need:
* A Nintendo Switch console (jailbroken).
* A server to host Alumulemu.
* Console-specific cryptographic keys.
* Your own game dumps.
* SurrealDB instance (optional, recommended for better performance).
* A stable network connection (optional).


It is '''strongly recommended''' to set up authentication before running the server in a public environment.
[https://github.com/RyouVC/alumulemu/blob/main/README.md#usage Setup instructions.]


==Screenshots==
==Screenshots==
Line 111: Line 55:
==Changelog==  
==Changelog==  
'''v0.2.0'''
'''v0.2.0'''
* Implement RBAC authentication by [https://github.com/korewaChino @korewaChino] in [https://github.com/RyouVC/alumulemu/pull/3 #3]
* Implement RBAC authentication by [https://github.com/korewaChino @korewaChino] in [https://github.com/RyouVC/alumulemu/pull/3 #3].
** New users will now be assigned Viewer permissions by default
** New users will now be assigned Viewer permissions by default.
** First user created will be given Admin permissions for ease of setup
** First user created will be given Admin permissions for ease of setup.
** Viewers only have read-only access, Editors may import, rescan or edit game data, and Admins may create or remove users
** Viewers only have read-only access, Editors may import, rescan or edit game data, and Admins may create or remove users.
* '''Replaced importer plugin API with a simplified JSON-based standard''' ([https://github.com/RyouVC/alumulemu/issues/4 #4])
* Replaced importer plugin API with a simplified JSON-based standard ([https://github.com/RyouVC/alumulemu/issues/4 #4]).
* Tinfoil clients accessing the root path (<code>/</code>) will now be automatically redirected to <code>/api/tinfoil</code>
* Tinfoil clients accessing the root path (<code>/</code>) will now be automatically redirected to <code>/api/tinfoil</code>.
* New <code>Downloads</code> tab that keeps track of downloads
* New <code>Downloads</code> tab that keeps track of downloads.
* Attempt to handle invalid queries gracefully, avoiding panics
* Attempt to handle invalid queries gracefully, avoiding panics.
* General UI fixes
* General UI fixes.
** Title list grid should now be aligned to the center
** Title list grid should now be aligned to the center.
** Fixed padding, removing the black bars in the title list before the background
** Fixed padding, removing the black bars in the title list before the background.
** Title list and its pages should now be more mobile-friendly
** Title list and its pages should now be more mobile-friendly.
'''v0.1.2'''
'''v0.1.2'''
*Redirect trailing slashes, fixing Tinfoil clients.
*Redirect trailing slashes, fixing Tinfoil clients.
Line 131: Line 75:


== External links ==
== External links ==
* Gbatemp - https://gbatemp.net/threads/alumulemu-yet-another-tinfoil-compatible-library-manager.668881/
* GitHub - https://github.com/RyouVC/alumulemu
* Github - https://github.com/RyouVC/alumulemu
* GBAtemp - https://gbatemp.net/threads/alumulemu-yet-another-tinfoil-compatible-library-manager.668881/

Latest revision as of 06:20, 30 March 2025

Alumulemu
General
AuthorRyouVC
TypeGame Installer Companion
Version0.2.0
LicenseAGPL-3.0
Last Updated2025/03/30
Links
Download
Website
Source
Support Author

​Alumulemu is a library manager for the Nintendo Switch OS Horizon.

It reads the database from SurrealDB (Tinfoil-compatible).

Features

  • Support for automatically reading XCI/XCZ, and NSP/NSZ files.
  • Caching TitleDB, and efficient querying and indexing using SurrealDB.
  • Full games overview.
  • Querying TitleDB, and importing games via downloading through URLs and UltraNX's archive (Example implementation).
  • Extensible importer interface, so anyone can add their own title importers easily in a PR.
  • RBAC access.
  • Configuration through environment variables.

Installation

You will need:

  • A Nintendo Switch console (jailbroken).
  • A server to host Alumulemu.
  • Console-specific cryptographic keys.
  • Your own game dumps.
  • SurrealDB instance (optional, recommended for better performance).
  • A stable network connection (optional).

Setup instructions.

Screenshots

AlumulemuSwitch-01.png

AlumulemuSwitch-02.png

AlumulemuSwitch-03.png

AlumulemuSwitch-04.png

Changelog

v0.2.0

  • Implement RBAC authentication by @korewaChino in #3.
    • New users will now be assigned Viewer permissions by default.
    • First user created will be given Admin permissions for ease of setup.
    • Viewers only have read-only access, Editors may import, rescan or edit game data, and Admins may create or remove users.
  • Replaced importer plugin API with a simplified JSON-based standard (#4).
  • Tinfoil clients accessing the root path (/) will now be automatically redirected to /api/tinfoil.
  • New Downloads tab that keeps track of downloads.
  • Attempt to handle invalid queries gracefully, avoiding panics.
  • General UI fixes.
    • Title list grid should now be aligned to the center.
    • Fixed padding, removing the black bars in the title list before the background.
    • Title list and its pages should now be more mobile-friendly.

v0.1.2

  • Redirect trailing slashes, fixing Tinfoil clients.

v0.1.1

  • Properly implement static file router.

v0.1.0

  • First Release.

External links

Advertising: