The process is basically the following:
Install OS required libraries
Install python3 (3.9+)
Install nodejs (20) and yarn
Install postgresql
Install redis (6.2.0+)
Clone and run all parts of Bitcart
(Optional) Open Firewall Ports and Access the Sites
Manual installation is NOT recommended in production. It should be only used for learning purpose.
The docker deployment will provide you easy update system and make sure that all moving parts are wired correctly without any technical knowledge. It will also setup HTTPS for you.
This steps have been done on ubuntu 22.04, adapt for your own install.
Or the equivalent for your os package manager
Usually it might have already been installed, but we also need pip3 and dev packages, so:
Using a nodejs version higher than specified way work, but we officially support only 1 release series (usually current LTS)
Note, replace REPLACEME
with your new postgres password.
For any other daemon(coin) you want to use, run:
Where coin_name is coin code(btc, ltc, etc.).
Create a file conf/.env
It contains all the settings. For now, we just need to set database password and enabled cryptos.
Apply database migrations:
Start daemons from the bitcart
repo directory:
For any other coin, do the similar procedure:
Start api:
Start background worker:
If you want to run a specific coin on a test network or change other environment settings you can update the
.env
file in the bitcartconf/
directory
The Bitcart API runs on port 8000
.
Daemons on ports 5000-500X
The Bitcart Admin panel runs on port 3000
The Bitcart Store runs on port 4000
.
If you are running Bitcart on your local machine - you will not need to do these steps. You can go ahead and access the system with:
Bitcart Admin Panel: http://127.0.0.1:3000/
Bitcart Store: http://127.0.0.1:4000/
Bitcart Merchants API: http://127.0.0.1:8000/
If you are running Bitcart on a remote machine, you will need to do additional things to access them.
This option is recommended to proxy secure incoming requests to the correct bitcart process.
Install Nginx
Add configuration for each component: bitcart-store, bitcart and bitcart-admin
Enable the config
Add DNS records for your server names to point to your VM's ip
Check the config and reload nginx
Add TLS certificates with the letsencrypt CA for the sites
Now you should be able to access the components over TLS. You can then also enable http2
in your nginx configuration if you want.
You might want to look at the FAQ for more detailed info on the Nginx configuration options
If you have a firewall, you will want to open ports 3000
, 4000
and 8000
. Using ufw
as an example:
yarn
is listening on localhost127.0.0.1
by default and you won't be able to access it over the internet unless you reverse proxy it withnginx
. If you want to expose it without reverse proxy, use the environment variable:NUXT_HOST=0.0.0.0
to listen on all interfaces.
The store and admin site need public access to the bitcart api (URL should be resolvable both client and server side).
Using the manual method you need to set that with environment variables. The complete setup of the Bitcart Admin Panel and Store may look like this:
Note: The above is the minimum to make it work and not a production grade solution. We still recommend to use docker deployment unless you really know what you're doing.
Access the site remotely
Bitcart Admin Panel: http://my-bitcart-admin-ip:3000/
Bitcart Store: http://my-bitcart-store-ip:4000/
Bitcart Merchants API: http://my-bitcart-store-ip:8000/
Continue with: Your first invoice
If you want the procaesses: bitcart api, daemons, worker and frontend (bitcart admin and bitcart store) to be managed with automatic startup, error reporting etc then consider using supervisord or systemd to manage the processes.
Note: it is recommended to use docker deployment for easy upgrades.
To upgrade manually, follow the following steps:
Merchants API, workers, daemons, Admin panel and Store should be stopped
Run :
For every Bitcart component directory (Merchants API, Admin Panel, Store).
Bitcart admin
Bitcart store
In Bitcart core(daemons) & Merchants API directory, run:
For Bitcart Admin Panel and Store, run:
Follow instructions here