netmaker/docs/_build/html/server-installation.html
2021-09-23 12:01:12 -04:00

1212 lines
67 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="lang:clipboard.copy" content="Copy to clipboard">
<meta name="lang:clipboard.copied" content="Copied to clipboard">
<meta name="lang:search.language" content="en">
<meta name="lang:search.pipeline.stopwords" content="True">
<meta name="lang:search.pipeline.trimmer" content="True">
<meta name="lang:search.result.none" content="No matching documents">
<meta name="lang:search.result.one" content="1 matching document">
<meta name="lang:search.result.other" content="# matching documents">
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link href="https://fonts.gstatic.com/" rel="preconnect" crossorigin>
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,500,700|Roboto:300,400,400i,700&display=fallback" rel="stylesheet">
<style>
body,
input {
font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif
}
code,
kbd,
pre {
font-family: "Roboto Mono", "Courier New", Courier, monospace
}
</style>
<link rel="stylesheet" href="_static/stylesheets/application.css"/>
<link rel="stylesheet" href="_static/stylesheets/application-palette.css"/>
<link rel="stylesheet" href="_static/stylesheets/application-fixes.css"/>
<link rel="stylesheet" href="_static/fonts/material-icons.css"/>
<meta name="theme-color" content="#3f51b5">
<script src="_static/javascripts/modernizr.js"></script>
<title>Advanced Server Installation &#8212; Netmaker 0.7 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/material.css" type="text/css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<link rel="author" title="About these documents" href="about.html" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Client Installation" href="client-installation.html" />
<link rel="prev" title="Getting Started" href="getting-started.html" />
</head>
<body dir=ltr
data-md-color-primary=indigo data-md-color-accent=light-blue>
<svg class="md-svg">
<defs data-children-count="0">
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448" viewBox="0 0 416 448" id="__github"><path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19T128 352t-18.125-8.5-10.75-19T96 304t3.125-20.5 10.75-19T128 256t18.125 8.5 10.75 19T160 304zm160 0q0 10-3.125 20.5t-10.75 19T288 352t-18.125-8.5-10.75-19T256 304t3.125-20.5 10.75-19T288 256t18.125 8.5 10.75 19T320 304zm40 0q0-30-17.25-51T296 232q-10.25 0-48.75 5.25Q229.5 240 208 240t-39.25-2.75Q130.75 232 120 232q-29.5 0-46.75 21T56 304q0 22 8 38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0 37.25-1.75t35-7.375 30.5-15 20.25-25.75T360 304zm56-44q0 51.75-15.25 82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5T212 416q-19.5 0-35.5-.75t-36.875-3.125-38.125-7.5-34.25-12.875T37 371.5t-21.5-28.75Q0 312 0 260q0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25 30.875Q171.5 96 212 96q37 0 70 8 26.25-20.5 46.75-30.25T376 64q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34 99.5z"/></svg>
</defs>
</svg>
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search">
<label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
<a href="#server-installation" tabindex="1" class="md-skip"> Skip to content </a>
<header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid">
<div class="md-flex navheader">
<div class="md-flex__cell md-flex__cell--shrink">
<a href="index.html" title="Netmaker 0.7 documentation"
class="md-header-nav__button md-logo">
<i class="md-icon">&#xe869</i>
</a>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
</div>
<div class="md-flex__cell md-flex__cell--stretch">
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
<span class="md-header-nav__topic">Netmaker Docs</span>
<span class="md-header-nav__topic"> Advanced Server Installation </span>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" action="search.html" method="GET" name="search">
<input type="text" class="md-search__input" name="q" placeholder="Search"
autocapitalize="off" autocomplete="off" spellcheck="false"
data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
<button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
&#xE5CD;
</button>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="result">
<div class="md-search-result__meta">
Type to start searching
</div>
<ol class="md-search-result__list"></ol>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<div class="md-header-nav__source">
<a href="https://github.com/gravitl/netmaker/" title="Go to repository" class="md-source" data-md-source="github">
<div class="md-source__icon">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24" width="28" height="28">
<use xlink:href="#__github" width="24" height="24"></use>
</svg>
</div>
<div class="md-source__repository">
Netmaker
</div>
</a>
</div>
</div>
<script src="_static/javascripts/version_dropdown.js"></script>
<script>
var json_loc = ""versions.json"",
target_loc = "../",
text = "Versions";
$( document ).ready( add_version_dropdown(json_loc, target_loc, text));
</script>
</div>
</nav>
</header>
<div class="md-container">
<nav class="md-tabs" data-md-component="tabs">
<div class="md-tabs__inner md-grid">
<ul class="md-tabs__list">
<li class="md-tabs__item"><a href="index.html" class="md-tabs__link">Netmaker 0.7 documentation</a></li>
</ul>
</div>
</nav>
<main class="md-main">
<div class="md-main__inner md-grid" data-md-component="container">
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" data-md-level="0">
<label class="md-nav__title md-nav__title--site" for="__drawer">
<a href="index.html" title="Netmaker 0.7 documentation" class="md-nav__button md-logo">
<i class="md-icon">&#xe869</i>
</a>
<a href="index.html"
title="Netmaker 0.7 documentation">Netmaker Docs</a>
</label>
<div class="md-nav__source">
<a href="https://github.com/gravitl/netmaker/" title="Go to repository" class="md-source" data-md-source="github">
<div class="md-source__icon">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24" width="28" height="28">
<use xlink:href="#__github" width="24" height="24"></use>
</svg>
</div>
<div class="md-source__repository">
Netmaker
</div>
</a>
</div>
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="about.html" class="md-nav__link">About</a>
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="about.html#what-is-netmaker" class="md-nav__link">What is Netmaker?</a>
</li>
<li class="md-nav__item">
<a href="about.html#how-does-netmaker-work" class="md-nav__link">How Does Netmaker Work?</a>
</li>
<li class="md-nav__item">
<a href="about.html#use-cases-for-netmaker" class="md-nav__link">Use Cases for Netmaker</a>
</li></ul>
</li>
<li class="md-nav__item">
<a href="architecture.html" class="md-nav__link">Architecture</a>
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="architecture.html#core-concepts" class="md-nav__link">Core Concepts</a>
</li>
<li class="md-nav__item">
<a href="architecture.html#components" class="md-nav__link">Components</a>
</li>
<li class="md-nav__item">
<a href="architecture.html#technical-process" class="md-nav__link">Technical Process</a>
</li>
<li class="md-nav__item">
<a href="architecture.html#compatible-systems-for-netclient" class="md-nav__link">Compatible Systems for Netclient</a>
</li>
<li class="md-nav__item">
<a href="architecture.html#limitations" class="md-nav__link">Limitations</a>
</li></ul>
</li>
<li class="md-nav__item">
<a href="quick-start.html" class="md-nav__link">Quick Install</a>
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="quick-start.html#introduction" class="md-nav__link">0. Introduction</a>
</li>
<li class="md-nav__item">
<a href="quick-start.html#prerequisites" class="md-nav__link">1. Prerequisites</a>
</li>
<li class="md-nav__item">
<a href="quick-start.html#install-dependencies" class="md-nav__link">2. Install Dependencies</a>
</li>
<li class="md-nav__item">
<a href="quick-start.html#prepare-vm" class="md-nav__link">3. Prepare VM</a>
</li>
<li class="md-nav__item">
<a href="quick-start.html#install-netmaker" class="md-nav__link">4. Install Netmaker</a>
</li></ul>
</li>
<li class="md-nav__item">
<a href="getting-started.html" class="md-nav__link">Getting Started</a>
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="getting-started.html#setup" class="md-nav__link">Setup</a>
</li>
<li class="md-nav__item">
<a href="getting-started.html#deploy-nodes" class="md-nav__link">Deploy Nodes</a>
</li>
<li class="md-nav__item">
<a href="getting-started.html#manage-nodes" class="md-nav__link">Manage Nodes</a>
</li>
<li class="md-nav__item">
<a href="getting-started.html#uninstalling-the-netclient" class="md-nav__link">Uninstalling the netclient</a>
</li>
<li class="md-nav__item">
<a href="getting-started.html#uninstalling-netmaker" class="md-nav__link">Uninstalling Netmaker</a>
</li></ul>
</li>
<li class="md-nav__item">
<input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc"> Advanced Server Installation </label>
<a href="#" class="md-nav__link md-nav__link--active">Advanced Server Installation</a>
<nav class="md-nav md-nav--secondary">
<label class="md-nav__title" for="__toc">Contents</label>
<ul class="md-nav__list" data-md-scrollfix="">
<li class="md-nav__item"><a href="#server-installation--page-root" class="md-nav__link">Advanced Server Installation</a><nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item"><a href="#system-compatibility" class="md-nav__link">System Compatibility</a>
</li>
<li class="md-nav__item"><a href="#server-configuration-reference" class="md-nav__link">Server Configuration Reference</a><nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item"><a href="#variable-description" class="md-nav__link">Variable Description</a>
</li>
<li class="md-nav__item"><a href="#config-file-reference" class="md-nav__link">Config File Reference</a>
</li>
<li class="md-nav__item"><a href="#compose-file-annotated" class="md-nav__link">Compose File - Annotated</a>
</li></ul>
</nav>
</li>
<li class="md-nav__item"><a href="#dns-mode-setup" class="md-nav__link">DNS Mode Setup</a>
</li>
<li class="md-nav__item"><a href="#docker-compose-install" class="md-nav__link">Docker Compose Install</a><nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item"><a href="#test-install-no-dns-no-secure-grpc" class="md-nav__link">Test Install - No DNS, No Secure GRPC</a>
</li>
<li class="md-nav__item"><a href="#no-dns-coredns-disabled" class="md-nav__link">No DNS - CoreDNS Disabled</a>
</li></ul>
</nav>
</li>
<li class="md-nav__item"><a href="#linux-install-without-docker" class="md-nav__link">Linux Install without Docker</a><nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item"><a href="#rqlite-setup" class="md-nav__link">rqlite Setup</a>
</li>
<li class="md-nav__item"><a href="#server-setup" class="md-nav__link">Server Setup</a>
</li>
<li class="md-nav__item"><a href="#ui-setup" class="md-nav__link">UI Setup</a>
</li>
<li class="md-nav__item"><a href="#coredns-setup" class="md-nav__link">CoreDNS Setup</a>
</li></ul>
</nav>
</li>
<li class="md-nav__item"><a href="#kubernetes-install" class="md-nav__link">Kubernetes Install</a><nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item"><a href="#server-install" class="md-nav__link">Server Install</a>
</li>
<li class="md-nav__item"><a href="#netclient-daemonset" class="md-nav__link">Netclient Daemonset</a>
</li></ul>
</nav>
</li>
<li class="md-nav__item"><a href="#nginx-reverse-proxy-setup-with-https" class="md-nav__link">Nginx Reverse Proxy Setup with https</a>
</li></ul>
</nav>
</li>
</ul>
</nav>
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#system-compatibility" class="md-nav__link">System Compatibility</a>
</li>
<li class="md-nav__item">
<a href="#server-configuration-reference" class="md-nav__link">Server Configuration Reference</a>
</li>
<li class="md-nav__item">
<a href="#dns-mode-setup" class="md-nav__link">DNS Mode Setup</a>
</li>
<li class="md-nav__item">
<a href="#docker-compose-install" class="md-nav__link">Docker Compose Install</a>
</li>
<li class="md-nav__item">
<a href="#linux-install-without-docker" class="md-nav__link">Linux Install without Docker</a>
</li>
<li class="md-nav__item">
<a href="#kubernetes-install" class="md-nav__link">Kubernetes Install</a>
</li>
<li class="md-nav__item">
<a href="#nginx-reverse-proxy-setup-with-https" class="md-nav__link">Nginx Reverse Proxy Setup with https</a>
</li></ul>
</li>
<li class="md-nav__item">
<a href="client-installation.html" class="md-nav__link">Client Installation</a>
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="client-installation.html#introduction-to-netclient" class="md-nav__link">Introduction to Netclient</a>
</li>
<li class="md-nav__item">
<a href="client-installation.html#modes-and-system-compatibility" class="md-nav__link">Modes and System Compatibility</a>
</li>
<li class="md-nav__item">
<a href="client-installation.html#prerequisites" class="md-nav__link">Prerequisites</a>
</li>
<li class="md-nav__item">
<a href="client-installation.html#configuration" class="md-nav__link">Configuration</a>
</li>
<li class="md-nav__item">
<a href="client-installation.html#installation" class="md-nav__link">Installation</a>
</li>
<li class="md-nav__item">
<a href="client-installation.html#managing-netclient" class="md-nav__link">Managing Netclient</a>
</li></ul>
</li>
<li class="md-nav__item">
<a href="external-clients.html" class="md-nav__link">External Clients</a>
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="external-clients.html#introduction" class="md-nav__link">Introduction</a>
</li>
<li class="md-nav__item">
<a href="external-clients.html#configuring-an-ingress-gateway" class="md-nav__link">Configuring an Ingress Gateway</a>
</li>
<li class="md-nav__item">
<a href="external-clients.html#adding-clients-to-a-gateway" class="md-nav__link">Adding Clients to a Gateway</a>
</li>
<li class="md-nav__item">
<a href="external-clients.html#configuring-dns-for-ext-clients-optional" class="md-nav__link">Configuring DNS for Ext Clients (OPTIONAL)</a>
</li></ul>
</li>
<li class="md-nav__item">
<a href="usage.html" class="md-nav__link">Using Netmaker</a>
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="usage.html#external-tutorials" class="md-nav__link">External Tutorials</a>
</li></ul>
</li>
<li class="md-nav__item">
<a href="api.html" class="md-nav__link">API Reference</a>
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="api.html#api-usage" class="md-nav__link">API Usage</a>
</li>
<li class="md-nav__item">
<a href="api.html#authentication" class="md-nav__link">Authentication</a>
</li>
<li class="md-nav__item">
<a href="api.html#format-of-calls-for-curl" class="md-nav__link">Format of Calls for Curl</a>
</li>
<li class="md-nav__item">
<a href="api.html#api-documentation" class="md-nav__link">API Documentation</a>
</li></ul>
</li>
<li class="md-nav__item">
<a href="troubleshoot.html" class="md-nav__link">Troubleshooting</a>
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="troubleshoot.html#common-issues" class="md-nav__link">Common Issues</a>
</li>
<li class="md-nav__item">
<a href="troubleshoot.html#server" class="md-nav__link">Server</a>
</li>
<li class="md-nav__item">
<a href="troubleshoot.html#ui" class="md-nav__link">UI</a>
</li>
<li class="md-nav__item">
<a href="troubleshoot.html#netclient" class="md-nav__link">Netclient</a>
</li>
<li class="md-nav__item">
<a href="troubleshoot.html#coredns" class="md-nav__link">CoreDNS</a>
</li></ul>
</li>
<li class="md-nav__item">
<a href="support.html" class="md-nav__link">Support</a>
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="support.html#faq" class="md-nav__link">FAQ</a>
</li>
<li class="md-nav__item">
<a href="support.html#contact" class="md-nav__link">Contact</a>
</li></ul>
</li>
<li class="md-nav__item">
<a href="conduct.html" class="md-nav__link">Code of Conduct</a>
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="conduct.html#our-pledge" class="md-nav__link">Our Pledge</a>
</li>
<li class="md-nav__item">
<a href="conduct.html#our-standards" class="md-nav__link">Our Standards</a>
</li>
<li class="md-nav__item">
<a href="conduct.html#our-responsibilities" class="md-nav__link">Our Responsibilities</a>
</li>
<li class="md-nav__item">
<a href="conduct.html#scope" class="md-nav__link">Scope</a>
</li>
<li class="md-nav__item">
<a href="conduct.html#enforcement" class="md-nav__link">Enforcement</a>
</li>
<li class="md-nav__item">
<a href="conduct.html#attribution" class="md-nav__link">Attribution</a>
</li></ul>
</li>
<li class="md-nav__item">
<a href="license.html" class="md-nav__link">License</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary">
<label class="md-nav__title" for="__toc">Contents</label>
<ul class="md-nav__list" data-md-scrollfix="">
<li class="md-nav__item"><a href="#server-installation--page-root" class="md-nav__link">Advanced Server Installation</a><nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item"><a href="#system-compatibility" class="md-nav__link">System Compatibility</a>
</li>
<li class="md-nav__item"><a href="#server-configuration-reference" class="md-nav__link">Server Configuration Reference</a><nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item"><a href="#variable-description" class="md-nav__link">Variable Description</a>
</li>
<li class="md-nav__item"><a href="#config-file-reference" class="md-nav__link">Config File Reference</a>
</li>
<li class="md-nav__item"><a href="#compose-file-annotated" class="md-nav__link">Compose File - Annotated</a>
</li></ul>
</nav>
</li>
<li class="md-nav__item"><a href="#dns-mode-setup" class="md-nav__link">DNS Mode Setup</a>
</li>
<li class="md-nav__item"><a href="#docker-compose-install" class="md-nav__link">Docker Compose Install</a><nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item"><a href="#test-install-no-dns-no-secure-grpc" class="md-nav__link">Test Install - No DNS, No Secure GRPC</a>
</li>
<li class="md-nav__item"><a href="#no-dns-coredns-disabled" class="md-nav__link">No DNS - CoreDNS Disabled</a>
</li></ul>
</nav>
</li>
<li class="md-nav__item"><a href="#linux-install-without-docker" class="md-nav__link">Linux Install without Docker</a><nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item"><a href="#rqlite-setup" class="md-nav__link">rqlite Setup</a>
</li>
<li class="md-nav__item"><a href="#server-setup" class="md-nav__link">Server Setup</a>
</li>
<li class="md-nav__item"><a href="#ui-setup" class="md-nav__link">UI Setup</a>
</li>
<li class="md-nav__item"><a href="#coredns-setup" class="md-nav__link">CoreDNS Setup</a>
</li></ul>
</nav>
</li>
<li class="md-nav__item"><a href="#kubernetes-install" class="md-nav__link">Kubernetes Install</a><nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item"><a href="#server-install" class="md-nav__link">Server Install</a>
</li>
<li class="md-nav__item"><a href="#netclient-daemonset" class="md-nav__link">Netclient Daemonset</a>
</li></ul>
</nav>
</li>
<li class="md-nav__item"><a href="#nginx-reverse-proxy-setup-with-https" class="md-nav__link">Nginx Reverse Proxy Setup with https</a>
</li></ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content">
<article class="md-content__inner md-typeset" role="main">
<h1 id="server-installation--page-root">Advanced Server Installation<a class="headerlink" href="#server-installation--page-root" title="Permalink to this headline"></a></h1>
<p>This section outlines installing the Netmaker server, including Netmaker, Netmaker UI, rqlite, and CoreDNS</p>
<h2 id="system-compatibility">System Compatibility<a class="headerlink" href="#system-compatibility" title="Permalink to this headline"></a></h2>
<p>Netmaker will require elevated privileges to perform network operations. Netmaker has similar limitations to <a class="reference internal" href="client-installation.html"><span class="doc">netclient</span></a> (client networking agent).</p>
<p>Typically, Netmaker is run inside of containers (Docker). To run a non-docker installation, you must run the Netmaker binary, CoreDNS binary, rqlite, and a web server directly on the host. Each of these components have their own individual requirements.</p>
<p>The quick install guide is recommended for first-time installs.</p>
<p>The following documents are meant for special cases like Kubernetes and LXC, or for more advanced setups.</p>
<h2 id="server-configuration-reference">Server Configuration Reference<a class="headerlink" href="#server-configuration-reference" title="Permalink to this headline"></a></h2>
<p>Netmaker sets its configuration in the following order of precendence:</p>
<ol class="arabic simple">
<li><p>Defaults</p></li>
<li><p>Config File</p></li>
<li><p>Environment Variables</p></li>
</ol>
<h3 id="variable-description">Variable Description<a class="headerlink" href="#variable-description" title="Permalink to this headline"></a></h3>
<dl>
<dt>VERBOSITY:</dt><dd><p><strong>Default:</strong> 0</p>
<p><strong>Description:</strong> Specify level of logging you would like on the server. Goes up to 3 for debugging.</p>
</dd>
<dt>GRPC_SSL:</dt><dd><p><strong>Default:</strong> “off”</p>
<p><strong>Description:</strong> Specifies if GRPC is going over secure GRPC or SSL. This is a setting for the clients and is passed through the access token. Can be set to “on” and “off”. Set to on if SSL is configured for GRPC.</p>
</dd>
<dt>SERVER_API_CONN_STRING</dt><dd><p><strong>Default:</strong> “”</p>
<p><strong>Description:</strong> Allows specification of the string used to connect to the server api. Format: IP:PORT or DOMAIN:PORT. Defaults to SERVER_HOST if not specified.</p>
</dd>
<dt>SERVER_GRPC_CONN_STRING</dt><dd><p><strong>Default:</strong> “”</p>
<p><strong>Description:</strong> Allows specification of the string used to connect to grpc. Format: IP:PORT or DOMAIN:PORT. Defaults to SERVER_HOST if not specified.</p>
</dd>
<dt>SERVER_HOST: <em>(depreciated, use SERVER_API_CONN_STRING and SERVER_GRPC_CONN_STRING)</em></dt><dd><p><strong>Default:</strong> Server will perform an IP check and set automatically unless explicitly set, or DISABLE_REMOTE_IP_CHECK is set to true, in which case it defaults to 127.0.0.1</p>
<p><strong>Description:</strong> Sets the SERVER_HTTP_HOST and SERVER_GRPC_HOST variables if they are unset. The address where traffic comes in.</p>
</dd>
<dt>SERVER_HTTP_HOST: <em>(depreciated, use SERVER_API_CONN_STRING and SERVER_GRPC_CONN_STRING)</em></dt><dd><p><strong>Default:</strong> Equals SERVER_HOST if set, “127.0.0.1” if SERVER_HOST is unset.</p>
<p><strong>Description:</strong> Set to make the HTTP and GRPC functions available via different interfaces/networks.</p>
</dd>
<dt>SERVER_GRPC_HOST: <em>(depreciated, use SERVER_API_CONN_STRING and SERVER_GRPC_CONN_STRING)</em></dt><dd><p><strong>Default:</strong> Equals SERVER_HOST if set, “127.0.0.1” if SERVER_HOST is unset.</p>
<p><strong>Description:</strong> Set to make the HTTP and GRPC functions available via different interfaces/networks.</p>
</dd>
<dt>API_PORT:</dt><dd><p><strong>Default:</strong> 8081</p>
<p><strong>Description:</strong> The HTTP API port for Netmaker. Used for API calls / communication from front end.</p>
</dd>
<dt>GRPC_PORT:</dt><dd><p><strong>Default:</strong> 50051</p>
<p><strong>Description:</strong> The GRPC port for Netmaker. Used for communications from nodes.</p>
</dd>
<dt>MASTER_KEY:</dt><dd><p><strong>Default:</strong> “secretkey”</p>
<p><strong>Description:</strong> The admin master key for accessing the API. Change this in any production installation.</p>
</dd>
<dt>CORS_ALLOWED_ORIGIN:</dt><dd><p><strong>Default:</strong> “*”</p>
<p><strong>Description:</strong> The “allowed origin” for API requests. Change to restrict where API requests can come from.</p>
</dd>
<dt>REST_BACKEND:</dt><dd><p><strong>Default:</strong> “on”</p>
<p><strong>Description:</strong> Enables the REST backend (API running on API_PORT at SERVER_HTTP_HOST). Change to “off” to turn off.</p>
</dd>
<dt>AGENT_BACKEND:</dt><dd><p><strong>Default:</strong> “on”</p>
<p><strong>Description:</strong> Enables the AGENT backend (GRPC running on GRPC_PORT at SERVER_GRPC_HOST). Change to “off” to turn off.</p>
</dd>
<dt>DNS_MODE:</dt><dd><p><strong>Default:</strong> “off”</p>
<p><strong>Description:</strong> Enables DNS Mode, meaning config files will be generated for CoreDNS.</p>
</dd>
<dt>DATABASE:</dt><dd><p><strong>Default:</strong> “sqlite”</p>
<p><strong>Description:</strong> Specify db type to connect with. Currently, options include “sqlite” and “rqlite”.</p>
</dd>
<dt>SQL_CONN:</dt><dd><p><strong>Default:</strong><a class="reference external" href="http://">http://</a></p>
<p><strong>Description:</strong> Specify the necessary string to connect with your local or remote sql database.</p>
</dd>
<dt>CLIENT_MODE:</dt><dd><p><strong>Default:</strong> “on”</p>
<p><strong>Description:</strong> Specifies if server should deploy itself as a node (client) in each network. May be turned to “off” for more restricted servers.</p>
</dd>
</dl>
<h3 id="config-file-reference">Config File Reference<a class="headerlink" href="#config-file-reference" title="Permalink to this headline"></a></h3>
<p>A config file may be placed under config/environments/&lt;env-name&gt;.yml. To read this file at runtime, provide the environment variable NETMAKER_ENV at runtime. For instance, dev.yml paired with ENV=dev. Netmaker will load the specified Config file. This allows you to store and manage configurations for different environments. Below is a reference Config File you may use.</p>
<div class="highlight-YAML notranslate"><div class="highlight"><pre><span></span><span class="nt">server</span><span class="p">:</span>
<span class="nt">apihost</span><span class="p">:</span> <span class="s">""</span> <span class="c1"># defaults to 127.0.0.1 or remote ip (SERVER_HOST) if DisableRemoteIPCheck is not set to true. SERVER_API_HOST if set</span>
<span class="nt">apiport</span><span class="p">:</span> <span class="s">""</span> <span class="c1"># defaults to 8081 or HTTP_PORT (if set)</span>
<span class="nt">grpchost</span><span class="p">:</span> <span class="s">""</span> <span class="c1"># defaults to 127.0.0.1 or remote ip (SERVER_HOST) if DisableRemoteIPCheck is not set to true. SERVER_GRPC_HOST if set.</span>
<span class="nt">grpcport</span><span class="p">:</span> <span class="s">""</span> <span class="c1"># defaults to 50051 or GRPC_PORT (if set)</span>
<span class="nt">masterkey</span><span class="p">:</span> <span class="s">""</span> <span class="c1"># defaults to 'secretkey' or MASTER_KEY (if set)</span>
<span class="nt">allowedorigin</span><span class="p">:</span> <span class="s">""</span> <span class="c1"># defaults to '*' or CORS_ALLOWED_ORIGIN (if set)</span>
<span class="nt">restbackend</span><span class="p">:</span> <span class="s">""</span> <span class="c1"># defaults to "on" or REST_BACKEND (if set)</span>
<span class="nt">agentbackend</span><span class="p">:</span> <span class="s">""</span> <span class="c1"># defaults to "on" or AGENT_BACKEND (if set)</span>
<span class="nt">clientmode</span><span class="p">:</span> <span class="s">""</span> <span class="c1"># defaults to "on" or CLIENT_MODE (if set)</span>
<span class="nt">dnsmode</span><span class="p">:</span> <span class="s">""</span> <span class="c1"># defaults to "on" or DNS_MODE (if set)</span>
<span class="nt">sqlconn</span><span class="p">:</span> <span class="s">""</span> <span class="c1"># defaults to "http://" or SQL_CONN (if set)</span>
<span class="nt">disableremoteipcheck</span><span class="p">:</span> <span class="s">""</span> <span class="c1"># defaults to "false" or DISABLE_REMOTE_IP_CHECK (if set)</span>
<span class="nt">version</span><span class="p">:</span> <span class="s">""</span> <span class="c1"># version of server</span>
</pre></div>
</div>
<h3 id="compose-file-annotated">Compose File - Annotated<a class="headerlink" href="#compose-file-annotated" title="Permalink to this headline"></a></h3>
<p>All environment variables and options are enabled in this file. It is the equivalent to running the “full install” from the above section. However, all environment variables are included, and are set to the default values provided by Netmaker (if the environment variable was left unset, it would not change the installation). Comments are added to each option to show how you might use it to modify your installation.</p>
<div class="highlight-YAML notranslate"><div class="highlight"><pre><span></span><span class="nt">services</span><span class="p">:</span>
<span class="nt">rqlite</span><span class="p">:</span>
<span class="nt">container_name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">rqlite</span>
<span class="nt">image</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">rqlite/rqlite</span>
<span class="nt">network_mode</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">host</span>
<span class="nt">restart</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">always</span>
<span class="nt">volumes</span><span class="p">:</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">sqldata:/rqlite/file/data</span>
<span class="nt">netmaker</span><span class="p">:</span> <span class="c1"># The Primary Server for running Netmaker</span>
<span class="nt">privileged</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">true</span> <span class="c1"># Necessary to run sudo/root level commands on host system. Take out if not running with CLIENT_MODE=on</span>
<span class="nt">container_name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">netmaker</span>
<span class="nt">depends_on</span><span class="p">:</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">rqlite</span>
<span class="nt">image</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">gravitl/netmaker:v0.7</span>
<span class="nt">volumes</span><span class="p">:</span> <span class="c1"># Volume mounts necessary for CLIENT_MODE to control netclient, wireguard, and networking on host (except dnsconfig, which is where dns config files are stored for use by CoreDNS)</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">./:/local</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/etc/netclient:/etc/netclient</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">dnsconfig:/root/config/dnsconfig</span> <span class="c1"># Netmaker writes Corefile to this location, which gets mounted by CoreDNS for DNS configuration.</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/usr/bin/wg:/usr/bin/wg</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/run/systemd/system:/run/systemd/system</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/etc/systemd/system:/etc/systemd/system</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/sys/fs/cgroup:/sys/fs/cgroup</span>
<span class="nt">cap_add</span><span class="p">:</span> <span class="c1"># Necessary for CLIENT_MODE. Should be removed if turned off. </span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">NET_ADMIN</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">SYS_MODULE</span>
<span class="nt">restart</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">always</span>
<span class="nt">network_mode</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">host</span> <span class="c1"># Necessary for CLIENT_MODE. Should be removed if turned off, but then need to add port mappings</span>
<span class="nt">environment</span><span class="p">:</span>
<span class="nt">SERVER_HOST</span><span class="p">:</span> <span class="s">""</span> <span class="c1"># All the Docker Compose files pre-populate this with HOST_IP, which you replace as part of the install instructions. This will set both HTTP and GRPC host.</span>
<span class="nt">SERVER_HTTP_HOST</span><span class="p">:</span> <span class="s">"127.0.0.1"</span> <span class="c1"># Overrides SERVER_HOST if set. Useful for making HTTP and GRPC available via different interfaces/networks.</span>
<span class="nt">SERVER_GRPC_HOST</span><span class="p">:</span> <span class="s">"127.0.0.1"</span> <span class="c1"># Overrides SERVER_HOST if set. Useful for making HTTP and GRPC available via different interfaces/networks.</span>
<span class="nt">API_PORT</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">8081</span> <span class="c1"># The HTTP API port for Netmaker. Used for API calls / communication from front end. If changed, need to change port of BACKEND_URL for netmaker-ui.</span>
<span class="nt">GRPC_PORT</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">50051</span> <span class="c1"># The GRPC port for Netmaker. Used for communications from nodes.</span>
<span class="nt">MASTER_KEY</span><span class="p">:</span> <span class="s">"secretkey"</span> <span class="c1"># The admin master key for accessing the API. Change this in any production installation.</span>
<span class="nt">CORS_ALLOWED_ORIGIN</span><span class="p">:</span> <span class="s">"*"</span> <span class="c1"># The "allowed origin" for API requests. Change to restrict where API requests can come from.</span>
<span class="nt">REST_BACKEND</span><span class="p">:</span> <span class="s">"on"</span> <span class="c1"># Enables the REST backend (API running on API_PORT at SERVER_HTTP_HOST). Change to "off" to turn off.</span>
<span class="nt">AGENT_BACKEND</span><span class="p">:</span> <span class="s">"on"</span> <span class="c1"># Enables the AGENT backend (GRPC running on GRPC_PORT at SERVER_GRPC_HOST). Change to "off" to turn off.</span>
<span class="nt">DNS_MODE</span><span class="p">:</span> <span class="s">"on"</span> <span class="c1"># Enables DNS Mode, meaning config files will be generated for CoreDNS. Note, turning "off" does not remove CoreDNS. You still need to remove CoreDNS from compose file.</span>
<span class="nt">DISABLE_REMOTE_IP_CHECK</span><span class="p">:</span> <span class="s">"off"</span> <span class="c1"># If turned "on", Server will not set Host based on remote IP check. This is already overridden if SERVER_HOST is set. Turned "off" by default.</span>
<span class="nt">GRPC_SSL</span><span class="p">:</span> <span class="s">"off"</span> <span class="c1"># Tells clients to use SSL to connect to GRPC. Switch to on to turn on.</span>
<span class="nt">COREDNS_ADDR</span><span class="p">:</span> <span class="s">""</span> <span class="c1"># Address of the CoreDNS server. Defaults to SERVER_HOST</span>
<span class="nt">SERVER_API_CONN_STRING</span><span class="p">:</span> <span class="s">""</span> <span class="c1"># Changes the api connection string. IP:PORT format. By default is empty and uses SERVER_HOST:API_PORT</span>
<span class="nt">SERVER_GRPC_CONN_STRING</span><span class="p">:</span> <span class="s">""</span> <span class="c1"># Changes the grpc connection string. IP:PORT format. By default is empty and uses SERVER_HOST:GRPC_PORT</span>
<span class="nt">netmaker-ui</span><span class="p">:</span> <span class="c1"># The Netmaker UI Component</span>
<span class="nt">container_name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">netmaker-ui</span>
<span class="nt">depends_on</span><span class="p">:</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">netmaker</span>
<span class="nt">image</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">gravitl/netmaker-ui:v0.7</span>
<span class="nt">links</span><span class="p">:</span>
<span class="p p-Indicator">-</span> <span class="s">"netmaker:api"</span>
<span class="nt">ports</span><span class="p">:</span>
<span class="p p-Indicator">-</span> <span class="s">"8082:80"</span>
<span class="nt">environment</span><span class="p">:</span>
<span class="nt">BACKEND_URL</span><span class="p">:</span> <span class="s">"http://HOST_IP:8081"</span> <span class="c1"># URL where UI will send API requests. Change based on SERVER_HOST, SERVER_HTTP_HOST, and API_PORT</span>
<span class="nt">coredns</span><span class="p">:</span> <span class="c1"># The DNS Server. Remove this section if DNS_MODE="off"</span>
<span class="nt">depends_on</span><span class="p">:</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">netmaker</span>
<span class="nt">image</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">coredns/coredns</span>
<span class="nt">command</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">-conf /root/dnsconfig/Corefile</span> <span class="c1"># Config location for Corefile. This is the path of file which is also mounted to Netmaker for modification.</span>
<span class="nt">container_name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">coredns</span>
<span class="nt">restart</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">always</span>
<span class="nt">ports</span><span class="p">:</span>
<span class="p p-Indicator">-</span> <span class="s">"53:53/udp"</span> <span class="c1"># Likely needs to run at port 53 for adequate nameserver usage.</span>
<span class="nt">volumes</span><span class="p">:</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">dnsconfig:/root/dnsconfig</span>
<span class="nt">volumes</span><span class="p">:</span>
<span class="nt">sqldata</span><span class="p">:</span> <span class="p p-Indicator">{}</span>
<span class="nt">dnsconfig</span><span class="p">:</span> <span class="p p-Indicator">{}</span>
</pre></div>
</div>
<h2 id="dns-mode-setup">DNS Mode Setup<a class="headerlink" href="#dns-mode-setup" title="Permalink to this headline"></a></h2>
<p>If you plan on running the server in DNS Mode, know that a <a class="reference external" href="https://coredns.io/manual/toc/">CoreDNS Server</a> will be installed. CoreDNS is a light-weight, fast, and easy-to-configure DNS server. It is recommended to bind CoreDNS to port 53 of the host system, and it will do so by default. The clients will expect the nameserver to be on port 53, and many systems have issues resolving a different port.</p>
<p>However, on your host system (for Netmaker), this may conflict with an existing process. On linux systems running systemd-resolved, there is likely a service consuming port 53. The below steps will disable systemd-resolved, and replace it with a generic (e.g. Google) nameserver. Be warned that this may have consequences for any existing private DNS configuration. The following was tested on Ubuntu 20.04 and should be run prior to deploying the docker containers.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">systemctl</span> <span class="n">stop</span> <span class="n">systemd</span><span class="o">-</span><span class="n">resolved</span>
<span class="n">systemctl</span> <span class="n">disable</span> <span class="n">systemd</span><span class="o">-</span><span class="n">resolved</span>
<span class="n">vim</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">systemd</span><span class="o">/</span><span class="n">resolved</span><span class="o">.</span><span class="n">conf</span>
<span class="o">*</span> <span class="n">uncomment</span> <span class="n">DNS</span> <span class="ow">and</span> <span class="n">add</span> <span class="mf">8.8.8.8</span> <span class="ow">or</span> <span class="n">whatever</span> <span class="n">reachable</span> <span class="n">nameserver</span> <span class="ow">is</span> <span class="n">your</span> <span class="n">preference</span> <span class="o">*</span>
<span class="o">*</span> <span class="n">uncomment</span> <span class="n">DNSStubListener</span> <span class="ow">and</span> <span class="nb">set</span> <span class="n">to</span> <span class="s2">"no"</span> <span class="o">*</span>
<span class="n">ln</span> <span class="o">-</span><span class="n">sf</span> <span class="o">/</span><span class="n">run</span><span class="o">/</span><span class="n">systemd</span><span class="o">/</span><span class="n">resolve</span><span class="o">/</span><span class="n">resolv</span><span class="o">.</span><span class="n">conf</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">resolv</span><span class="o">.</span><span class="n">conf</span>
</pre></div>
</div>
<p>Port 53 should now be available for CoreDNS to use.</p>
<h2 id="docker-compose-install">Docker Compose Install<a class="headerlink" href="#docker-compose-install" title="Permalink to this headline"></a></h2>
<p>The most simple (and recommended) way of installing Netmaker is to use one of the provided <a class="reference external" href="https://github.com/gravitl/netmaker/tree/master/compose">Docker Compose files</a>. Below are instructions for several different options to install Netmaker via Docker Compose, followed by an annotated reference Docker Compose in case your use case requires additional customization.</p>
<h3 id="test-install-no-dns-no-secure-grpc">Test Install - No DNS, No Secure GRPC<a class="headerlink" href="#test-install-no-dns-no-secure-grpc" title="Permalink to this headline"></a></h3>
<p>This install will run Netmaker on a server without HTTPS using an IP address. This is not secure and not recommended, but can be helpful for testing.</p>
<p>It also does not run the CoreDNS server, to simplify the deployment</p>
<dl class="simple">
<dt><strong>Prerequisites:</strong></dt><dd><ul class="simple">
<li><p>server ports 80, 8081, and 50051 are not blocked by firewall</p></li>
</ul>
</dd>
<dt><strong>Notes:</strong></dt><dd><ul class="simple">
<li><p>You can change the port mappings in the Docker Compose if the listed ports are already in use.</p></li>
</ul>
</dd>
</dl>
<p>Assuming you have Docker and Docker Compose installed, you can just run the following, replacing <strong>&lt; Insert your-host IP Address Here &gt;</strong> with your host IP (or domain):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>wget -O docker-compose.yml https://raw.githubusercontent.com/gravitl/netmaker/master/scripts/docker-compose.test.yml
sed -i s/HOST_IP/&lt; Insert your-host IP Address Here &gt;/g docker-compose.yml
docker-compose up -d`
</pre></div>
</div>
<h3 id="no-dns-coredns-disabled">No DNS - CoreDNS Disabled<a class="headerlink" href="#no-dns-coredns-disabled" title="Permalink to this headline"></a></h3>
<p>DNS Mode is currently limited to clients that can run resolvectl (systemd-resolved, see <a class="reference internal" href="architecture.html"><span class="doc">Architecture docs</span></a> for more info). You may wish to disable DNS mode for various reasons. This installation option gives you the full feature set minus CoreDNS.</p>
<p>To run without DNS, follow the <a class="reference internal" href="quick-start.html"><span class="doc">Quick Install</span></a> guide, omitting the steps for DNS setup. In addition, when the guide has you pull (wget) the Netmaker docker-compose template, use the following link instead:</p>
<ol class="arabic simple">
<li><p><code class="docutils literal notranslate"><span class="pre">wget</span> <span class="pre">-O</span> <span class="pre">docker-compose.yml</span> <span class="pre">https://raw.githubusercontent.com/gravitl/netmaker/master/scripts/docker-compose.nodns.yml</span></code></p></li>
</ol>
<p>This template is equivalent but omits CoreDNS.</p>
<h2 id="linux-install-without-docker">Linux Install without Docker<a class="headerlink" href="#linux-install-without-docker" title="Permalink to this headline"></a></h2>
<p>Most systems support Docker, but some do not. In such environments, there are many options for installing Netmaker. Netmaker is available as a binary file, and there is a zip file of the Netmaker UI static HTML on GitHub. Beyond the UI and Server, you need to install MongoDB and CoreDNS (optional).</p>
<p>To start, we recommend following the Nginx instructions in the <a class="reference internal" href="quick-start.html"><span class="doc">Quick Install</span></a> guide to enable SSL for your environment.</p>
<p>Once this is enabled and configured for a domain, you can continue with the below. The recommended server runs Ubuntu 20.04.</p>
<h3 id="rqlite-setup">rqlite Setup<a class="headerlink" href="#rqlite-setup" title="Permalink to this headline"></a></h3>
<ol class="arabic simple">
<li><p>Install rqlite on your server: <a class="reference external" href="https://github.com/rqlite/rqlite">https://github.com/rqlite/rqlite</a></p></li>
<li><p>Run rqlite: rqlited -node-id 1 ~/node.1</p></li>
</ol>
<h3 id="server-setup">Server Setup<a class="headerlink" href="#server-setup" title="Permalink to this headline"></a></h3>
<ol class="arabic simple">
<li><p><strong>Run the install script:</strong></p></li>
</ol>
<p><code class="docutils literal notranslate"><span class="pre">sudo</span> <span class="pre">curl</span> <span class="pre">-sfL</span> <span class="pre">https://raw.githubusercontent.com/gravitl/netmaker/develop/scripts/netmaker-server.sh</span> <span class="pre">|</span> <span class="pre">sh</span> <span class="pre">-</span></code></p>
<ol class="arabic simple" start="2">
<li><p>Check status: <code class="docutils literal notranslate"><span class="pre">sudo</span> <span class="pre">journalctl</span> <span class="pre">-u</span> <span class="pre">netmaker</span></code></p></li>
<li><p>If any settings are incorrect such as host or mongo credentials, change them under /etc/netmaker/config/environments/&lt; your env &gt;.yaml and then run <code class="docutils literal notranslate"><span class="pre">sudo</span> <span class="pre">systemctl</span> <span class="pre">restart</span> <span class="pre">netmaker</span></code></p></li>
</ol>
<h3 id="ui-setup">UI Setup<a class="headerlink" href="#ui-setup" title="Permalink to this headline"></a></h3>
<p>The following uses Nginx as an http server. You may alternatively use Apache or any other web server that serves static web files.</p>
<ol class="arabic simple">
<li><p>Download and Unzip UI asset files</p></li>
<li><p>Copy Config to Nginx</p></li>
<li><p>Modify Default Config Path</p></li>
<li><p>Change Backend URL</p></li>
<li><p>Start Nginx</p></li>
</ol>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">wget</span> <span class="o">-</span><span class="n">O</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">share</span><span class="o">/</span><span class="n">nginx</span><span class="o">/</span><span class="n">html</span><span class="o">/</span><span class="n">netmaker</span><span class="o">-</span><span class="n">ui</span><span class="o">.</span><span class="n">zip</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">gravitl</span><span class="o">/</span><span class="n">netmaker</span><span class="o">-</span><span class="n">ui</span><span class="o">/</span><span class="n">releases</span><span class="o">/</span><span class="n">download</span><span class="o">/</span><span class="n">latest</span><span class="o">/</span><span class="n">netmaker</span><span class="o">-</span><span class="n">ui</span><span class="o">.</span><span class="n">zip</span>
<span class="n">sudo</span> <span class="n">unzip</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">share</span><span class="o">/</span><span class="n">nginx</span><span class="o">/</span><span class="n">html</span><span class="o">/</span><span class="n">netmaker</span><span class="o">-</span><span class="n">ui</span><span class="o">.</span><span class="n">zip</span> <span class="o">-</span><span class="n">d</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">share</span><span class="o">/</span><span class="n">nginx</span><span class="o">/</span><span class="n">html</span>
<span class="n">sudo</span> <span class="n">cp</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">share</span><span class="o">/</span><span class="n">nginx</span><span class="o">/</span><span class="n">html</span><span class="o">/</span><span class="n">nginx</span><span class="o">.</span><span class="n">conf</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">nginx</span><span class="o">/</span><span class="n">conf</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">default</span><span class="o">.</span><span class="n">conf</span>
<span class="n">sudo</span> <span class="n">sed</span> <span class="o">-</span><span class="n">i</span> <span class="s1">'s/root \/var\/www\/html/root \/usr\/share\/nginx\/html/g'</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">nginx</span><span class="o">/</span><span class="n">sites</span><span class="o">-</span><span class="n">available</span><span class="o">/</span><span class="n">default</span>
<span class="n">sudo</span> <span class="n">sh</span> <span class="o">-</span><span class="n">c</span> <span class="s1">'BACKEND_URL=http://&lt;YOUR BACKEND API URL&gt;:PORT /usr/share/nginx/html/generate_config_js.sh &gt;/usr/share/nginx/html/config.js'</span>
<span class="n">sudo</span> <span class="n">systemctl</span> <span class="n">start</span> <span class="n">nginx</span>
</pre></div>
</div>
<h3 id="coredns-setup">CoreDNS Setup<a class="headerlink" href="#coredns-setup" title="Permalink to this headline"></a></h3>
<h2 id="kubernetes-install">Kubernetes Install<a class="headerlink" href="#kubernetes-install" title="Permalink to this headline"></a></h2>
<h3 id="server-install">Server Install<a class="headerlink" href="#server-install" title="Permalink to this headline"></a></h3>
<p>This template assumes your cluster uses Nginx for ingress with valid wildcard certificates. If using an ingress controller other than Nginx (ex: Traefik), you will need to manually modify the Ingress entries in this template to match your environment.</p>
<p>This template also requires RWX storage. Please change references to storageClassName in this template to your clusters Storage Class.</p>
<p><code class="docutils literal notranslate"><span class="pre">wget</span> <span class="pre">https://raw.githubusercontent.com/gravitl/netmaker/develop/kube/netmaker-template.yaml</span></code></p>
<p>Replace the NETMAKER_BASE_DOMAIN references to the base domain you would like for your Netmaker services (ui,api,grpc). Typically this will be something like <strong>netmaker.yourwildcard.com</strong>.</p>
<p><code class="docutils literal notranslate"><span class="pre">sed</span> <span class="pre">-i</span> <span class="pre">s/NETMAKER_BASE_DOMAIN/&lt;your</span> <span class="pre">base</span> <span class="pre">domain&gt;/g</span> <span class="pre">netmaker-template.yaml</span></code></p>
<p>Now, assuming Ingress and Storage match correctly with your cluster configuration, you can install Netmaker.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">kubectl</span> <span class="n">create</span> <span class="n">ns</span> <span class="n">nm</span>
<span class="n">kubectl</span> <span class="n">config</span> <span class="nb">set</span><span class="o">-</span><span class="n">context</span> <span class="o">--</span><span class="n">current</span> <span class="o">--</span><span class="n">namespace</span><span class="o">=</span><span class="n">nm</span>
<span class="n">kubectl</span> <span class="n">apply</span> <span class="o">-</span><span class="n">f</span> <span class="n">netmaker</span><span class="o">-</span><span class="n">template</span><span class="o">.</span><span class="n">yaml</span> <span class="o">-</span><span class="n">n</span> <span class="n">nm</span>
</pre></div>
</div>
<p>In about 3 minutes, everything should be up and running:</p>
<p><code class="docutils literal notranslate"><span class="pre">kubectl</span> <span class="pre">get</span> <span class="pre">ingress</span> <span class="pre">nm-ui-ingress-nginx</span></code></p>
<h3 id="netclient-daemonset">Netclient Daemonset<a class="headerlink" href="#netclient-daemonset" title="Permalink to this headline"></a></h3>
<p>The following instructions assume you have Netmaker running and a network you would like to add your cluster into. The Netmaker server does not need to be running inside of a cluster for this.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>wget https://raw.githubusercontent.com/gravitl/netmaker/develop/kube/netclient-template.yaml
sed -i s/ACCESS_TOKEN_VALUE/&lt; your access token value&gt;/g netclient-template.yaml
kubectl apply -f netclient-template.yaml
</pre></div>
</div>
<p>For a more detailed guide on integrating Netmaker with MicroK8s, <a class="reference external" href="https://itnext.io/how-to-deploy-a-cross-cloud-kubernetes-cluster-with-built-in-disaster-recovery-bbce27fcc9d7">check out this guide</a>.</p>
<h2 id="nginx-reverse-proxy-setup-with-https">Nginx Reverse Proxy Setup with https<a class="headerlink" href="#nginx-reverse-proxy-setup-with-https" title="Permalink to this headline"></a></h2>
<p>The <a class="reference external" href="https://github.com/linuxserver/docker-swag">Swag Proxy</a> makes it easy to generate a valid ssl certificate for the config bellow. Here is the <a class="reference external" href="https://docs.linuxserver.io/general/swag">documentation</a> for the installation.</p>
<p>The following file configures Netmaker as a subdomain. This config is an adaption from the swag proxy project.</p>
<p>./netmaker.subdomain.conf:</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">server</span> <span class="p">{</span>
<span class="kn">listen</span> <span class="mi">443</span> <span class="s">ssl</span><span class="p">;</span>
<span class="kn">listen</span> <span class="s">[::]:443</span> <span class="s">ssl</span><span class="p">;</span>
<span class="kn">server_name</span> <span class="s">netmaker.*</span><span class="p">;</span> <span class="c1"># The external URL</span>
<span class="kn">client_max_body_size</span> <span class="mi">0</span><span class="p">;</span>
<span class="c1"># A valid https certificate is needed.</span>
<span class="kn">include</span> <span class="s">/config/nginx/ssl.conf</span><span class="p">;</span>
<span class="kn">location</span> <span class="s">/</span> <span class="p">{</span>
<span class="c1"># This config file can be found at:</span>
<span class="c1"># https://github.com/linuxserver/docker-swag/blob/master/root/defaults/proxy.conf</span>
<span class="kn">include</span> <span class="s">/config/nginx/proxy.conf</span><span class="p">;</span>
<span class="c1"># if you use a custom resolver to find your app, needed with swag proxy</span>
<span class="c1"># resolver 127.0.0.11 valid=30s;</span>
<span class="kn">set</span> <span class="nv">$upstream_app</span> <span class="s">netmaker-ui</span><span class="p">;</span> <span class="c1"># The internal URL</span>
<span class="kn">set</span> <span class="nv">$upstream_port</span> <span class="mi">80</span><span class="p">;</span> <span class="c1"># The internal Port</span>
<span class="kn">set</span> <span class="nv">$upstream_proto</span> <span class="s">http</span><span class="p">;</span> <span class="c1"># the protocol that is being used</span>
<span class="kn">proxy_pass</span> <span class="nv">$upstream_proto://$upstream_app:$upstream_port</span><span class="p">;</span> <span class="c1"># combine the set variables from above</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="k">server</span> <span class="p">{</span>
<span class="kn">listen</span> <span class="mi">443</span> <span class="s">ssl</span><span class="p">;</span>
<span class="kn">listen</span> <span class="s">[::]:443</span> <span class="s">ssl</span><span class="p">;</span>
<span class="kn">server_name</span> <span class="s">backend-netmaker.*</span><span class="p">;</span> <span class="c1"># The external URL</span>
<span class="kn">client_max_body_size</span> <span class="mi">0</span><span class="p">;</span>
<span class="kn">underscores_in_headers</span> <span class="no">on</span><span class="p">;</span>
<span class="c1"># A valid https certificate is needed.</span>
<span class="kn">include</span> <span class="s">/config/nginx/ssl.conf</span><span class="p">;</span>
<span class="kn">location</span> <span class="s">/</span> <span class="p">{</span>
<span class="c1"># if you use a custom resolver to find your app, needed with swag proxy</span>
<span class="c1"># resolver 127.0.0.11 valid=30s;</span>
<span class="kn">set</span> <span class="nv">$upstream_app</span> <span class="s">netmaker</span><span class="p">;</span> <span class="c1"># The internal URL</span>
<span class="kn">set</span> <span class="nv">$upstream_port</span> <span class="mi">8081</span><span class="p">;</span> <span class="c1"># The internal Port</span>
<span class="kn">set</span> <span class="nv">$upstream_proto</span> <span class="s">http</span><span class="p">;</span> <span class="c1"># the protocol that is being used</span>
<span class="kn">proxy_pass</span> <span class="nv">$upstream_proto://$upstream_app:$upstream_port</span><span class="p">;</span> <span class="c1"># combine the set variables from above</span>
<span class="c1"># Forces the header to be the one that is visible from the outside</span>
<span class="kn">proxy_set_header</span> <span class="s">Host</span> <span class="s">backend.netmaker.example.org</span><span class="p">;</span> <span class="c1"># Please cange to your URL</span>
<span class="c1"># Pass all headers through to the backend</span>
<span class="kn">proxy_pass_request_headers</span> <span class="no">on</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
</article>
</div>
</div>
</main>
</div>
<footer class="md-footer">
<div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid">
<a href="getting-started.html" title="Getting Started"
class="md-flex md-footer-nav__link md-footer-nav__link--prev"
rel="prev">
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
</div>
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span
class="md-footer-nav__direction"> Previous </span> Getting Started </span>
</div>
</a>
<a href="client-installation.html" title="Client Installation"
class="md-flex md-footer-nav__link md-footer-nav__link--next"
rel="next">
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title"><span
class="md-flex__ellipsis"> <span
class="md-footer-nav__direction"> Next </span> Client Installation </span>
</div>
<div class="md-flex__cell md-flex__cell--shrink"><i
class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
</div>
</a>
</nav>
</div>
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
<div class="md-footer-copyright__highlight">
&#169; Copyright 2021, Alex Feiszli.
</div>
Created using
<a href="http://www.sphinx-doc.org/">Sphinx</a> 3.5.4.
and
<a href="https://github.com/bashtage/sphinx-material/">Material for
Sphinx</a>
</div>
</div>
</div>
</footer>
<script src="_static/javascripts/application.js"></script>
<script>app.initialize({version: "1.0.4", url: {base: ".."}})</script>
</body>
</html>