Service eligibility and regional restrictions
PuppyIP serves only compliant overseas businesses and their authorized personnel. Proxy services are not available in mainland China. The service may only be used for lawful business activities outside mainland China. Use of this service within mainland China is prohibited.
Hosting a proxy IP or server overseas does not change these restrictions. The service must not be provided to end users in mainland China through relaying, forwarding, sharing or resale. Before use, read the Terms of Service.
Key Takeaways
- Installing a native binary does not prepare PostgreSQL and Redis automatically.
- Keep Linux users, database roles and website administrators distinct.
- Confirm the instance and recovery requirements before creating a database.
- Verify SQL, Redis, setup, migrations and real application requests separately.
Separate connection refusal from a missing database
If a native Sub2API setup reports connect: connection refused, first check whether PostgreSQL listens on the configured host and port. If it reports database "sub2api" does not exist, a PostgreSQL instance is responding: verify the instance and database name before creating anything. Re-entering the web-form password cannot create a missing database.
This guide concerns native deployment managed by systemd. Do not substitute a Docker Compose service name for a local host automatically. The historical v0.2.15 instructions require PostgreSQL and Redis to be prepared; an installed application binary does not prove that its dependencies, database role, database or setup wizard are ready. Check the instructions for the version you deploy.
Check listeners, deployment type and dependency responses
Inspect listeners on the application server. The loopback address 127.0.0.1 refers to the current network namespace; inside a container it normally refers to that container. The commands use the common PostgreSQL and Redis ports, 5432 and 6379. Replace both the checks and application settings if your deployment uses other ports.
No listener in this sample does not prove that the machine has never had a database installed. Check the actual service, cluster and port before reinstalling anything. A Redis PONG verifies only that request. If Redis requires authentication, use the deployment’s approved authentication method rather than disabling it to match an example.
Inspect dependency listeners
bashss -lntp '( sport = :5432 or sport = :6379 )'
Check the local Redis response
bashredis-cli -h 127.0.0.1 -p 6379 ping
Connect to the target database as the application role
A Linux service user, PostgreSQL login role and website administrator are different identities. Replace APP_DB_ROLE with the database role and use -W to enter its password interactively, keeping it out of command history and shared tickets. Do not grant superuser privileges just to pass a connection check.
Keep the error wording while removing private connection details. Connection refusal returns you to the listener check; password authentication failed calls for an instance, role and authentication review. Only a confirmed missing-database error leads to the next step. A successful query still needs to point at the intended instance.
Run a real database query
bashpsql -h 127.0.0.1 -p 5432 -U APP_DB_ROLE -d sub2api -W -c 'SELECT current_user, current_database();'
Create the database only after confirming it is missing
Before creating anything, confirm the instance, database name and existing role, and decide whether data should be restored. On a migrated service, a missing database may mean the application points at the wrong instance or its backup has not been restored. Do not hide missing data by creating an empty database, and do not drop an existing one.
For a confirmed new installation with no target database and an existing ordinary application role, a database administrator can create it with that role as owner. The example assumes the local postgres administrator and port 5432; verify both first. Repeat the application-role TCP query afterward instead of treating a silent createdb exit as complete acceptance.
Because this createdb command omits --host, it connects through a local Unix socket by default. The same port number does not establish that it is the same cluster. Before running it, have the administrator confirm that this socket belongs to the instance tested at 127.0.0.1:5432. For a different cluster, socket directory or remote database, use the approved administrator connection to that exact instance before creating the database.
Create the database for a confirmed new installation
bashsudo -u postgres createdb --port=5432 --owner=APP_DB_ROLE sub2api
Finish dependency and application acceptance separately
After both the database query and Redis PING pass, use the same verified connection details in the setup wizard. Check its connection test, configuration save, migrations, administrator login and actual application request separately. A local SQL query does not prove the complete installation works, and an idle health check does not establish concurrent capacity.
For future upgrades or migrations, record the application version, deployment type, dependency instance and restricted credential-storage location. Keep least privilege and local-listener boundaries. Remote database access needs its own network, TLS and access-control design rather than an instruction to expose the database port.
Sources
Frequently Asked Questions
Should I delete and recreate the old database?
No. A connection error does not justify dropping a database. Confirm the instance, name and data requirements; recover an existing service through its backup procedure.
Does Redis PONG prove that the application works?
No. It verifies one Redis request. The database, setup wizard, migrations, login and upstream application flow need their own results.