NPPS4
NPPS4¶
NPPS4 is implementation of SIF1 private server. It attempt to closely mimick the original server with account progression support.
Setup Manually¶
See https://gist.github.com/MikuAuahDark/eabf54e9db3f5004e3ccd9a72f0d79d5.
Setting up manually requires some tinkering knowledge. This includes setting up in your PC/mac or in your Android phone.
Setup with Docker¶
NPPS4 has pre-built docker images.
Important
NPPS4 docker images only support Linux x86-64 and Linux aarch64!
Using SQLite3¶
SQLite3 is recommended if you're just alone or for only few people.
Example command:
docker run --name npps4 -d \
-v ./npps4_data:/NPPS4/data \
-p 127.0.0.1:8000:51376 \
-e NPPS4_CONFIG_DOWNLOAD_BACKEND=n4dlapi \
-e NPPS4_CONFIG_DOWNLOAD_N4DLAPI_SERVER=https://ll.sif.moe/npps4_dlapi \
ghcr.io/darkenergyprocessor/npps4:latest
What does the command do:
docker run
makes new container.--name npps4
name the containernpps4
.-d
run the container detached.-v ./npps4_data:/NPPS4/data
mapsnpps4_data
folder in current directory to/NPPS4/data
in the container. In the container, all data is stored in/NPPS4/data
.-p 127.0.0.1:8000:51376
makes the server listen on127.0.0.1:8000
on host-side. The51376
should not be changed!-e NPPS4_CONFIG_DOWNLOAD_BACKEND=n4dlapi
set the download backend to NPPS4 DLAPI.-e NPPS4_CONFIG_DOWNLOAD_N4DLAPI_SERVER=https://ll.sif.moe/npps4_dlapi/
set the NPPS4 DLAPI download backend.ghcr.io/darkenergyprocessor/npps4:latest
is the container (hosted in GitHub registry).
Using PostgreSQL¶
PostgreSQL is recommended if you plan on hosting public server, possibly with many concurrent players accessing the server at same time.
Warning
NPPS4 Docker image only comes with SQLite3 and PostgreSQL support. While NPPS4 is coded with widest support of many RDBMS, NPPS4 is only well-tested using SQLite3 and PostgreSQL. If you need other RDBMS support, either perform manual setup or create new Dockerfile that expands NPPS4 docker image with additional RDBMS of your choice.
Example docker compose:
services:
postgresql:
image: postgres:17-alpine
environment:
POSTGRES_USER: npps4
POSTGRES_PASSWORD: npps4
PGUSER: postgres
volumes:
- ./postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "npps4"]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
npps4:
image: ghcr.io/darkenergyprocessor/npps4:latest
environment:
NPPS4_CONFIG_DATABASE_URL: postgresql+psycopg://npps4:npps4@postgresql/npps4 # maps to database URL in config.toml
NPPS4_CONFIG_DOWNLOAD_BACKEND: n4dlapi # Use NPPS4 DLAPI
NPPS4_CONFIG_DOWNLOAD_N4DLAPI_SERVER: https://ll.sif.moe/npps4_dlapi # Uses this server to provide game files.
NPPS4_WORKER: 1 # Tweak worker as needed
ports:
- 0.0.0.0:8000:51376
volumes:
- ./npps4_data:/NPPS4/data
restart: unless-stopped
depends_on:
postgresql:
condition: service_healthy
The docker compose does the following things:
- Create new PostgreSQL service with following configurations:
- Put the Postgres data in
postgres_data
in the current directory. - Configure it with
npps4
as the username and the password. The database name is taken from the username.
- Put the Postgres data in
- Create new NPPS4 service with following configurations:
- Listen on
0.0.0.0:8000
on host-side. This makes it available for everyone. - Put the NPPS4 data in
npps4_data
in the current directory. - Configure it to use
https://ll.sif.moe/npps4_dlapi
for game files.
- Listen on