How to Set Up Automatic Failover for Your Website in 5 Minutes
If your website goes down, how long does it take to get it back? Hours? Minutes? What if your users never noticed — because they were automatically redirected to a working mirror before the error page even loaded?
That's what automatic failover does. And in this guide, you'll set it up in under 5 minutes. By the end, you'll have a fully operational mirror management system with health monitoring, automatic switching, and a branded mobile app for your users.
What You'll Need
- A VPS — Any Ubuntu 20.04+ server with at least 1 GB RAM. DigitalOcean, Hetzner, Vultr — any provider works.
- A domain with DNS access — You'll need to point a domain or subdomain to your VPS.
- 5 minutes of your time — That's it. No DevOps experience required.
Step 1 — Deploy Link Armor on Your VPS
SSH into your server and run the one-command installer:
curl -sL https://linkarmor.ru/install.sh | bash -s -- --client-id YOUR_ID --secret YOUR_SECRET
Replace YOUR_ID and YOUR_SECRET with the credentials you receive after signing up. The installer handles everything:
- Pulls and configures Docker containers
- Generates SSL certificates (Let's Encrypt or self-signed)
- Sets up nginx as a reverse proxy
- Creates your admin dashboard
- Starts the mirror management backend
The entire process takes about 3 minutes. When it's done, you'll see your admin URL and credentials in the terminal output.
Step 2 — Configure Your Mirror Pool
Open your admin dashboard (the URL from Step 1) and navigate to the Mirror Management section:
- Add your primary mirror URL — This is your main website domain that users normally access.
- Add backup mirror URLs — These are alternative domains or IPs that host the same content. You can add up to 5 mirrors on Pro, or unlimited on Enterprise.
- Set priority order — The system tries mirrors in priority order. Put your most reliable mirror first and backups below.
The platform immediately starts health-checking all mirrors. You'll see their status (Online / Offline) update in real-time on the dashboard.
Step 3 — Customize Your Mobile App
Your users need a mobile app to benefit from automatic failover. Customize it in the Branding section:
- Upload your logo — The app icon and splash screen will feature your branding.
- Set app name and colors — Choose your app's display name and primary color scheme.
- Download the signed APK — The platform generates a custom, cryptographically signed Android APK specifically for your deployment.
On the Enterprise plan, you get full white-label branding — no "Powered by Link Armor" badge, completely your own app identity.
Share the APK download link or QR code with your users. They install it once, and mirror updates are delivered automatically through the app.
Step 4 — Verify Health Checks
Before going live, verify that health monitoring is working correctly:
- Check the dashboard — All mirrors should show "Online" status with recent health check timestamps.
- Review check intervals — Basic: manual, Pro: every 15 minutes, Enterprise: every 60 seconds.
- Test failover — Temporarily take down your primary mirror (or change its URL to a non-existent one). The app should switch to the backup mirror within seconds.
The health check system validates more than just HTTP status codes. It checks response times, content validity, and SSL certificate status. If any check fails, the mirror is marked as unhealthy and users are routed to the next available one.
Understanding Failover Behavior
What Happens When Primary Goes Down
When the health check detects that your primary mirror is unresponsive, the system immediately selects the next mirror in your priority list. The mobile app receives an updated manifest with the new active mirror and redirects the user. Total time: under 5 seconds.
How Users Are Redirected
The mobile app periodically fetches a manifest file from your server. This manifest contains the current list of mirrors with their health status. When the manifest updates (because a mirror went down), the app automatically loads the next healthy mirror. No user action needed.
What Happens When Primary Comes Back Up
When your primary mirror recovers, the health check marks it as Online again. On the next manifest refresh, the app sees that the primary is healthy and can redirect users back. This behavior is configurable — you can keep users on the backup mirror or automatically move them back to the primary.
Best Practices
- Use at least 3 mirrors — One primary and two backups give you triple redundancy. If two mirrors go down simultaneously, you still have one working connection point.
- Different hosting providers — Don't host all mirrors with the same provider. A provider-wide outage would take down all your mirrors. Spread them across DigitalOcean, Hetzner, Vultr, or your own servers.
- Monitor your dashboard regularly — Check the admin panel at least once a week. Look for mirrors with degraded health, slow response times, or SSL certificate expiration warnings.
- Set up push notifications — On Pro and Enterprise plans, configure push notifications to alert your users about new mirrors or important updates. This keeps your audience informed and engaged.
- Test failover monthly — Intentionally take down your primary mirror once a month to verify that failover works as expected. This builds confidence in your system and helps catch configuration issues early.
- Keep your APK updated — When you make changes to your mirror pool or branding, the app updates automatically. But major platform updates may require users to download a new APK. Keep an eye on release notes.
Ready to Eliminate Downtime?
Set up automatic failover in 5 minutes and keep your users connected — no matter what happens to your primary infrastructure.
View Pricing →Conclusion
Setting up automatic failover doesn't require a DevOps team, a large budget, or weeks of configuration. With Link Armor, you can deploy a complete mirror management system in 5 minutes — and your users will never see an error page again.
The combination of health monitoring, automatic switching, and a branded mobile app means your infrastructure is resilient by default. You focus on building your product; Link Armor ensures your users can always reach it.
Related: Learn the fundamentals of mirror management in our complete guide, or explore why self-hosting matters in our Self-Hosted vs Cloud comparison.