How to Install BTCPay Server on Arch Linux

BTCPay Server is an open-source payment processing platform that allows merchants to accept Bitcoin and other cryptocurrencies without the involvement of intermediaries. In this tutorial, we will show you how to install BTCPay Server on Arch Linux.

Prerequisites

Before starting, ensure that your system is up to date by running the following command:

sudo pacman -Syu

Step 1 - Install .NET Core

BTCPay Server is built using the .NET Core framework. Therefore, we need to install .NET Core on our Arch Linux system.

Run the following commands to install .NET Core:

sudo pacman -S dotnet-runtime-sdk

Step 2 - Install PostgresSQL

BTCPay Server requires a PostgreSQL database to store its data. You can install PostgreSQL on your system using the following command:

sudo pacman -S postgresql

Then start and enable the PostgreSQL service using the following commands:

sudo systemctl start postgresql
sudo systemctl enable postgresql

Step 3 - Install BTCPay Server

Now we will download the latest version of BTCPay Server from GitHub and install it on our system.

Run the following commands to install BTCPay Server:

git clone https://github.com/btcpayserver/btcpayserver.git
cd btcpayserver
git pull
dotnet build

The above commands will download the code from the GitHub repository and build the application. It may take some time to complete the process.

Step 4 - Configure BTCPay Server

After successful installation, we need to configure BTCPay Server by creating a configuration file.

First, copy the BTCPayServer/Data/Settings/ServerSettings.config.template file to BTCPayServer/Data/Settings/ServerSettings.config using the following command:

cp BTCPayServer/Data/Settings/ServerSettings.config.template BTCPayServer/Data/Settings/ServerSettings.config

Next, open the ServerSettings.config file in a text editor and update the following parameters:

# Url where BTCPay Server will be hosted, for example: https://btcpay.domain.com
# If you are testing on localhost, you can use http://localhost:49392
# Replace btcpay.example.com with your domain name
# Replace 49392 with your port configuration
"Url": "http://localhost:49392",

# Connection string for the PostgreSQL database
# Replace HOST with your PostgreSQL server IP or hostname
# Replace PORT with your PostgreSQL server port, default is 5432
# Replace DATABASE_NAME with the name of the newly created database
# Replace USERNAME with the PostgreSQL username
# Replace PASSWORD with the PostgreSQL password for the specified user
"ConnectionString": "Host=HOST;Port=PORT;Database=DATABASE_NAME;Username=USERNAME;Password=PASSWORD",

# Cookie file secret
# Replace COOKIE_SECRET with a secret key
"CookieFileSecret": "COOKIE_SECRET",

# BTCPay Server invoice expiration time
# Replace EXPIRATION_TIME with expiration time, in minutes
"InvoiceExpiration": EXPIRATION_TIME

Save the changes and close the file.

Step 5 - Start BTCPay Server

Finally, we can start BTCPay Server by running the following command:

dotnet run --no-build

This command will start the BTCPay Server application. It will take some time to start, and once it is ready, you can access it by opening your web browser and visiting the URL you specified in the ServerSettings.config file.

Congratulations! You have successfully installed BTCPay Server on Arch Linux.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!