diff --git a/src/app/docs/page.tsx b/src/app/docs/page.tsx index bcacd3c..9441a53 100644 --- a/src/app/docs/page.tsx +++ b/src/app/docs/page.tsx @@ -1,389 +1,340 @@ -'use client'; - -import Link from 'next/link'; -import Navbar from '@/components/Navbar'; -import Footer from '@/components/Footer'; - -export default function DocsPage() { - return ( -
- - - {/* Hero Section */} -
-
-
-
- -
-

- Getting Started -

-

- Get DashCaddy up and running on your server in just a few minutes. -

-
-
- - {/* Main Content */} -
-
- {/* Table of Contents */} -
-

Table of Contents

- -
- - {/* Prerequisites Section */} -
-

- 📋 Prerequisites -

-

- Before you begin, ensure you have the following installed on your server: -

-
-
-
🐳
-
-

Docker

-

Version 20.10+ required. Install Docker

-
-
-
-
⚙️
-
-

Caddy

-

Version 2.7+ required. Install Caddy

-
-
-
-
🟢
-
-

Node.js

-

Version 18+ required. Install Node.js

-
-
-
-
🔧
-
-

Git

-

For cloning the repository. Install Git

-
-
-
-

Optional

-
-
🌐
-
-

Technitium DNS

-

For automatic DNS management. If not installed, you can still manage DNS manually.

-
-
-
-
-
- - {/* Installation Section */} -
-

- 📦 Installation -

-

- Follow these steps to install DashCaddy on your server: -

- - {/* Step 1 */} -
-

Step 1: Clone the Repository

-
- - git clone https://github.com/dashcaddy/dashcaddy.git -
- cd dashcaddy -
-
-
- - {/* Step 2 */} -
-

Step 2: Install Dependencies

-

Install Node.js dependencies:

-
- - npm install - -
-
- - {/* Step 3 */} -
-

Step 3: Configure Environment Variables

-

Copy the example environment file and customize it:

-
- - cp .env.example .env - -
-

Then edit .env with your configuration:

-
- -{`# Server -PORT=3000 -NODE_ENV=production - -# Database (optional - defaults to SQLite) -DATABASE_URL=sqlite:./data/dashcaddy.db - -# Security -JWT_SECRET=your-secure-random-secret-here -SESSION_SECRET=another-secure-random-secret - -# Caddy -CADDY_PORT=80 -CADDY_HTTPS_PORT=443 -CADDY_ADMIN_LISTEN=localhost:2019 - -# Technitium DNS (optional) -TECHNITIUM_API_URL=http://localhost:5380/api -TECHNITIUM_API_KEY=your-api-key - -# Email (optional - for notifications) -SMTP_HOST=smtp.example.com -SMTP_PORT=587 -SMTP_USER=your-email@example.com -SMTP_PASSWORD=your-password`} - -
-
- - {/* Step 4 */} -
-

Step 4: Build and Start

-

Build the application:

-
- - npm run build - -
-

Start DashCaddy:

-
- - npm start - -
-

- The application will be available at http://localhost:3000 -

-
- - {/* Step 5 */} -
-

Step 5: Configure Caddy

-

Update your Caddy configuration to proxy requests to DashCaddy:

-
- -{`dashcaddy.local { - reverse_proxy localhost:3000 - - # Enable automatic HTTPS - encode gzip - - # Security headers - header Strict-Transport-Security "max-age=31536000" - header X-Content-Type-Options "nosniff" - header X-Frame-Options "DENY" -}`} - -
-
-
- - {/* Configuration Section */} -
-

- ⚙️ Configuration -

-

- Key environment variables for DashCaddy configuration: -

- -
-
-

PORT

-

The port DashCaddy runs on. Default: 3000

-
- -
-

JWT_SECRET

-

Secret key for JWT tokens. Generate a secure random string:

- openssl rand -hex 32 -
- -
-

DATABASE_URL

-

Connection string for your database. Defaults to SQLite if not provided.

-
- -
-

CADDY_ADMIN_LISTEN

-

Caddy admin API endpoint. Default: localhost:2019

-
- -
-

TECHNITIUM_API_URL

-

URL to your Technitium DNS API. Optional for DNS management features.

-
-
-
- - {/* First Run Section */} -
-

- 🚀 First Run -

-
-
    -
  1. Access the dashboard at http://dashcaddy.local
  2. -
  3. Create your admin account with a strong password
  4. -
  5. Enable TOTP 2FA for enhanced security
  6. -
  7. Configure your Technitium DNS API key (optional)
  8. -
  9. Deploy your first application from the app templates library
  10. -
  11. Monitor your apps in real-time from the dashboard
  12. -
-
-
- - {/* Troubleshooting Section */} -
-

- 🔧 Troubleshooting -

- -
-
-

- Docker daemon not running -

-

Make sure the Docker daemon is started:

- sudo systemctl start docker -
- -
-

- Port 3000 already in use -

-

Change the PORT in your .env file or stop the process using that port:

- lsof -i :3000 -
- -
-

- Cannot connect to Caddy admin API -

-

Verify Caddy is running and the admin API is accessible:

- curl http://localhost:2019/config/ -
- -
-

- Database connection errors -

-

Check that your DATABASE_URL is correct and the database is accessible. For SQLite, ensure the data directory exists:

- mkdir -p ./data -
- -
-

- SSL certificate issues -

-

DashCaddy uses Caddy's internal CA for certificate generation. If you have issues, check the Caddy logs:

- journalctl -u caddy -f -
-
-
- - {/* Next Steps */} -
-
-

Next Steps

-
- - -
-

Explore Features

-

Learn about all the powerful features DashCaddy offers.

-
- - - - 📚 -
-

API Reference

-

Full API documentation for developers.

-
-
- - - 💎 -
-

View Pricing

-

Check out our free and premium plans.

-
- - - - 💬 -
-

Get Support

-

Contact our support team for help.

-
-
-
-
-
-
-
- -
- ); -} +'use client'; + +import Link from 'next/link'; +import Navbar from '@/components/Navbar'; +import Footer from '@/components/Footer'; + +export default function DocsPage() { + return ( +
+ + + {/* Hero */} +
+
+
+
+
+

+ How to Use DashCaddy +

+

+ Self-host Docker apps in minutes. DNS, SSL, and routing handled automatically. +

+
+
+ + {/* Table of Contents */} +
+
+
+

What You Can Do

+
+ {[ + { icon: '🚀', title: 'Deploy 75+ Apps', desc: 'Plex, Nextcloud, Jellyfin, Sonarr, and more' }, + { icon: '⚡', title: 'Automatic SSL', desc: 'Every app gets a valid HTTPS certificate' }, + { icon: '🌐', title: 'Private DNS', desc: 'Technitium DNS for .sami and .home zones' }, + { icon: '🔒', title: 'One-Click CA', desc: 'Install internal root cert on all devices' }, + { icon: '📺', title: 'Media Automation', desc: 'ARR Smart Connect: Plex + Radarr + Sonarr in one click' }, + { icon: '🐝', title: 'Docker Swarm', desc: 'Deploy across a cluster of servers (Premium)' }, + ].map(({ icon, title, desc }) => ( +
+ {icon} +
+
{title}
+
{desc}
+
+
+ ))} +
+
+
+
+ + {/* App Templates */} +
+
+

75+ App Templates

+ {[ + { cat: 'Media Streaming', icon: '🎬', apps: 'Plex, Jellyfin, Emby, Navidrome, Calibre-Web, Kavita, Komga, Audiobookshelf, Airsonic' }, + { cat: 'Media Automation', icon: '📺', apps: 'Sonarr, Radarr, Prowlarr, Bazarr, Lidarr, Readarr, Tautulli, Seerr' }, + { cat: 'Downloads', icon: '⬇️', apps: 'qBittorrent, Transmission, SABnzbd, NZBGet, JDownloader 2' }, + { cat: 'DNS & Networking', icon: '🌐', apps: 'Technitium DNS, BIND9, PowerDNS, CoreDNS, Pi-hole, WireGuard VPN' }, + { cat: 'Security', icon: '🔒', apps: 'DashCA, Vaultwarden, Authentik, CrowdSec' }, + { cat: 'DevOps', icon: '⚙️', apps: 'Gitea, Jenkins, Drone CI, VS Code Server' }, + { cat: 'Productivity', icon: '📋', apps: 'Nextcloud, Outline, BookStack, Standard Notes, Trilium, Mealie, Excalidraw, Actual Budget' }, + { cat: 'Database', icon: '🗄️', apps: 'PostgreSQL, Redis, MongoDB, Adminer' }, + { cat: 'Photos', icon: '📷', apps: 'Immich, PhotoPrism' }, + { cat: 'Home Automation', icon: '🏠', apps: 'Home Assistant, Node-RED' }, + { cat: 'Communication', icon: '💬', apps: 'Rocket.Chat, Matrix Synapse, Roundcube, Docker Mailserver' }, + { cat: 'Gaming', icon: '🎮', apps: 'Minecraft Server, Valheim Server' }, + ].map(({ cat, icon, apps }) => ( +
+
+ {icon} + {cat} +
+

{apps}

+
+ ))} +
+
+ + {/* How Deployment Works */} +
+
+

How App Deployment Works

+ +
+ {[ + { + step: '1', + title: 'Choose an App', + desc: 'Browse by category or search. Each template includes the Docker image, port mappings, volume mounts, and secrets configuration.', + }, + { + step: '2', + title: 'Configure Routing', + desc: 'Pick subdomain mode (plex.yourdomain.com) or subdirectory mode (yourdomain.com/sonarr). Subdomain needs DNS; subdirectory works immediately.', + }, + { + step: '3', + title: 'Set Secrets', + desc: 'DashCaddy auto-generates secure passwords for admin accounts and API keys. You can also provide your own.', + }, + { + step: '4', + title: 'Deploy', + desc: 'DashCaddy pulls the image, creates the container, configures Caddy for reverse proxy, and issues a Let\'s Encrypt SSL certificate. Your app is live in minutes.', + }, + ].map(({ step, title, desc }) => ( +
+
+ {step} +
+
+

{title}

+

{desc}

+
+
+ ))} +
+
+
+ + {/* Key Features */} +
+
+

Platform Features

+ +
+ {[ + { + icon: '⚡', + title: 'Automatic SSL', + body: 'Caddy handles HTTPS automatically via Let\'s Encrypt. Every app gets a valid certificate — no manual certbot, no renewals, no expired certs.', + }, + { + icon: '🌐', + title: 'Private DNS Zones', + body: 'Deploy Technitium DNS Server to manage .sami or .home zones. plex.sami, vaultwarden.sami, jellyfin.sami — all resolve internally on your network.', + }, + { + icon: '🔒', + title: 'DashCA — One-Click CA', + body: 'Deploy once, visit http://ca.sami from any device, install the root certificate. All your internal *.sami domains show as fully trusted. Works on Windows, macOS, Linux, iOS, Android.', + }, + { + icon: '📺', + title: 'ARR Smart Connect', + body: 'One-click setup connecting Plex + Radarr + Sonarr + Prowlarr + Seerr. Detects your Plex libraries, wires up Radarr/Sonarr automatically, configures indexers. Minutes instead of days.', + }, + { + icon: '🔐', + title: 'TOTP 2FA', + body: 'The dashboard itself supports optional TOTP two-factor authentication. Enable it in Settings to protect admin access.', + }, + { + icon: '🐝', + title: 'Docker Swarm (Premium)', + body: 'Scale beyond one server. Deploy apps across a cluster of multiple servers from a single DashCaddy control plane.', + }, + { + icon: '🍯', + title: 'Recipes (Premium)', + body: 'One-click app stacks — deploy a complete "media server" or "homelab" in a single action instead of deploying apps one by one.', + }, + { + icon: '🔑', + title: 'SSO (Premium)', + body: 'Connect Authentik as your identity provider. One login for DashCaddy, Nextcloud, Jellyfin, Gitea, and any OAuth2/OIDC-compatible app.', + }, + ].map(({ icon, title, body }) => ( +
+
+ {icon} +

{title}

+
+

{body}

+
+ ))} +
+
+
+ + {/* Pricing */} +
+
+

Pricing & Licensing

+ +
+ {/* Free */} +
+
Free
+
$0 forever
+
    + {[ + 'Deploy unlimited apps', + '75+ app templates', + 'Automatic SSL certificates', + 'Docker management dashboard', + 'Subdomain + subdirectory routing', + 'Built-in DNS integration', + 'TOTP 2FA on dashboard', + ].map(f => ( +
  • + + {f} +
  • + ))} +
+ + Get Started Free + +
+ + {/* Premium */} +
+
+ Premium +
+
Premium
+
$25 / month
+

or $99/year — all premium features

+
    + {[ + 'Everything in Core', + 'SSO — Authentik single sign-on', + 'Recipes — one-click app stacks', + 'Docker Swarm cluster management', + 'Priority support', + ].map(f => ( +
  • + + {f} +
  • + ))} + {['premium_1m: $25/mo', 'premium_3m: $50', 'premium_6m: $65', 'premium_12m: $99/yr'].map((p, i) => ( +
  • + {p} +
  • + ))} +
+ + Get Premium + +
+
+ +
+ License model: One machine at a time. Machine-bound fingerprint. Subscriptions cancel at period end. 7-day grace period on failed payments. Deactivate anytime to move to a new machine. No free trial. +
+
+
+ + {/* Infrastructure Integrations */} +
+
+

Infrastructure Integrations

+ + {[ + { + title: 'Technitium DNS Server', + icon: '🌐', + desc: 'Self-hosted DNS with web UI. Manage private zones (.sami, .home) on your local network. Supports DNSSEC, DNS-over-HTTPS, and DNS-over-TLS.', + setup: 'Deploy the template → Access at https://dns1.sami → Create your zone → Add A records → Point your router to your DNS server', + }, + { + title: 'Pi-hole', + icon: '🛡️', + desc: 'Network-wide ad blocking DNS sinkhole. All DNS queries on your network pass through Pi-hole — ads and trackers get blocked at the DNS level.', + setup: 'Deploy in one click. Point your router or devices to the Pi-hole IP. No configuration needed.', + }, + { + title: 'WireGuard VPN', + icon: '🔐', + desc: 'Fast, modern VPN tunnel. Deploy the server, generate client config files, share with family or teammates. Full VPN access from anywhere.', + setup: 'Deploy the template → Download client configs → Share with users → Connect from any device', + }, + { + title: 'DashCA (Internal CA)', + icon: '🔒', + desc: 'Built-in certificate authority. Install the root certificate once, all your internal *.sami domains are trusted on every device on your network.', + setup: 'Deploy DashCA → Visit http://ca.sami from any device → Click Install Certificate → Follow your OS instructions', + }, + ].map(({ title, icon, desc, setup }) => ( +
+
+ {icon} +

{title}

+
+

{desc}

+
+ Setup: + {setup} +
+
+ ))} +
+
+ + {/* Troubleshooting */} +
+
+

Troubleshooting

+
+ {[ + { + q: 'App shows "Configuring" after deployment', + a: 'Check the app\'s logs in Dozzle or Portainer. Verify the port isn\'t already in use. Make sure volume mounts have correct permissions.', + }, + { + q: 'SSL certificate not issued', + a: 'Verify your DNS is pointed to your server\'s IP. Check that ports 80 and 443 are open. Give Caddy 1-2 minutes after first deploy.', + }, + { + q: "Can't access app after deployment", + a: 'Try the subdomain directly (DNS may need to propagate). Check Caddy routing rules in the dashboard. Verify the container is running in Portainer.', + }, + { + q: 'License won\'t activate', + a: 'Make sure the machine is connected to the internet. Check the machine\'s clock is set correctly. Try deactivating the old machine first if moving to a new server.', + }, + { + q: 'Subscriptions not activating after payment', + a: 'The Stripe webhook can take a few minutes to arrive. If it doesn\'t arrive within 10 minutes, contact support with your Stripe payment reference.', + }, + ].map(({ q, a }) => ( +
+
{q}
+
{a}
+
+ ))} +
+
+
+ +
+ ); +}