Self-hosted operations

Self-hosted digital delivery deployment checklist: domains, containers, databases and backups

Starting the application is only the beginning. A self-hosted platform selling license or redemption codes must keep orders traceable, prevent duplicate allocation, receive payment notifications continuously and recover after server damage. This article explains component roles through a generic single-server architecture. It specifies neither unverified versions nor unknown one-click scripts; use the selected project's official documentation for actual commands.

Contents

Draw the minimum architecture before sizing the server

  1. Entry pointDomain and HTTPS reverse proxy
  2. Business applicationProducts, orders, login and payment notifications
  3. Persistent dataPrivate-network database and controlled inventory
  4. Background jobsFulfillment, email, retries and periodic checks
This is a responsibility diagram. Jobs and applications may run in separate processes; four servers are not required.

Low-traffic sites can start on one server but must recognize shared failure points. Containers isolate components; they do not automatically recover a damaged disk. Size capacity from actual concurrency, database connections, inventory and job duration, not homepage traffic alone.

Confirm the project's supported database, runtime, queue and persistent directories first. Separate test and production environments, including codes and payment keys, so a drill cannot trigger real fulfillment.

Validate the domain, HTTPS and callback entry together

Resolve the domain to the actual entry point, check the certificate covers its hostname and monitor renewal. Browser access to a homepage does not prove the payment service can reach notifications: proxy rules, access challenges and firewalls may treat machine requests differently.

Check the callback method, body size, timeout and response rules separately. Do not redirect it to login or return a human-verification page, and do not disable all backend access protection for convenience. Adjust only necessary paths while retaining signature verification.

Use strong authentication and least privilege for administration, requiring reconfirmation for sensitive actions. Logs should connect entry, application and job processing by internal order ID without exposing full codes, session tokens or payment keys. Distinguishing a request that never arrived from unprocessed business work is more useful than repeatedly refreshing.

Use reproducible container configuration instead of editing running files

Record image provenance and a tested explicit version or digest, retaining the prior configuration. Do not rely on a moving production tag or treat temporary host edits as official releases. Reproducibility means another server can run the same accepted application.

Docker's production deployment documentation recommends adapting mounts, logging and restart policies for production. An independent production override is possible, but understand its merged result first. These are inspection examples only; substitute your project's filenames:

docker compose -f compose.yaml -f compose.production.yaml config --quiet
docker compose -f compose.yaml -f compose.production.yaml ps

A restart policy does not guarantee availability: a process may run but fail to connect to its database. Add business health checks, resource limits and external alerts so repeated restarts do not conceal the real error.

Keep the database private and inventory persistent directories

The database generally only needs business-container access; it need not expose a public port. Use controlled management paths and separate accounts for maintenance. Grant the application only runtime privileges and consider separate migration permissions, limiting how an application vulnerability escalates to database administration.

Containers are replaceable; orders and inventory must not disappear with them. Record where the database, uploaded files, necessary encryption material and job states live. Docker's volume documentation explains volume lifecycles. Volumes preserve data but still depend on host storage and do not replace off-site backups.

Specify amount units and precision, store consistent order times and convert correctly for display. Restrict plaintext code viewing, export and support access. If using application encryption, include decryption material in controlled recovery; an encrypted database without its key still cannot restore fulfillment.

Tighten keys, container privileges and administrative access together

Do not place payment keys, database passwords or email credentials in images, public repositories or support screenshots. Use separate credentials per component and document rotation. With Compose secrets, the application must actually support file-based reading; merely declaring a name is insufficient.

Docker's Compose secrets guide explains granting access per service. Protect host files when ordinary file sources are used; declaring a secret does not automatically encrypt the original file. Backups containing credentials also need encryption and access control.

Minimize container privileges as the application permits, avoid privileged mode and do not mount the Docker management socket into business containers. OWASP's container security checklist emphasizes that socket access expands host-management risk. An unusual port alone is not sufficient protection for an administration panel.

Make fulfillment and notifications recoverable background work

Payment confirmation, inventory allocation and email sending are separate steps. Persist payment facts and pending fulfillment even if the email provider is unavailable. Job records need at least an order ID, state, attempt count and next retry time.

Bound retryable errors with backoff and move exhausted jobs to manual handling. Infinite retries do not solve shortages or amount mismatches. Use stable business idempotency keys for external fulfillment APIs to avoid duplicate activation after worker restarts.

Regularly inspect paid-but-unfulfilled, long-running and persistently failing-notification orders. 稳付pay sends on-chain callbacks after configured confirmation conditions, but merchants remain responsible for allocation and digital delivery. The merchant backend is still under development; use actual documentation and support arrangements for integration.

Prove backup usability through an isolated restore

Set acceptable data-loss windows and recovery times before choosing backup frequency. Daily backups may miss the day's new orders after failure; they do not guarantee no loss. Use an engine-appropriate consistent database backup, not arbitrary copies of data directories during writes.

PostgreSQL's SQL dump documentation describes logical backup and recovery. For another database, use its official process. Include required configuration, files and controlled keys, plus an independently stored copy and retention policy.

Run recovery drills in isolation with real email, payment notifications and automatic fulfillment disabled. Check recent orders, inventory relationships, administrator privileges and job states, then record recovery time. After restoring an older database, reconcile payment-side records to prevent reallocating codes already sold.

Finish with failure drills and a launch checklist

Failure scenario one: An upgrade adds database fields, but switching back to the old image will not start. Rollback includes schema compatibility, not just application files. Validate migrations, backups and recovery paths before upgrading rather than guessing in production.

Failure scenario two: Application health checks pass while the worker has stopped, leaving paid customers stuck in processing. Monitor entry points, database connections, job backlog and oldest pending age separately, not only homepage response success.

  • Domain, certificate renewal and notification paths have been tested externally.
  • No unnecessary database ports are public; credentials are managed separately from production code.
  • Data survives container replacement, with critical directories and versions documented.
  • Tests cover duplicate notifications, the last item, shortages, email failure and late payments.
  • Backups have been restored in isolation, with payment and code states reconciled.
  • Upgrade ownership, alert recipients and manual fulfillment procedures are clear.

Start with limited products and controlled orders, observe, then increase volume. Self-hosting lets you understand and control fulfillment, but requires ongoing maintenance time.

References and technical documentation

The official sources below support protocol and implementation checks. Code and scenarios illustrate technical concepts; validate your environment and production integration protocol separately.

  1. Docker: production Compose deployment
  2. Docker:Compose secrets
  3. Docker: persistent volumes
  4. OWASP: container security
  5. PostgreSQL: SQL backup and recovery

Keep improving your site

Check each step of networking, orders and funds notifications against your business scenario. Discuss payment integration and USDT monitoring through the contact page.

Contact 稳付pay ↗