From 48317fca0fa62ce115702fdd8bbd746bd036bb73 Mon Sep 17 00:00:00 2001 From: Milo Schwartz Date: Wed, 8 Jan 2025 20:17:48 -0500 Subject: [PATCH] add choosing vps section --- package.json | 1 + .../02-Getting Started/02-manual-install.md | 4 +- .../02-Getting Started/04-dns-networking.md | 26 +++-- .../02-Getting Started/05-choosing-a-vps.md | 41 +++++++ packages/docusaurus/docusaurus.config.ts | 100 ++++++++++-------- packages/docusaurus/src/pages/index.tsx | 38 +------ 6 files changed, 117 insertions(+), 93 deletions(-) create mode 100644 packages/docusaurus/docs/02-Getting Started/05-choosing-a-vps.md diff --git a/package.json b/package.json index c68ced7..097ea24 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "private": true, "type": "module", "scripts": { + "start": "cd packages/docusaurus && npm start", "deploy": "AWS_PROFILE=fossorial npx sst deploy --stage prod", "typecheck": "tsc --noEmit" }, diff --git a/packages/docusaurus/docs/02-Getting Started/02-manual-install.md b/packages/docusaurus/docs/02-Getting Started/02-manual-install.md index 747ed5d..7a3fb5f 100644 --- a/packages/docusaurus/docs/02-Getting Started/02-manual-install.md +++ b/packages/docusaurus/docs/02-Getting Started/02-manual-install.md @@ -12,8 +12,8 @@ This guide will walk you through setting up the Docker Compose stack manually wi - A Linux system with root access and a public IP address - We recommend Ubuntu or Debian based systems -- A domain name pointed to your server's IP address -- **TCP ports 80, 443, and UDP port 51820 exposed** to your Linux instance +- [A domain name pointed to your server's IP address](./04-dns-networking.md) +- [TCP ports 80, 443, and UDP port 51820 exposed to your Linux instance.](./04-dns-networking.md) - An email address for Let's Encrypt certificate registration - (Optionally) a SMTP server diff --git a/packages/docusaurus/docs/02-Getting Started/04-dns-networking.md b/packages/docusaurus/docs/02-Getting Started/04-dns-networking.md index 7e43bcf..ae5176d 100644 --- a/packages/docusaurus/docs/02-Getting Started/04-dns-networking.md +++ b/packages/docusaurus/docs/02-Getting Started/04-dns-networking.md @@ -1,12 +1,18 @@ # DNS & Networking -Some notes about how to set up key parts of the networking in this project are below: +:::note -### DNS +You will not need to open any ports on your private (the network running Newt) network. All traffic is sent through the the tunnel. Therefore, you only need to open ports on the VPS running Pangolin. + +::: + +Some notes about how to set up key parts of the networking in this project are below. This is not a comprehensive guide to networking, but should help you get started. + +## DNS In your DNS service you will want to create A (or AAAA for IPv6) records pointing at your VPS hosting Pangolin. -##### Wildcards +### Wildcards Use * @@ -14,7 +20,7 @@ Example: **\*.example.com** You will need a wildcard subdomain for each level you want to create and you can not have more than one * in a row for many providers. So if you wanted your resources to include a subdomain like "proxy", then you would want *.proxy.example.com. -##### The Root +### The Root Use @ (or nothing depending on the provider) @@ -28,19 +34,19 @@ Sometimes you need to be patient with your DNS service provider. Once you make t ::: -### Ports to Expose +## Ports to Expose When you setup your VPS you want to make sure that you expose the following ports **on the VPS itself**. -##### TCP 80 +### TCP 80 If you are using HTTP SSL verification (default from the installer) then Lets Encrypt will try to reach Traefik on this port to verify the subdomain. Non SSL resources will also use this port. -##### TCP 443 +### TCP 443 The Pangolin web UI and SSL resources use this port to connect with HTTPS. -##### UDP 51820 +### UDP 51820 This is the default WireGuard port and is used for Newt and WireGuard clients to connect to Gerbil. If you change this in the config file then you would use that port. @@ -50,6 +56,6 @@ Its important to **ONLY** expose the ports you need. Effectively by tunneling ou ::: -### Notes on Docker +## Notes on Docker -If you deploy Newt in Docker: "localhost" only refers to stuff inside of the container itself, so if you want to address other things in the Docker environment you need the internal docker IP of that service or the host when setting up your resources. \ No newline at end of file +If you deploy Newt in Docker: "localhost" only refers to stuff inside of the container itself, so if you want to address other things in the Docker environment you need the internal docker IP of that service or the host when setting up your resources. diff --git a/packages/docusaurus/docs/02-Getting Started/05-choosing-a-vps.md b/packages/docusaurus/docs/02-Getting Started/05-choosing-a-vps.md new file mode 100644 index 0000000..5f3439d --- /dev/null +++ b/packages/docusaurus/docs/02-Getting Started/05-choosing-a-vps.md @@ -0,0 +1,41 @@ +# Choosing a VPS + +Our stack is lightweight and efficient, so you don’t need a high-powered server to get started. A minimal VPS instance with **1 vCPU, 1GB RAM, and 8GB SSD** will perform perfectly well for most use cases. In some cases, you may be able to get away with even less. + +## Recommended VPS Providers + +Here’s a list of popular VPS platforms in no particular order, all offering low-cost options that fit the recommended specs: + +1. **[Amazon EC2](https://instances.vantage.sh/)** + + - Pricing: Starts around $8.50/month for 1 vCPU, 1GB RAM, and 8GB SSD. + +2. **[DigitalOcean](https://www.digitalocean.com/pricing/droplets)** + + - Pricing: Starts around $6/month for 1 vCPU, 1GB RAM, and 25GB SSD. + +3. **[Vultr](https://www.vultr.com/pricing)** + + - Pricing: Starts around $5/month for 1 vCPU, 1GB RAM, and 25GB SSD. + +4. **[Linode](https://www.linode.com/pricing/)** + + - Pricing: Starts around $5/month for 1 vCPU, 1GB RAM, and 25GB SSD. + +5. **[Hetzner Cloud](https://www.hetzner.com/cloud)** + + - Pricing: Starts around $4.59/month for 2 vCPU, 4GB RAM, and 40GB SSD. + +6. **[UpCloud](https://upcloud.com/pricing/)** + + - Pricing: Starts around $3.30/month for 1 vCPU, 1GB RAM, and 10GB SSD. + +7. **[OVHcloud](https://www.ovhcloud.com/en/vps/)** + + - Pricing: Starts around $5.50/month for 2 vCPU, 2GB RAM, and 40GB SSD. + +--- + +## General Pricing Overview + +You can find VPS instances starting from **$3 to $6 per month**, depending on the provider and location. While all of the above options are suitable, we recommend choosing a provider with servers close to your user base for optimal performance. diff --git a/packages/docusaurus/docusaurus.config.ts b/packages/docusaurus/docusaurus.config.ts index 92cd2cc..7eb8faa 100644 --- a/packages/docusaurus/docusaurus.config.ts +++ b/packages/docusaurus/docusaurus.config.ts @@ -1,49 +1,49 @@ -import {themes as prismThemes} from 'prism-react-renderer'; -import type {Config} from '@docusaurus/types'; -import type * as Preset from '@docusaurus/preset-classic'; +import { themes as prismThemes } from "prism-react-renderer"; +import type { Config } from "@docusaurus/types"; +import type * as Preset from "@docusaurus/preset-classic"; // This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) const config: Config = { - title: 'Fossorial Docs', - tagline: 'Adapted for use in burrowing', - favicon: 'img/favicon.ico', + title: "Fossorial Docs", + tagline: "Adapted for use in burrowing", + favicon: "img/favicon.ico", // Set the production url of your site here - url: 'https://docs.fossorial.io', + url: "https://docs.fossorial.io", // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' - baseUrl: '/', + baseUrl: "/", // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. - organizationName: 'Fossorial', // Usually your GitHub org/user name. - projectName: 'docs', // Usually your repo name. + organizationName: "Fossorial", // Usually your GitHub org/user name. + projectName: "docs", // Usually your repo name. - onBrokenLinks: 'throw', - onBrokenMarkdownLinks: 'warn', + onBrokenLinks: "throw", + onBrokenMarkdownLinks: "warn", // Even if you don't use internationalization, you can use this field to set // useful metadata like html lang. For example, if your site is Chinese, you // may want to replace "en" with "zh-Hans". i18n: { - defaultLocale: 'en', - locales: ['en'], + defaultLocale: "en", + locales: ["en"], }, presets: [ [ - 'classic', + "classic", { docs: { - sidebarPath: './sidebars.ts', - routeBasePath: '/' + sidebarPath: "./sidebars.ts", + routeBasePath: "/", // Please change this to your repo. // Remove this to remove the "edit this page" links. - // editUrl: - // 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', + // editUrl: + // 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', }, - blog: false, + blog: false, // blog: { // showReadingTime: true, // feedOptions: { @@ -60,7 +60,7 @@ const config: Config = { // onUntruncatedBlogPosts: 'warn', // }, theme: { - customCss: './src/css/custom.css', + customCss: "./src/css/custom.css", }, } satisfies Preset.Options, ], @@ -68,55 +68,63 @@ const config: Config = { themeConfig: { // Replace with your project's social card - image: 'img/docusaurus-social-card.jpg', + image: "img/docusaurus-social-card.jpg", + algolia: { + // The application ID provided by Algolia + appId: "CVXQS7OHYA", + // Public API key: it is safe to commit it + apiKey: "37f86a9f9a04ab1c0f17339c86566ce5", + indexName: "fossorial", + contextualSearch: false, + }, navbar: { - title: 'Fossorial', + title: "Fossorial", logo: { - alt: 'Fossorial Logo', - src: 'img/pangolin_orange.svg', + alt: "Fossorial Logo", + src: "img/pangolin_orange.svg", }, items: [ { - type: 'docSidebar', - sidebarId: 'tutorialSidebar', - position: 'left', - label: 'Docs', + type: "docSidebar", + sidebarId: "tutorialSidebar", + position: "left", + label: "Docs", }, // {to: '/blog', label: 'Blog', position: 'left'}, { - href: 'https://github.com/fosrl', - label: 'GitHub', - position: 'right', + href: "https://github.com/fosrl", + label: "GitHub", + position: "right", }, { - href: 'https://discord.gg/HCJR8Xhme4', - label: 'Discord', - position: 'right', - } + href: "https://discord.gg/HCJR8Xhme4", + label: "Discord", + position: "right", + }, ], }, footer: { - style: 'dark', + style: "dark", links: [ { - title: 'Docs', + title: "Docs", items: [ { - label: 'Docs', - to: '/overview', + label: "Docs", + to: "/overview", }, ], }, { - title: 'Community', + title: "Community", items: [ // { // label: 'Stack Overflow', // href: 'https://stackoverflow.com/questions/tagged/docusaurus', // }, { - label: 'Discord', - href: 'https://discord.gg/HCJR8Xhme4', + label: "Discord", + href: "https://discord.gg/HCJR8Xhme4", }, // { // label: 'X', @@ -125,15 +133,15 @@ const config: Config = { ], }, { - title: 'More', + title: "More", items: [ // { // label: 'Blog', // to: '/blog', // }, { - label: 'GitHub', - href: 'https://github.com/fosrl', + label: "GitHub", + href: "https://github.com/fosrl", }, ], }, diff --git a/packages/docusaurus/src/pages/index.tsx b/packages/docusaurus/src/pages/index.tsx index 9bd94fd..5cbfc87 100644 --- a/packages/docusaurus/src/pages/index.tsx +++ b/packages/docusaurus/src/pages/index.tsx @@ -1,42 +1,10 @@ -import clsx from "clsx"; -import Link from "@docusaurus/Link"; -import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; -import Layout from "@theme/Layout"; -import HomepageFeatures from "@site/src/components/HomepageFeatures"; -import Heading from "@theme/Heading"; - -import styles from "./index.module.css"; import { useEffect } from "react"; -function HomepageHeader() { - const { siteConfig } = useDocusaurusContext(); - return ( -
-
- - {siteConfig.title} - -

{siteConfig.tagline}

-
- - Pangolin Tutorial - 5min ⏱️ - -
-
-
- ); -} - export default function Home(): JSX.Element { - const { siteConfig } = useDocusaurusContext(); - useEffect(() => { - // redirect to /overview - window.location.href = "/overview"; + // redirect to /overview + window.location.href = "/overview"; }); - return <> + return <>; }