Self-hosting & install
The whole gateway — website, API, checkout and docs — is one PHP package with a guided installer. The admin panel ships as a second package that shares the same database and storage.
Requirements
- PHP 8.1 or newer with PDO MySQL, OpenSSL, sodium, GMP, bcmath, mbstring and cURL (or
allow_url_fopen). - MySQL 5.7+ or MariaDB 10.3+, one empty database and a user for it.
- Apache with
mod_rewrite(most shared hosting), or nginx with the rules below. - HTTPS on your domain (free Let's Encrypt certificates work).
Install
- Create a MySQL database and user in your hosting panel.
- Upload
uxa-server.zipto your web root (for examplepublic_html) or a subfolder, and extract it there. - Open your domain in a browser. You are taken to
/install. - The installer checks PHP and extensions, then asks for the database details, your site URL, an admin email and password, the network (mainnet, testnet or local regtest) and where to create the master key file.
- Press Install. Tables, configuration (
storage/config.php, protected from the web) and your admin account are created, and the installer locks itself. - Add the cron job shown on the last screen. Then deploy the separate
uxa-adminpackage, set itsUXA_STORAGEto this site’s storage folder and sign in there.
Master key
Private keys are generated on the server and encrypted with a 32-byte master key using libsodium. The master key is never stored in the database. The installer writes it to a file outside the web root, for example /home/USER/uxa-keys/master.key, readable only by the owner. You can instead set the environment variable UXA_MASTER_KEY (64 hex characters) or UXA_MASTER_KEY_FILE (a path) for the PHP process.
Copy the master key file to offline storage right after installing. Without it, nobody can move the funds. Anyone who gets both the key and a copy of the database can take them.
Cron
The cron job credits deposits, sweeps deposit addresses into the hot wallet, signs and sends withdrawals, refreshes prices, checks invoices and retries webhooks. Run it every minute:
* * * * * php /home/USER/public_html/cron.php >/dev/null 2>&1
If your host has no CLI cron, call the secret URL shown after install (also in Admin › Settings) from any external cron service:
https://uxa.world/cron?key=YOUR_CRON_KEY
Point the app at your server
In the U Xa app, open the sign-in screen (or Settings › U Xa account), tap Server and enter https://uxa.world.
nginx
location ~ ^/(app|storage)/ { deny all; }
location = /cron.php { deny all; }
location / { try_files $uri /index.php$is_args$args; }
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
}
Reinstalling
The installer only runs while storage/config.php and storage/installed.lock are missing. To reinstall, delete both files and upload a fresh copy of the package.
Nodes
By default the server uses public APIs: mempool.space and litecoinspace.org for Bitcoin and Litecoin, publicnode.com JSON-RPC for Ethereum and BNB Chain, and TronGrid for Tron. For real funds run your own nodes or paid providers and enter them in Admin › Custody. Confirmations before a deposit is credited are set there too.
Hot wallet and cold storage
Withdrawals are paid from one hot wallet address per network. Keep only what you need for a day of withdrawals there and move the rest to addresses you control offline with Admin › Custody › Move to cold storage. Set those addresses on Admin › Fees. Withdrawals above the approval threshold wait in Admin › Withdrawals.
Backups
Back up the database, storage/config.php and, separately and offline, the master key file. The config file holds the secret that encrypts API tokens, webhook secrets and two-factor secrets.