White-label guide
Run this storefront as your own brand, on your own domain, with your own payment account.
How the reseller model works
White-label here means one independent deployment per seller. You copy the application, set your brand and credentials, and sell to your own customers. There is no shared reseller account, no platform fee baked into the software, and no cross-tenant database. Your customers, orders, invoices and API keys live only in your deployment.
You bring two commercial relationships: an upstream proxy provider that supplies the inventory, and a NOWPayments account that receives crypto payments. Both are configured with environment variables and never appear in the customer-facing site.
What you need
- A Linux or Windows server with Node.js 20 or newer. There are no npm dependencies.
- A domain or subdomain with HTTPS. NOWPayments needs a public HTTPS callback URL.
- An upstream proxy provider account and token for delivery and usage data.
- A NOWPayments account with an API key and an IPN secret.
- A reverse proxy such as nginx, Caddy or Cloudflare Tunnel for TLS.
1. Deploy the files
# Copy the application to the server, then:
cd vaultroute
cp .env.example .env
# Edit .env with your brand, prices, provider and payment settings
node server.js
The process listens on PORT (default 3000). Keep it behind a
reverse proxy and never expose Node directly to the internet. Runtime data is written to
data/; back that directory up.
2. Rebrand it
At minimum, set these values in .env:
BRAND_NAME=Your Brand
BRAND_DOMAIN=shop.example.com
SITE_URL=https://shop.example.com
SUPPORT_EMAIL=support@shop.example.com
ABUSE_EMAIL=abuse@shop.example.com
LEGAL_COMPANY=Your Company Ltd
ADMIN_EMAIL=admin@shop.example.com
ADMIN_NAME=Administrator
ADMIN_PASSWORD=use-a-long-unique-password
The brand name is substituted across the landing page, dashboard, legal pages and emails. Then work through the visual checklist:
- Replace
public/favicon.svgwith your own icon. - Update the logo mark in
public/index.html,public/app.htmland the auth pages if you want a different symbol. - Review
public/legal/terms.html,aup.htmlandprivacy.htmlwith your own company details and lawyer. - Adjust the landing page copy, prices and FAQ to match your offer.
- Do not publish a DNS record for the proxy gateway. Customers only ever see raw IPv4 credentials.
3. Set your retail prices
RETAIL_IP_CENTS=15 # $0.15 per IP
RETAIL_IP_CENTS_50=13
RETAIL_IP_CENTS_200=11
RETAIL_GB_CENTS=65 # $0.65 per GB
RETAIL_GB_CENTS_10=60
RETAIL_GB_CENTS_50=55
RETAIL_GB_CENTS_200=50
MIN_TOPUP_CENTS=500
MAX_TOPUP_CENTS=500000
MAX_IPS_PER_ORDER=500
MAX_GB_PER_ORDER=1000
MAX_GB_LINES=50
Keep retail prices above your wholesale cost (UPSTREAM_IP_COST_CENTS and
UPSTREAM_GB_COST_CENTS). Prices can also be edited live in
Admin → Settings; the admin form refuses bandwidth tiers that increase as
volume grows.
4. Connect your upstream provider
UPSTREAM_BASE=https://api.your-provider.example
UPSTREAM_TOKEN=your-server-side-token
UPSTREAM_IP_COST_CENTS=6
UPSTREAM_GB_COST_CENTS=30
GB_USAGE_SYNC_MS=60000
GB_USAGE_LOOKBACK_DAYS=7
# Optional fixed IPv4 for every delivered line
# GATEWAY_HOST=203.0.113.10
The adapter keeps the provider base URL, token and hostnames server-side. Provider
hostnames are resolved to IPv4 at purchase time, and the connection string is always
IP:port:user:pass. Bandwidth orders are hard-pinned to the per-GB inventory;
a client cannot select another inventory.
Customers never receive a DNS name. If your upstream uses hostnames that the server
cannot resolve, add an exact mapping with GATEWAY_ALIAS_MAP (for example
{"us.gateway.provider.tld":"203.0.113.10"}) or pin one gateway with a raw
IPv4 in GATEWAY_HOST. If no IPv4 is available the purchase fails with a
generic availability message rather than exposing the upstream.
5. Connect NOWPayments (crypto only)
- Create an account at nowpayments.io.
- Copy the API key from the dashboard.
- Create an IPN secret. It is shown once — store it safely.
- Set the IPN URL to
https://your-domain/api/webhooks/nowpayments. - Enable the coins you want to accept in the NOWPayments dashboard.
NOWPAYMENTS_API_KEY=your-api-key
NOWPAYMENTS_IPN_SECRET=your-ipn-secret
NOWPAYMENTS_PRICE_CURRENCY=usd
# Optional: force one payout coin, otherwise the customer chooses
NOWPAYMENTS_PAY_CURRENCY=
# Optional override; defaults to SITE_URL + /api/webhooks/nowpayments
NOWPAYMENTS_IPN_URL=
The server creates hosted invoices with POST /v1/invoice, redirects the
customer to invoice_url, and verifies every IPN with HMAC-SHA512 over the
sorted JSON body using the IPN secret. The wallet is credited only on a
finished payment, and crediting is idempotent. A status endpoint exists as a
backup if a callback is delayed.
.env readable only by the service user, and rotate them if a server is
compromised. Card and bank payment methods are intentionally absent.
Test the payment flow safely
Run npm test first. The test runner starts an isolated server with
TEST_MODE=1 and simulated upstream/payments, signs its own IPNs and verifies
idempotent crediting without touching your live data or accounts. Those simulation flags
are rejected when NODE_ENV=production.
For go-live, remove any TEST_MODE setting, use a public HTTPS
SITE_URL, make one small real payment, and confirm the IPN arrives and the
balance increases once. Replaying the same IPN must not credit the invoice twice.
6. Put HTTPS in front
Example nginx server block:
server {
listen 443 ssl http2;
server_name shop.example.com;
ssl_certificate /etc/letsencrypt/live/shop.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/shop.example.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Do not put HTTP basic authentication, a WAF challenge or a bot block in front of
/api/webhooks/nowpayments; NOWPayments must be able to POST to it. The
endpoint authenticates the request itself with the IPN secret.
7. Go-live checklist
SITE_URLis the publichttps://URL.NODE_ENV=production,COOKIE_SECURE=1andTRUST_PROXY=1behind your proxy.- Real
UPSTREAM_BASEandUPSTREAM_TOKEN. - A test purchase delivers working
IP:port:user:passcredentials with a raw IPv4 host; no DNS name is shown in the dashboard, API or exports. - Real
NOWPAYMENTS_API_KEYandNOWPAYMENTS_IPN_SECRET. - No
TEST_MODE,MOCK_UPSTREAMorMOCK_PAYMENTSin the production environment. - A long unique
ADMIN_PASSWORD; the first admin login works. - The IPN URL in NOWPayments matches
SITE_URLexactly. - One small real payment credits the wallet exactly once.
- Retail prices exceed your wholesale costs.
- Your legal pages name your company and are reviewed by you.
data/is backed up and.envis excluded from backups you share.
Operating the deployment
- Containers: build the included
Dockerfileor rundocker compose up -d; mount a volume at/app/dataso the database survives restarts. - systemd: install
deploy/vaultroute.serviceafter adjusting the user and path. The app handlesSIGTERMand closes the listener gracefully. - Windows: run
deploy/windows/install-service.ps1from an elevated PowerShell prompt to register the app with NSSM, then put Caddy or Cloudflare Tunnel in front of127.0.0.1:3000. The full guide is indeploy/windows/README.md. - Reverse proxy: start from
deploy/nginx.conf(Linux) ordeploy/windows/Caddyfile(Windows), setTRUST_PROXY=1, and leave the IPN path free of auth challenges. - Backups: copy
data/db.jsonon a schedule. It holds users, orders, invoices, sessions and audit records. - Logs: the server logs payment errors by code only; it never logs keys, secrets or full provider responses.
- Rotations: replacing an upstream token or NOWPayments key is an
.envchange plus a restart. Old API keys can be revoked from Settings without downtime. - Scaling: the datastore is a JSON file. Run a single instance per deployment; if you need multiple nodes, move the store to a database first.
What customers see
Your brand, your domain, your support email and your legal pages. They do not see the upstream provider, its hostnames, its inventory names, the NOWPayments API key, the IPN secret, or any other deployment's data. Dedicated IPs are presented with the early-disconnect disclaimer and a required acknowledgement; bandwidth packages show a per-account data balance and the cutoff policy.
Need help?
Integration and deployment questions: support@vaultroute.store. Read the API reference for endpoint details.