{"id":21346629,"url":"https://github.com/darkenergyprocessor/npps4","last_synced_at":"2026-02-01T09:04:28.141Z","repository":{"id":118332164,"uuid":"606164224","full_name":"DarkEnergyProcessor/NPPS4","owner":"DarkEnergyProcessor","description":"Null-Pointer Private Server 4th Iteration: Comprehensive SIF1 Private Server Implementation","archived":false,"fork":false,"pushed_at":"2026-01-10T11:35:24.000Z","size":5291,"stargazers_count":87,"open_issues_count":21,"forks_count":11,"subscribers_count":8,"default_branch":"master","last_synced_at":"2026-01-12T19:51:50.753Z","etag":null,"topics":["fastapi","llsif","lovelive","school-idol-festival","server-emulator","sif1","sqlalchemy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"zlib","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DarkEnergyProcessor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/funding.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"ko_fi":"npad93"}},"created_at":"2023-02-24T18:43:05.000Z","updated_at":"2026-01-10T11:31:02.000Z","dependencies_parsed_at":"2023-12-23T09:24:14.257Z","dependency_job_id":"36ecec9c-ff6d-4e9a-8906-9546a9087782","html_url":"https://github.com/DarkEnergyProcessor/NPPS4","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/DarkEnergyProcessor/NPPS4","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarkEnergyProcessor%2FNPPS4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarkEnergyProcessor%2FNPPS4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarkEnergyProcessor%2FNPPS4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarkEnergyProcessor%2FNPPS4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DarkEnergyProcessor","download_url":"https://codeload.github.com/DarkEnergyProcessor/NPPS4/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarkEnergyProcessor%2FNPPS4/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28974255,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T08:16:14.655Z","status":"ssl_error","status_checked_at":"2026-02-01T08:06:51.373Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","llsif","lovelive","school-idol-festival","server-emulator","sif1","sqlalchemy"],"created_at":"2024-11-22T02:09:51.972Z","updated_at":"2026-02-01T09:04:28.113Z","avatar_url":"https://github.com/DarkEnergyProcessor.png","language":"Python","funding_links":["https://ko-fi.com/npad93"],"categories":[],"sub_categories":[],"readme":"Null-Pointer Private Server: Revisited\n=====\n\n[![Python: 3.14](https://img.shields.io/badge/Python-3.14-blue)](https://www.python.org/)\n[![Static Type Checker: Pyright](https://img.shields.io/badge/Static%20Type%20Checker-Pyright-CEB98F)](https://github.com/microsoft/pyright)\n[![Code Style: Black](https://img.shields.io/badge/Code%20Style-Black-000000.svg)](https://github.com/psf/black)\n[![Build](https://github.com/DarkEnergyProcessor/NPPS4/actions/workflows/main.yml/badge.svg)](https://github.com/DarkEnergyProcessor/NPPS4/actions/workflows/main.yml)\n\nWIP SIF1 v9.11 private server written in Python 3.12+ using FastAPI.\n\nNotes\n-----\n\n* This project is currently in need of funding.\n\n* Database schema changes constantly. Expect frequent database wipes.\n\nRequirements\n-----\n\nNPPS4 supports Python 3.12 and later. Python 3.11 and earlier is not supported.\n\nInstall Manually\n----\n\n1. Install Python 3.12 or later.\n2. Create virtual environment.\n3. Activate it.\n4. `pip install -r requirements.txt -r requirements-perf.txt`\n\nNote: If you're using Termux, make sure to have Rust toolchain and remove `-r requirements-perf.txt`.\n\nInstall with Docker\n-----\n\nIf you want to build the container from source, run:\n```sh\ndocker build -t npps4 .\n```\n\nOr, if you want to use pre-compiled container as part of NPPS4 CI, run:\n```sh\ndocker pull ghcr.io/darkenergyprocessor/npps4:latest\n```\n\nThen run the container for the first time so it setup the necessary data in `path/to/data`:\n\n```sh\ndocker run --name npps4 -v path/to/data:/NPPS4/data -p 0.0.0.0:51376:51376 -it npps4\n```\n\nConfigure `config.sample.toml` then **save it as `config.toml`** (or save the modified `config.sample.toml` first then\nrename it). Now re-run the container:\n```sh\ndocker start npps4\n```\n\nObserve that the app is started successfully using:\n```sh\ndocker logs npps4\n```\n\nStarting Up\n-----\n\nBefore starting the server, you need 3 things:\n1. Create configuration file.\n2. Get private key.\n3. Get client game database.\n\n### Create configuration file.\n\nCopy out `config.sample.toml` to `config.toml` and adjust as needed. The file has extensive comments on each\nconfiguration values.\n\n### Get private key.\n\n\u003e [!WARNING]\n\u003e A private key is required due to internal request-response verification done in the game.\n\n#### Using provided private key\n\nNPPS4 provides default private key which is used to develop other private servers by the community\nand compatible with community-patched APK.\n\nThere's nothing to do to use this private key. This private key is used by default as per the sample configuration\nkey `main.server_private_key`.\n\nThe public key of the default server key is:\n```\n-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDE0RNd6047aeBirzVb61DolatY\nYWpaEUIPugOIkobHDc9qVR5iliMLyC0ErXO1siLBwN+U3zaDVOa5uhXbiS7uYq5c\ncpxComxTnZtcn/b+mKDpYWLaC0Gv7UoiT8rpNqN3Vko645usz9OFc4VciijsHGRP\nXmmmoP6qykfI/vba8wIDAQAB\n-----END PUBLIC KEY-----\n```\n\n#### Using your own private key\n\n\u003e [!IMPORTANT]\n\u003e The private key **must** be 1024-bit RSA stored in PEM format!\n\nIf you already have your existing private key, simply put them as `server_key.pem`.\n\nTo get the public key, run:\n\n```\npython make_server_key.py -p\n```\n\n#### Generating your own private key\n\nTo generate a new private key, run:\n\n```sh\npython make_server_key.py\n```\n\nThe public key, for your game client will be printed to stdout in PEM format. Patch your game to use the\nnewly-provided public key.\n\n### Get client game database.\n\nThere's 2 simple methods: Having local copy of SIF client files or loading it directly through internet.\n\n#### Create local copy\n\nFirst, follow the instruction at https://gist.github.com/MikuAuahDark/ece4eb73b3396403c6a2f11610a783b8.\n\nThen set the `download.backend` to `internal` and configure the `download.internal.archive_root` directory in the\nconfiguration file to your local copy of SIF client files.\n\n#### Loading directly from internet\n\nLook at the URL in https://gist.github.com/MikuAuahDark/ece4eb73b3396403c6a2f11610a783b8.\n\nSet the `download.backend` to `n4dlapi` and configure `download.n4dlapi.server` to the URL writen in above gist (not\nthe gist itself).\n\nDatabase\n-----\n\nPlease consult [SQLAlchemy supported database backends](https://docs.sqlalchemy.org/en/20/dialects/index.html) for\nmore information. If in doubt, SQLite3 is a safe choice if you don't need performance as it's already a part of NPPS4\nrequired dependencies.\n\nOtherwise, install the additional dependencies depending on which backend you want to use. Ensure to install the \n\"async\" version of the database packages!\n\n* SQLite3: `aiosqlite` (already installed)\n* PostgreSQL: `asyncpg`\n* MySQL/MariaDB: `asyncmy`\n\nRunning\n-----\n\nAfter all is set, initialize the database:\n```sh\nalembic upgrade head\n```\n\nThen run the server\n```sh\nuvicorn npps4.run.app:main --port 51376 --host \u003cyour lan IP or 0.0.0.0\u003e\n```\n\nIf you need to run with multiple workers, you must additionally install `gunicorn` and `uvicorn-worker` Python package.\n```sh\npip install gunicorn uvicorn-worker # only needs to be done once\n\ngunicorn --preload npps4.run.app:main -w 4 -k uvicorn_worker.UvicornWorker -b \u003cyour lan IP or 0.0.0.0\u003e:51376\n```\n\nUpdating\n-----\n\nBefore updating, please ensure if database breakage is not happening. See [DBBREAKAGE.md](DBBREAKAGE.md) for\ninformation.\n\nIf there's no database breakage or you already know a way to handle the breakage (either by doing stuff manually or\ndestroying the database), run:\n\n```\ngit pull --ff-only\nalembic upgrade head\n```\n\nMost changes requires a server restart. However, changes that only touch `server_data.json` does not require server\nrestart as that particular file is hot-reloaded by the server.\n\nClient App\n-----\n\nTo get compatible client, please look at https://ethanaobrien.github.io/sif-patcher/. Both iOS and Android are\nsupported.\n\nContribute\n-----\n\nSee [CONTRIBUTE.md](CONTRIBUTE.md)\n\n\nLicense\n-----\n\nzLib license, excluding any files in `external/`.\n\nPublic domain/unlicense, any files in `external/`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkenergyprocessor%2Fnpps4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarkenergyprocessor%2Fnpps4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkenergyprocessor%2Fnpps4/lists"}