Tailscale VPN Setup

Tailscale creates a secure private network between your devices. Access your self-hosted BlackBook database from anywhere.

Why Tailscale?

  • Secure - End-to-end encrypted connections
  • Simple - No port forwarding or firewall rules
  • Free - Up to 100 devices on personal plan
  • Fast - Direct peer-to-peer when possible

How It Works

💻 Your Computer Office / Travel
Encrypted Tunnel
📦 Your NAS Home Network

Step 1: Create Tailscale Account

  1. Go to tailscale.com
  2. Click "Get Started"
  3. Sign in with Google, Microsoft, or GitHub
  4. Your account is created automatically

Step 2: Install on Your Computer

Windows

  1. Download from tailscale.com/download
  2. Run the installer
  3. Click the Tailscale icon in system tray
  4. Sign in with your account

macOS

  1. Download from Mac App Store or tailscale.com/download
  2. Open the app
  3. Click "Connect"
  4. Sign in with your account

Step 3: Install on Your NAS/Server

Synology NAS

Option A: Package Center (if available)

  1. Open Package Center
  2. Search for "Tailscale"
  3. Install and sign in

Option B: Manual Installation

# SSH to your NAS

ssh your-user@your-nas-ip

# Download and install

curl -fsSL https://tailscale.com/install.sh | sh

# Start and authenticate

sudo tailscale up

Other Linux Servers

curl -fsSL https://tailscale.com/install.sh | sh

sudo tailscale up

Step 4: Verify Connection

  1. Open Tailscale Admin Console
  2. You should see both devices listed
  3. Note the hostname or IP of your NAS (e.g., synology or 100.x.x.x)

Test the connection:

# From your computer, ping the NAS

ping synology # or whatever hostname shows in admin

Step 5: Configure BlackBook

In BlackBook setup, use the Tailscale hostname:

Host: synology (your Tailscale hostname)

Port: 5432

Database: blackbook

Username: blackbook

Password: your_password

That's it! Now you can access your database from anywhere - home, office, coffee shop, or travel. As long as Tailscale is running on both devices, the connection is secure.

MagicDNS (Optional)

Tailscale's MagicDNS lets you use simple hostnames instead of IPs.

  1. Open Tailscale Admin Console
  2. Go to DNS settings
  3. Enable MagicDNS
  4. Now use synology instead of 100.x.x.x

Troubleshooting

Device not appearing in admin

  • Make sure Tailscale is running on both devices
  • Check you're signed into the same account
  • Try tailscale status on command line

Can't connect to database

  • Verify both devices show "Connected" in Tailscale
  • Try pinging the NAS: ping synology
  • Check PostgreSQL is running on the NAS
  • Verify port 5432 is correct

Slow connection

Tailscale tries direct connections but sometimes uses relay servers. Check connection type in admin console - direct is fastest.

Security Tips

  • Enable 2FA on your Tailscale account
  • Use ACLs to restrict which devices can access what
  • Review devices regularly and remove unused ones
  • Key expiry - devices need to re-authenticate periodically