Infrastructure • Digital Sovereignty

Mastering Real-Time Offshore Database Replication

Data sovereignty is not just about where your server is located; it's about redundancy across multiple safe jurisdictions. In this tutorial, we demonstrate how to sync a MariaDB cluster between VELOXNODES nodes in Russia (Moscow) and Kyrgyzstan (Bishkek).

1. Configure the Master (Russia)

Edit your /etc/mysql/mariadb.conf.d/50-server.cnf to enable binary logging and assign a unique server ID.

server-id = 1
log_bin = /var/log/mysql/mysql-bin.log
binlog_do_db = sovereignty_db

2. Configure the Slave (Kyrgyzstan)

On your Bishkek server, assign a different ID and point it to the Moscow master IP address.

CHANGE MASTER TO
MASTER_HOST='MASTER_IP_HERE',
MASTER_USER='replication_user',
MASTER_PASSWORD='secure_password',
MASTER_LOG_FILE='mysql-bin.000001',
MASTER_LOG_POS=107;

3. Use a WireGuard Tunnel

For maximum security, never replicate databases over the public internet. Connect your Moscow and Bishkek servers via a private WireGuard tunnel first, then use the internal 10.x.x.x IPs for the MariaDB replication traffic. This ensures your data is encrypted in transit between jurisdictions.