<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Kvantis Blog]]></title><description><![CDATA[Practical guides from the Kvantis team on self-hosting, VPNs, trading bots and running Linux servers — plus how to rent VPS, CPU and GPU servers with crypto, no]]></description><link>https://kvantis.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6b08e1a005c8bd4dd582a8ae/f154f2ba-e7b8-45d1-9f6a-6d9167965875.png</url><title>Kvantis Blog</title><link>https://kvantis.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Sat, 28 Nov 2026 23:59:02 GMT</lastBuildDate><atom:link href="https://kvantis.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Self-Host Vaultwarden (Bitwarden-Compatible) with Docker and Caddy in 15 Minutes]]></title><description><![CDATA[Your own Bitwarden-compatible password server: Docker Compose, automatic HTTPS with Caddy, closed sign-ups and real backups.]]></description><link>https://kvantis.hashnode.dev/self-host-vaultwarden-bitwarden-compatible-with-docker-and-caddy-in-15-minutes</link><guid isPermaLink="true">https://kvantis.hashnode.dev/self-host-vaultwarden-bitwarden-compatible-with-docker-and-caddy-in-15-minutes</guid><category><![CDATA[self-hosted]]></category><category><![CDATA[Docker]]></category><category><![CDATA[Security]]></category><category><![CDATA[Tutorial]]></category><dc:creator><![CDATA[Kvantis Team]]></dc:creator><pubDate>Fri, 27 Nov 2026 02:03:08 GMT</pubDate><content:encoded><![CDATA[<p><a href="https://github.com/dani-garcia/vaultwarden">Vaultwarden</a> is a lightweight server that speaks the Bitwarden protocol. You run it on your own VPS and keep using the official Bitwarden apps and browser extensions — with your vault on hardware you control.</p>
<h2>What you need</h2>
<ul>
<li>A small VPS. Vaultwarden uses very little RAM; 1 vCPU / 1 GB is fine for a family.</li>
<li>A domain or subdomain (e.g. <code>vault.example.com</code>) with an A record pointing at the server.</li>
<li>Docker with the Compose plugin.</li>
</ul>
<h2>1. Docker Compose</h2>
<p><code>/opt/vaultwarden/docker-compose.yml</code>:</p>
<pre><code class="language-yaml">services:
  vaultwarden:
    image: vaultwarden/server:latest
    container_name: vaultwarden
    restart: unless-stopped
    environment:
      DOMAIN: "https://vault.example.com"
      SIGNUPS_ALLOWED: "true"   # we'll turn this off in step 4
    volumes:
      - ./vw-data:/data
    ports:
      - "127.0.0.1:8080:80"
</code></pre>
<pre><code class="language-bash">cd /opt/vaultwarden &amp;&amp; docker compose up -d
</code></pre>
<p>The port is bound to <code>127.0.0.1</code>, so Vaultwarden is only reachable through the HTTPS proxy, never directly.</p>
<h2>2. Automatic HTTPS with Caddy</h2>
<p>Bitwarden clients require HTTPS. Caddy obtains and renews certificates by itself:</p>
<pre><code class="language-bash">sudo apt install -y caddy
</code></pre>
<p><code>/etc/caddy/Caddyfile</code>:</p>
<pre><code class="language-text">vault.example.com {
    encode zstd gzip
    reverse_proxy 127.0.0.1:8080
}
</code></pre>
<pre><code class="language-bash">sudo systemctl reload caddy
sudo ufw allow 80,443/tcp
</code></pre>
<p>Open <code>https://vault.example.com</code> — you should get the web vault with a valid certificate.</p>
<h2>3. Create your account</h2>
<p>Register your own account (and family members') in the web vault.</p>
<h2>4. Close sign-ups</h2>
<p>Otherwise anyone who finds the page can register. Change the environment and restart:</p>
<pre><code class="language-yaml">      SIGNUPS_ALLOWED: "false"
</code></pre>
<pre><code class="language-bash">docker compose up -d
</code></pre>
<h2>5. (Optional) Admin panel with a hashed token</h2>
<p>The <code>/admin</code> page lets you invite users and see diagnostics. Don't put a plain-text token in the compose file — hash it:</p>
<pre><code class="language-bash">docker exec -it vaultwarden /vaultwarden hash
</code></pre>
<p>Paste the resulting <code>$argon2id$...</code> string as <code>ADMIN_TOKEN</code> in the environment (in a compose file, escape each <code>$</code> as <code>$$</code>), then <code>docker compose up -d</code>.</p>
<h2>6. Connect your apps</h2>
<p>In any Bitwarden app or extension, choose <strong>Self-hosted</strong> on the login screen and enter <code>https://vault.example.com</code>.</p>
<h2>7. Backups that actually work</h2>
<p>Everything lives in <code>vw-data/</code>. Don't just copy a live SQLite file — use SQLite's own backup command, then grab the rest:</p>
<pre><code class="language-bash">apt install -y sqlite3
mkdir -p /root/vw-backup
sqlite3 /opt/vaultwarden/vw-data/db.sqlite3 ".backup '/root/vw-backup/db-$(date +%F).sqlite3'"
tar czf /root/vw-backup/files-$(date +%F).tgz -C /opt/vaultwarden/vw-data attachments sends config.json rsa_key* 2&gt;/dev/null
</code></pre>
<p>Put that in a daily cron job and copy <code>/root/vw-backup</code> off the server (another machine, S3-compatible storage, anything). Your apps keep a local copy of the vault, but the server is the source of truth.</p>
<h2>8. Updates</h2>
<pre><code class="language-bash">cd /opt/vaultwarden &amp;&amp; docker compose pull &amp;&amp; docker compose up -d
</code></pre>
<p>Check the project's release notes now and then for breaking changes.</p>
<hr />
<p><em>Disclosure: I work on <a href="https://kvantis.org">Kvantis</a>, a crypto-paid VPS host. The original, shorter version of this guide is on our blog.</em></p>
]]></content:encoded></item><item><title><![CDATA[Running a Crypto Trading Bot on a VPS — A Practical Checklist]]></title><description><![CDATA[Pick a region by measuring latency to your exchange, keep the bot alive with systemd, sync the clock and lock down API keys.]]></description><link>https://kvantis.hashnode.dev/running-a-crypto-trading-bot-on-a-vps-a-practical-checklist</link><guid isPermaLink="true">https://kvantis.hashnode.dev/running-a-crypto-trading-bot-on-a-vps-a-practical-checklist</guid><category><![CDATA[crypto]]></category><category><![CDATA[Python]]></category><category><![CDATA[Linux]]></category><category><![CDATA[Devops]]></category><dc:creator><![CDATA[Kvantis Team]]></dc:creator><pubDate>Fri, 27 Nov 2026 02:01:12 GMT</pubDate><content:encoded><![CDATA[<p>A trading bot has to run around the clock and react fast — your laptop going to sleep at 3 a.m. is not a strategy. Here's the checklist I use when moving a bot to a VPS.</p>
<h2>1. Pick the region by measuring, not guessing</h2>
<p>Don't trust "this exchange is in Tokyo" posts — measure from where your server would actually be. With hourly-billed VPS you can spin up machines in three regions, test for ten minutes and delete them for a few cents.</p>
<p>From each candidate server:</p>
<pre><code class="language-bash">for i in $(seq 1 20); do
  curl -o /dev/null -s -w '%{time_connect} %{time_starttransfer}\n' \
    https://api.binance.com/api/v3/time
done | awk '{c+=$1; t+=$2} END {printf "connect %.1f ms, first byte %.1f ms\n", c/NR*1000, t/NR*1000}'
</code></pre>
<p>Swap in your exchange's REST endpoint. Keep the region with the lowest and most stable numbers.</p>
<p><strong>Check the exchange's terms first:</strong> some exchanges block traffic from certain countries or from datacenter IPs in them. A fast region is useless if the API rejects you.</p>
<h2>2. Size it honestly</h2>
<ul>
<li>A single bot on a REST/WebSocket API: 1 vCPU / 1 GB RAM is enough.</li>
<li>Several strategies, a local database or backtesting: 2 vCPU / 4 GB.</li>
<li>Watch real usage for a week with <code>htop</code> before upgrading.</li>
</ul>
<h2>3. Keep the clock in sync</h2>
<p>Exchanges reject signed requests whose timestamp drifts too far (Binance's <code>recvWindow</code> is the classic error). Make sure NTP is on:</p>
<pre><code class="language-bash">timedatectl status          # look for "System clock synchronized: yes"
sudo timedatectl set-ntp true
</code></pre>
<h2>4. Run it as a service, not in a screen session</h2>
<p><code>/etc/systemd/system/tradebot.service</code>:</p>
<pre><code class="language-ini">[Unit]
Description=Trading bot
After=network-online.target
Wants=network-online.target

[Service]
User=bot
WorkingDirectory=/home/bot/app
EnvironmentFile=/home/bot/app/.env
ExecStart=/home/bot/app/.venv/bin/python main.py
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target
</code></pre>
<pre><code class="language-bash">sudo useradd -m -s /bin/bash bot
sudo systemctl daemon-reload
sudo systemctl enable --now tradebot
journalctl -u tradebot -f
</code></pre>
<p><code>Restart=always</code> brings the bot back after a crash or a reboot. Running as a separate <code>bot</code> user means a bug can't touch the rest of the system.</p>
<h2>5. Lock down the API keys</h2>
<p>This matters more than anything above.</p>
<ul>
<li><strong>Trade-only permissions.</strong> Never enable withdrawals on a bot key.</li>
<li><strong>IP whitelist.</strong> Most exchanges let you restrict a key to specific IPs — set it to your VPS's IP. A leaked key then becomes useless elsewhere.</li>
<li>Keep keys in <code>.env</code> with <code>chmod 600</code>, never in the repo.</li>
</ul>
<h2>6. Harden SSH</h2>
<pre><code class="language-bash"># after adding your public key to ~/.ssh/authorized_keys
sudo sed -i 's/^#\?PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config
sudo systemctl restart ssh
sudo ufw default deny incoming &amp;&amp; sudo ufw allow OpenSSH &amp;&amp; sudo ufw enable
</code></pre>
<p>A bot rarely needs any inbound ports at all.</p>
<h2>7. Know when it dies</h2>
<p>Add a heartbeat: have the bot ping a dead-man's-switch URL (for example a free <a href="http://Healthchecks.io">Healthchecks.io</a> check) every few minutes, and get an alert if the pings stop. Logs tell you why it died; the heartbeat tells you <em>that</em> it died.</p>
<h2>8. Billing that matches the workload</h2>
<p>A bot runs 24/7, so hourly billing ends up close to the monthly price. The advantage is flexibility: pause a strategy, delete the server and stop paying the same hour. If you already hold crypto, paying the host in the same coins avoids a card and KYC altogether.</p>
<hr />
<p><em>Disclosure: I work on</em> <a href="https://kvantis.org"><em>Kvantis</em></a><em>, a crypto-paid VPS host with hourly billing in 40+ cities. The original version of this checklist is on our blog.</em></p>
]]></content:encoded></item><item><title><![CDATA[Set Up Your Own WireGuard VPN on a $11 VPS (No Install Scripts)]]></title><description><![CDATA[Set up WireGuard by hand on Ubuntu: keys, NAT, firewall and a phone QR code, so you understand every line of your own VPN.]]></description><link>https://kvantis.hashnode.dev/set-up-your-own-wireguard-vpn-on-a-11-vps-no-install-scripts</link><guid isPermaLink="true">https://kvantis.hashnode.dev/set-up-your-own-wireguard-vpn-on-a-11-vps-no-install-scripts</guid><category><![CDATA[wireguard]]></category><category><![CDATA[vpn]]></category><category><![CDATA[Linux]]></category><category><![CDATA[self-hosted]]></category><dc:creator><![CDATA[Kvantis Team]]></dc:creator><pubDate>Fri, 27 Nov 2026 01:56:44 GMT</pubDate><content:encoded><![CDATA[<p>Running your own VPN gives you an exit IP nobody else shares and no third-party logging policy to trust. Most guides pipe a big install script into bash. That works, but you end up with a config you don't understand. This guide does it by hand in about ten minutes, on Ubuntu 22.04/24.04.</p>
<h2>What you need</h2>
<ul>
<li>A small VPS — 1 vCPU / 1 GB RAM is plenty for personal use. Pick a location close to you for low latency.</li>
<li>Root SSH access.</li>
<li>The WireGuard app on your phone or laptop.</li>
</ul>
<h2>1. Install WireGuard</h2>
<pre><code class="language-bash">sudo apt update &amp;&amp; sudo apt install -y wireguard qrencode
</code></pre>
<h2>2. Generate keys</h2>
<p>One key pair for the server, one per device:</p>
<pre><code class="language-bash">sudo -i
cd /etc/wireguard
umask 077
wg genkey | tee server.key | wg pubkey &gt; server.pub
wg genkey | tee phone.key  | wg pubkey &gt; phone.pub
</code></pre>
<h2>3. Find your public network interface</h2>
<pre><code class="language-bash">ip -o -4 route show to default | awk '{print $5}'
</code></pre>
<p>It's usually <code>eth0</code>, <code>ens3</code> or <code>enp1s0</code>. Use it below instead of <code>eth0</code>.</p>
<h2>4. Server config</h2>
<p>Create <code>/etc/wireguard/wg0.conf</code>:</p>
<pre><code class="language-ini">[Interface]
Address    = 10.8.0.1/24
ListenPort = 51820
PrivateKey = &lt;contents of server.key&gt;

PostUp   = iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE; iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT
PostDown = iptables -t nat -D POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE; iptables -D FORWARD -i wg0 -j ACCEPT; iptables -D FORWARD -o wg0 -j ACCEPT

[Peer]
# phone
PublicKey  = &lt;contents of phone.pub&gt;
AllowedIPs = 10.8.0.2/32
</code></pre>
<p>The <code>PostUp</code> lines NAT your VPN traffic out of the server's public IP and allow forwarding while the tunnel is up.</p>
<h2>5. Enable IP forwarding</h2>
<pre><code class="language-bash">echo 'net.ipv4.ip_forward=1' &gt; /etc/sysctl.d/99-wireguard.conf
sysctl --system
</code></pre>
<h2>6. Open the firewall</h2>
<p>If you use UFW:</p>
<pre><code class="language-bash">ufw allow 51820/udp
ufw route allow in on wg0 out on eth0
ufw allow OpenSSH
ufw enable
</code></pre>
<p>Also check your provider's cloud firewall, if you set one up, and allow UDP 51820 there too.</p>
<h2>7. Start it</h2>
<pre><code class="language-bash">systemctl enable --now wg-quick@wg0
wg show
</code></pre>
<h2>8. Client config</h2>
<p>Create <code>phone.conf</code>:</p>
<pre><code class="language-ini">[Interface]
PrivateKey = &lt;contents of phone.key&gt;
Address    = 10.8.0.2/32
DNS        = 1.1.1.1

[Peer]
PublicKey           = &lt;contents of server.pub&gt;
Endpoint            = &lt;SERVER_PUBLIC_IP&gt;:51820
AllowedIPs          = 0.0.0.0/0, ::/0
PersistentKeepalive = 25
</code></pre>
<p><code>AllowedIPs = 0.0.0.0/0, ::/0</code> sends all traffic through the tunnel. Since this tunnel only carries IPv4, IPv6 traffic is simply blocked while connected instead of leaking around the VPN.</p>
<p>Show it as a QR code and scan it with the WireGuard mobile app:</p>
<pre><code class="language-bash">qrencode -t ansiutf8 &lt; phone.conf
</code></pre>
<h2>9. Test</h2>
<p>Connect, then open any "what is my IP" page or run <code>curl ifconfig.me</code> on a laptop client. You should see the VPS's IP. On the server, <code>wg show</code> should list a recent handshake.</p>
<h2>Adding more devices</h2>
<p>Generate another key pair, add another <code>[Peer]</code> with the next address (<code>10.8.0.3/32</code>), and reload without dropping existing connections:</p>
<pre><code class="language-bash">wg syncconf wg0 &lt;(wg-quick strip wg0)
</code></pre>
<h2>A note on privacy</h2>
<p>A self-hosted VPN hides your traffic from your local network and ISP and gives you a clean IP, but your VPS provider can see that the server exists. If you'd rather not tie it to your identity or card, pick a host that accepts crypto and doesn't require KYC.</p>
<hr />
<p><em>Disclosure: I work on <a href="https://kvantis.org">Kvantis</a>, a crypto-paid VPS host. The original, shorter version of this guide is on our blog.</em></p>
]]></content:encoded></item></channel></rss>