Compare commits
55
Commits
f7df74c574
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b54495a341 | ||
|
|
6691aaa02a | ||
|
|
3c0a527b43 | ||
|
|
b6ffef5a8f | ||
|
|
0f9b039e11 | ||
|
|
12242579a0 | ||
|
|
2d1865f0e0 | ||
|
|
7c89513b5b | ||
|
|
62d4fe4ec2 | ||
|
|
c90cd781d3 | ||
|
|
a59966006b | ||
|
|
1a1e4418bb | ||
|
|
154cd0c66b | ||
|
|
66f7b78efd | ||
|
|
28c26dc488 | ||
|
|
18abf487a7 | ||
|
|
064d8f1576 | ||
|
|
db30198450 | ||
|
|
de3498fa65 | ||
|
|
f49f1409b9 | ||
|
|
9c4b8a756e | ||
|
|
aa43d51c42 | ||
|
|
6ee8277205 | ||
|
|
14d910b267 | ||
|
|
1f68655314 | ||
|
|
0450a78478 | ||
|
|
991b0c356e | ||
|
|
be4b79026b | ||
|
|
2fa42ad3aa | ||
|
|
67d593cb73 | ||
|
|
eff68287f2 | ||
|
|
a4c386e438 | ||
|
|
328aa31600 | ||
|
|
fbc33a5ff4 | ||
|
|
a470377d4f | ||
|
|
6447916039 | ||
|
|
1ee2f3a8ac | ||
|
|
d1f3f4ff88 | ||
|
|
81c54c9afc | ||
|
|
5548287c65 | ||
|
|
485c5d5578 | ||
|
|
9af6ba21b9 | ||
|
|
2b67ba4461 | ||
|
|
f9d95448db | ||
|
|
6a27518be1 | ||
|
|
3c85fec634 | ||
|
|
1860f90785 | ||
|
|
28fe0b7e04 | ||
|
|
802244762e | ||
|
|
521487ab10 | ||
|
|
00ee256107 | ||
|
|
9efa1552ee | ||
|
|
b0b9a0d815 | ||
|
|
77f72ec8af | ||
|
|
688a36e6d5 |
@@ -0,0 +1,27 @@
|
||||
name: Trigger container build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'content/**'
|
||||
- 'app/**'
|
||||
- 'public/**'
|
||||
- 'server/**'
|
||||
- 'nuxt.config.ts'
|
||||
- 'content.config.ts'
|
||||
- 'tsconfig.json'
|
||||
- 'package.json'
|
||||
- 'package-lock.json'
|
||||
|
||||
jobs:
|
||||
trigger:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Dispatch docudjeex-build
|
||||
run: |
|
||||
curl -sf -X POST \
|
||||
-H "Authorization: token ${{ secrets.BUILD_REPO_TOKEN }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"ref\":\"main\",\"inputs\":{\"source_sha\":\"${{ github.sha }}\"}}" \
|
||||
"https://git.djeex.fr/api/v1/repos/Djeex/docudjeex-build/actions/workflows/build.yml/dispatches"
|
||||
@@ -42,3 +42,4 @@ __pycache__
|
||||
|
||||
# Scratch/demo files (not part of the site)
|
||||
scratch
|
||||
.screenshot
|
||||
|
||||
+7
-3
@@ -10,18 +10,22 @@ This project starts from the `docus` i18n starter template (`extends: ['docus']`
|
||||
## `nuxt.config.ts`
|
||||
|
||||
- **Git-based page contributors.** `getContributors()` runs `git log --format=%an --follow -- <file>` for each markdown file and dedupes the author list, injected into the page's content via the `content:file:afterParse` hook. This was chosen over the Gitea/GitHub API because it needs no access token, no network call, and no rate limiting — the info is already in the checkout. The trade-off: CI must do a **full** (non-shallow) `git checkout`, otherwise `git log` only sees one commit per file and every page shows just its most recent author instead of everyone who ever touched it.
|
||||
- **`@nuxt/image` dev/prod path branch.** `@nuxt/image` resolves where to read local files from differently depending on context: in `nuxi dev` it needs an absolute filesystem path to `public/`, but in a production build it needs the plain relative string `'public/'` — passing the absolute path there breaks the `Content-Type` header on the built `/_ipx` image-proxy route specifically for SVGs (they'd get served with the wrong MIME type). The `isDev` check branches on the actual `nuxi` subcommand so both environments get the value they each require.
|
||||
- **`@nuxt/image` dir is always an absolute path.** An earlier revision branched this on `nuxi dev` vs a production build, passing the plain relative string `'public/'` in production on the theory that an absolute path there broke the `/_ipx` route's SVG `Content-Type`. In production that relative path doesn't reliably resolve to the project root at the moment the prerender crawler actually requests an `/_ipx/*` URL. The real-world result was every single image on the site 404ing (`IPX_FILE_NOT_FOUND`) in a from-scratch production build, not a content-type quirk on some of them. Always resolving the absolute path (`fileURLToPath(new URL('./public', import.meta.url))`) fixed it in both modes; since the whole site is prerendered to static files anyway, each image's correct extension is what actually decides its serving content-type, not this setting.
|
||||
- **`icon.serverBundle.collections`.** Every icon collection referenced dynamically (built from a variable/string at runtime rather than written as a literal `i-xxx` somewhere) has to be listed here explicitly, or Nuxt Icon's static usage scanner never finds it and falls back to a live `api.iconify.design` request at prerender time, which times out (`[Icon] loading icon X timed out`) wherever outbound network access is restricted, exactly as it was on the actual deployment host. Two places build icon names this way: `app/app.config.ts`'s `ui.prose.codeIcon` map (`simple-icons`, `lucide`) and `app/components/content/FileTreeNode.vue`'s per-extension file-type icons (`vscode-icons`). Add any new collection here the moment a new dynamic icon source is introduced. Check it's actually installed first with `ls node_modules/@iconify-json/`.
|
||||
- **`components:` array: keep `'~/components'` as the first entry.** Passing a `components` array to Nuxt *replaces* its default `~/components` auto-scan instead of adding to it. Every local override in `app/components/` (`AppHeaderCenter`, `DocsAsideLeftTop`, etc., all documented below) was silently shadowed by the docus layer's originals the moment a custom array was added without also re-listing the default scan. The override files were still there, just never picked up. The second entry, `{ path: '~/components/prose', pathPrefix: false, global: true }`, exists because `ProseNote`/`ProseTip`/`ProseWarning`/`ProseCaution` are *only* ever resolved dynamically by name from Nuxt Content's MDC tag map (`note` → `ProseNote`, etc.), and nothing statically writes `<ProseNote>` in a template, so Vite's production build tree-shook all four out of both the client and server bundles entirely, and every admonition on the live site rendered as a raw, unstyled `<ProseNote icon to="...">` tag instead of the actual callout. `nuxt dev` never surfaces either of these: it doesn't tree-shake, and it resolves components on demand regardless of the scan config.
|
||||
- **Custom icon collection.** `icon.customCollections` registers a `brand` prefix pointing at `app/assets/brand-icons/`, so logos for the user's other projects (Instameex, Lumeex) can be referenced from content as `i-brand-instameex` etc., exactly like any Iconify icon — without needing to publish them to an actual Iconify icon set first.
|
||||
- **Markdown highlight.** Forces the `github-dark` Shiki theme for *both* the light and dark slots, because the site never actually offers a light mode (see `docus.colorMode: 'dark'` below) — maintaining two highlight themes for a mode nobody sees would just be dead config. The extra languages (`nginx, properties, php, toml, console, sh, yaml`) were added because the tutorial content includes config-file snippets and terminal output in all of these syntaxes, and none of them are in Shiki's minimal default bundle for Nuxt Content.
|
||||
- **`darkreader-lock` meta tag.** The Dark Reader browser extension rewrites elements' inline `style` attributes on the client, after Nuxt has already server-rendered them — so any component using an inline `style` (like the cyan "·" separator spans) ends up with mismatched HTML between server and client, and Vue logs a hydration-mismatch warning on every page load for any visitor running that extension. This meta tag is Dark Reader's own opt-out signal, telling the extension to leave the page alone instead of trying to work around the mismatch after the fact.
|
||||
- **301 redirects (`routeRules`).** The old site served French content at root-level URLs (e.g. `/generalites/reseau/nat`, no locale prefix, on a separate `french` git branch). Restructuring into a single repo with `@nuxtjs/i18n`'s `/fr/...` prefix changed every French URL, which would otherwise break external links, bookmarks, and search-engine rankings for those pages built up over time. All 44 mappings use `statusCode: 301` explicitly — Nitro's default redirect status is 307 (temporary), which search engines don't treat as "please re-index this at the new URL" the way a 301 (permanent) does. There's deliberately **no** `/` → `/fr` redirect: root already serves English by default, and `@nuxtjs/i18n`'s `detectBrowserLanguage` already handles sending French-browser visitors to `/fr` automatically — a static redirect rule would just fight with that.
|
||||
- **301 redirects (`routeRules`).** The old site (pre-rewrite, on the separate `docudjeex` repo's `main`/`french` branches) served English at the site root with no locale prefix (`/serveex/introduction/`) and French under `/fr/` with French-language slugs (`/fr/serveex/coeur/installation/`). This rewrite moved every URL under an explicit `/en/`/`/fr/` prefix with English-based slugs on both, which would otherwise break every external link, bookmark, and search-engine ranking built up on the old URLs. All 72 mappings use `statusCode: 301` explicitly, since Nitro's default redirect status is 307 (temporary), which search engines don't treat as "please re-index this at the new URL" the way a 301 (permanent) does. French pages whose old slug already matches the new one (`dozzle`, `immich`, and similar words that are spelled the same in both languages) are deliberately absent, since a rule there would redirect the page to itself. See the warning callout above this section: none of these 72 rules produce a real 301 on the actual production host, only a `location =` block in that host's nginx config does.
|
||||
- **`site.trailingSlash: true`.** The site builds as a static export (`nuxt build`, deployed as static files on a web server) and the production host 301-redirects a bare `path` request to `path/` (verified against `docu.djeex.fr`), so canonical/og:url/sitemap URLs need to already carry the trailing slash — otherwise the canonical tag points at the very URL the server redirects away from, a loop that keeps the page out of search results. This is documented, official behavior for the wider Nuxt SEO ecosystem (`nuxtseo.com`'s "Trailing Slashes" guide), but Docus doesn't depend on `nuxt-seo-utils` for its canonical/og:url logic — it hand-rolls its own in `useSeo.ts` via a plain `joinURL(site.url, route.path)` that never checks this setting. That gap is why the items below exist alongside it.
|
||||
- **`nitro.prerender.autoSubfolderIndex: true`.** Docus sets this to `false` in its own `nuxt.config.ts`, which writes every route as `path.html` instead of `path/index.html` — the exact opposite of what the trailing-slash setup above needs, since the host would then redirect `/path` to `/path/` and find no directory there. Restoring the Nitro default puts the files back where the advertised URLs actually point.
|
||||
- **`nitro.prerender.routes: ['/', '/robots.txt']`.** Docus's `nitro:config` hook seeds one prerender route per locale (`/en`, `/fr`) and `/sitemap.xml`, but never `/` or `/robots.txt` — both exist as server routes yet were never written to the static output, so both 404 on a static host. `/` loses i18n's redirect to the default locale, and robots.txt loses the `Sitemap:` line that points crawlers at the sitemap (the live site has this gap today: requesting `/robots.txt` returns the site's HTML). Prerendering them is all that's needed. (Deliberately not a `routeRules` redirect for `/`: a hard redirect there would override i18n's `detectBrowserLanguage`, which is what sends French-browser visitors to `/fr`.)
|
||||
- **`nitro.prerender.routes: ['/', '/robots.txt']`.** Docus's `nitro:config` hook seeds one prerender route per locale (`/en`, `/fr`) and `/sitemap.xml`, but never `/robots.txt`. It exists as a server route yet was never written to the static output, so it 404s on a static host and loses the `Sitemap:` line that points crawlers at the sitemap. `/` is listed too, though it turns out this doesn't actually matter: Nitro's crawler always visits `/` on its own regardless (it's the crawl's entry point), confirmed by removing it from this array and finding it prerendered anyway. `@nuxtjs/i18n`'s `detectBrowserLanguage` never actually runs on this static host: `/` is baked as a static `<meta http-equiv="refresh">` stub whose target is a fixed string decided once at build time (`defaultLocale: 'en'`), not read per visitor, and Nitro bakes *any* route carrying a `redirect` routeRule the same way, with no real HTTP status. The real 301 for `/` lives in the production host's nginx config instead, see the warning callout above.
|
||||
- **`experimental.defaults.nuxtLink.trailingSlash: 'append'`.** The native Nuxt-core (not `@nuxtjs/i18n`'s own, separate `trailingSlash` option — that one only affects `switchLocalePath()` and double-appends the slash on hreflang alternate links) way to make every `<NuxtLink>` href, including the ones i18n's `switchLocalePath` builds for hreflang tags, resolve with a trailing slash already, matching both `site.trailingSlash` and the directory-style files on disk.
|
||||
|
||||
> **Do not add a global trailing-slash redirect middleware here.** An earlier revision had `app/middleware/trailing-slash.global.ts` 301-redirecting bare paths to their slash form. It broke the production build outright: Nitro's prerender crawler seeds on `/en` and `/fr`, the middleware turned both into redirect responses, and since Nitro extracts no links from a redirect the crawl stopped immediately — 31 routes and 22 HTML files instead of 557 and 146, with every content page missing. The host already performs that redirect server-side, so the middleware bought nothing.
|
||||
|
||||
> **A `routeRules` redirect can't produce a real HTTP redirect on this deployment.** The production host serves this site as plain static files (nginx `root` + `try_files`, no `proxy_pass` to a running Nuxt/Nitro process at all). Any route with a `redirect` rule still gets crawled and prerendered like any other page, but since a static file can't carry a custom HTTP status, Nitro bakes it as a client-side `<meta http-equiv="refresh">` stub instead. That's invisible to anything that doesn't execute the page (search-engine link-equity, most link-preview tools, `curl`). This was tried for `/` (redirecting to `/en/`) and reverted after confirming the real 301 only appears when running `node .output/server/index.mjs` directly, never through the actual production nginx config. The 72 legacy-URL redirects in `routeRules` below have the exact same limitation: they were made real 301s by adding matching `location = /path { return 301 ...; }` blocks directly in the site's nginx config, outside this repo entirely, not by anything in `nuxt.config.ts`. If this project ever moves to a host that runs the Nitro server itself instead of serving `.output/public` as static files, all of this becomes unnecessary and `routeRules` redirects will work as real 301s on their own.
|
||||
|
||||
## `server/routes/sitemap.xml.ts`
|
||||
|
||||
Overrides Docus's own `sitemap.xml` route (`node_modules/docus/server/routes/sitemap.xml.ts`), for two reasons:
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
# Functional changelog: site redesign (September 2026)
|
||||
|
||||
This document lists every change a visitor would actually notice between the old version of docu.djeex.fr and the new one. It does not cover technical implementation details, only what changed in the content and in using the site.
|
||||
|
||||
## New articles
|
||||
|
||||
- **"Linux tips for dummies" section** (under General): three new beginner-friendly articles on the Linux terminal.
|
||||
- *CLI basics*: how a Linux command is built, with worked examples, plus a cheat-sheet table explaining where each common command's name comes from (`cd` for *change directory*, `ls` for *list*, and so on).
|
||||
- *Filesystem*: Debian's folder and partition layout, and good practices around it.
|
||||
- *Handy tools*: installing and using `btop`, `duf`, `ncdu`, `tldr`, `lazydocker`, and `ufw` (firewall).
|
||||
- **Jellyfin**: new media server article, now the default recommendation in place of Plex (Plex is still documented, see below).
|
||||
- **TinyAuth**: new article on this lightweight forward-auth proxy, for putting a login page in front of an app.
|
||||
- **Pocket ID**: new article on this self-hosted OIDC provider, letting you log in with a passkey instead of a password.
|
||||
- **File Browser Quantum**: new article on this modernized fork of File Browser, replacing the original as the recommended choice (see below).
|
||||
- **Forgejo**: new article on this self-hosted Git platform, now the default recommendation in place of Gitea (Gitea is still documented, see below).
|
||||
- **Arcane**: new article on this more advanced Docker management UI than Dockge, with support for multiple remote hosts and OIDC login.
|
||||
- **"Confirm before deleting" tip**: new article documenting a Bash function that asks for confirmation before any `sudo`-run `rm`, to help avoid accidental deletions.
|
||||
- **Section summary pages**: the General, Nonsense, and Recycled sections each now have a landing page listing their contents.
|
||||
|
||||
## Replaced or archived articles
|
||||
|
||||
Some apps are no longer the top recommendation, but their article stays available for anyone already using them or who prefers that alternative:
|
||||
|
||||
- **Plex** has been replaced by **Jellyfin** as the recommended choice. The Plex article is kept under a new "Alternatives" section, along with its related qBittorrent and Servarr variants.
|
||||
- **Gitea** has been replaced by **Forgejo** as the recommended choice, following Gitea's governance change to a for-profit company. The Gitea article remains available under "Alternatives."
|
||||
- **File Browser** has been replaced by **File Browser Quantum**. Unlike the two cases above, this one comes with an active warning rather than just being an alternative: the original project accumulated several serious security vulnerabilities (including one allowing full admin account takeover) and was officially abandoned by its maintainers in September 2026. The article is now marked deprecated with an explicit warning not to install it.
|
||||
- **Overseerr** has been replaced by its successor **Seerr** in the automation (Servarr) article, following the merger of the Overseerr and Jellyseerr projects.
|
||||
|
||||
## Navigation reorganization
|
||||
|
||||
- **WireGuard** moved from the "Security" section to "Core": it's now treated as a basic infrastructure building block rather than an optional security tool.
|
||||
- **Authentik** moved to a new **"Advanced"** section, alongside Arcane, for more complex setups aimed at users already comfortable with self-hosting.
|
||||
- The "Security" section now only contains Cloudflare, TinyAuth, and Pocket ID.
|
||||
- Deprecated or replaced articles (Plex, the old File Browser, Gitea, the old WireGuard setup) are now grouped under a new **"Recycled"** section, itself split into "Deprecated" (to avoid) and "Alternatives" (valid choices, just not the default recommendation).
|
||||
|
||||
## Content rewritten or substantially expanded
|
||||
|
||||
- **Debian installation**: heavily expanded article.
|
||||
- Explains how to enable Wake-on-LAN and automatic restart after a power outage, directly in the BIOS.
|
||||
- SSH connection instructions now split by operating system (macOS, Windows, Linux), with the exact commands for each.
|
||||
- A note on temporarily re-enabling SSH password login when connecting a new machine to the server.
|
||||
- A brand new section on waking the server up remotely (Wake-on-LAN from outside the local network), with a concrete port-forwarding example.
|
||||
- A new section on keeping the system up to date, laid out step by step, plus a one-line command tip for fully automatic updates.
|
||||
- A clear prerequisite added at the top: being comfortable with basic terminal commands, linking to the new "CLI basics" article.
|
||||
- **Docker**: the introduction has been fully rewritten to explain what a container actually is and why this approach helps, instead of jumping straight into installation. The list of compatible apps is now presented as a set of examples (not exhaustive), each one linked.
|
||||
- **Single sign-on**: several existing articles (Immich, Nextcloud, Forgejo, Pingvin, Vaultwarden) gained a new section explaining how to log in directly with Pocket ID, alongside the already-documented TinyAuth method.
|
||||
- **TinyAuth protection**: added as a new section to many articles that didn't have it yet (monitoring, media, files, development), for putting these apps behind a login page.
|
||||
|
||||
## User experience (UX) changes
|
||||
|
||||
- **New look and feel**: the site was rebuilt from the ground up on a new component library, while keeping the old site's visual identity (colors, dark by default).
|
||||
- **Navigation menu** repositioned to properly line up with the article content column (previously misaligned at some screen widths).
|
||||
- **Collapsible sidebar**: the article tree on the left can now be collapsed, and starts collapsed by default instead of showing everything at once, easier to scan given how many sections there are.
|
||||
- **Search button** added above the sidebar, visible on every page.
|
||||
- **Step-by-step instructions**: nearly every install and configuration procedure is now visually numbered, instead of running paragraphs of text, much easier to follow.
|
||||
- **Interactive folder trees**: folder structures shown in install guides are now real visual trees with folder/file icons, instead of ASCII-art text. Clicking a row copies that path to the clipboard.
|
||||
- **Named, illustrated code blocks**: every code block now shows the real file name it belongs to, with a matching icon (for example, a YAML icon for a `compose.yaml`).
|
||||
- **Callout boxes (notes, tips, warnings)**: colors matched to the old site's palette; some callouts can now be clicked entirely when they only contain a link to another article, instead of a plain inline text link.
|
||||
- **Contributors shown at the bottom of every article**: lists everyone who has worked on a page (not just the last editor), linking to the full edit history.
|
||||
- **"Other projects" links** (Gitea, Lumeex, Instameex) now also shown at the bottom of every article's table of contents, not just on the homepage.
|
||||
- **Improved mobile layout**: homepage buttons, image, and spacing reorganized for small screens; "edit"/"report an issue" links now stack properly instead of overflowing on mobile.
|
||||
|
||||
## URL changes
|
||||
|
||||
- Every page now lives under an explicit language prefix, `/en/...` or `/fr/...`. Previously only French had a prefix (`/fr/...`), while English sat at the site root with no prefix at all.
|
||||
- French URLs now use the same wording as their English counterparts (for example `/fr/general/networking/nat/` instead of the old `/fr/generalites/reseau/nat/`), so both languages share the exact same structure.
|
||||
- **Every old link still works**: a bookmark, a link shared elsewhere, or a search-engine result pointing at an old address automatically redirects the visitor to its new equivalent.
|
||||
|
||||
## English/French parity
|
||||
|
||||
The French version is now a complete, faithful mirror of the English one: same articles, same organization, same formatting (same callouts, same numbered steps), with only the text translated. That wasn't the case before, where the two versions had drifted apart over time (articles present in one language but missing from the other, different organization).
|
||||
@@ -0,0 +1,47 @@
|
||||
<script setup lang="ts">
|
||||
// Overrides Nuxt Content's default ProseImg (which renders every markdown
|
||||
// image as a plain <img>, or through NuxtImg only if it happens to detect
|
||||
// one registered): every raster image is re-encoded to WebP, which alone
|
||||
// cuts most screenshots down substantially, and capped at 1280px wide.
|
||||
// NuxtImg's `width` prop doubles as the rendered <img>'s HTML width
|
||||
// attribute, not just the resize target, so passing 1280 unconditionally
|
||||
// would stretch a smaller source (a 1024px screenshot, say) up to fill
|
||||
// that width in the browser, blurry on every display. `imageWidths`
|
||||
// (nuxt.config.ts's scanImageWidths) holds each image's real width, read
|
||||
// once at build time, so undersized images are only re-encoded, not
|
||||
// stretched. SVGs are already tiny vector files and would gain nothing
|
||||
// from either step, so they're left untouched.
|
||||
const props = defineProps<{
|
||||
src?: string
|
||||
alt?: string
|
||||
width?: string | number
|
||||
height?: string | number
|
||||
}>()
|
||||
|
||||
const config = useRuntimeConfig()
|
||||
const isSvg = computed(() => props.src?.toLowerCase().endsWith('.svg'))
|
||||
const cappedWidth = computed(() => {
|
||||
if (props.width) return props.width
|
||||
const naturalWidth = props.src ? config.public.imageWidths[props.src] : undefined
|
||||
return naturalWidth ? Math.min(naturalWidth, 1280) : 1280
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<img
|
||||
v-if="isSvg"
|
||||
:src="src"
|
||||
:alt="alt"
|
||||
:width="width"
|
||||
:height="height"
|
||||
>
|
||||
<NuxtImg
|
||||
v-else
|
||||
:src="src"
|
||||
:alt="alt"
|
||||
:width="cappedWidth"
|
||||
:height="height"
|
||||
format="webp"
|
||||
quality="100"
|
||||
/>
|
||||
</template>
|
||||
@@ -138,7 +138,7 @@ addPrerenderPath(`/raw${route.path}.md`)
|
||||
|
||||
<USeparator v-if="giteaUrl || github">
|
||||
<div
|
||||
class="flex items-center gap-2 text-sm text-muted"
|
||||
class="flex items-center gap-2 text-sm text-muted max-[420px]:flex-col"
|
||||
>
|
||||
<UButton
|
||||
v-if="editLink"
|
||||
|
||||
@@ -18,7 +18,7 @@ Special thanks to __Nipah__, __Xenio__, __KevOut__ and others for their patience
|
||||
|
||||
## About the documentation
|
||||
|
||||
The documentation provided here is experimental and shared in a spirit of open knowledge and experience. It is not intended to build production-grade or industrialized infrastructure. It may contain mistakes and/or approximations.
|
||||
The documentation provided here is experimental and shared in a spirit of open knowledge and experience. It is not intended to build production-grade or industrialized infrastructure. It may contain mistakes and/or approximations.
|
||||
|
||||
Naturally, this documentation should only be used within a strictly legal framework.
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ description: Learn how NAT, port forwarding, and DHCP work on a home router. Con
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||
|
||||

|
||||

|
||||
|
||||
## What is a "port"?
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ When you browse a website or use an app, requests are made to one or more domain
|
||||
|
||||
The DNS zone is like a registry with signposts that direct your requests to the correct destination.
|
||||
|
||||

|
||||

|
||||
|
||||
## The DNS Zone
|
||||
|
||||
@@ -23,12 +23,13 @@ You can enter _records_ into this DNS zone to direct requests properly. You can
|
||||
Example of a DNS zone for the domain `mydomain.com`:
|
||||
|
||||
```
|
||||
$TTL 3600
|
||||
@ IN SOA ns1.dns.me. dns.net. (2024051800 86400 3600 3600000 60)
|
||||
IN NS ns1.dns.me.
|
||||
IN NS ns2.dns.me.
|
||||
IN A 203.0.113.0
|
||||
www IN CNAME mydomain.com
|
||||
sousdomaine IN CNAME mydomain.com
|
||||
IN A 203.0.113.10
|
||||
www IN CNAME mydomain.com.
|
||||
subdomain IN CNAME mydomain.com.
|
||||
```
|
||||
|
||||
In this example:
|
||||
@@ -36,8 +37,8 @@ In this example:
|
||||
- `$TTL 3600` tells global name servers that the records are valid for 1 hour (after which they need to re-check).
|
||||
- `IN SOA ns1.dns.me. dns.net. (...)` indicates `ns1.dns.me` as the primary DNS server, with refresh intervals.
|
||||
- `IN NS` records define the authoritative name servers for the domain.
|
||||
- `IN A 203.0.113.0` means `mydomain.com` points to IP `203.0.113.0`.
|
||||
- `subdomain IN CNAME mydomain.com` means `subdomain.mydomain.com` points to the same destination as `mydomain.com`.
|
||||
- `IN A 203.0.113.10` means `mydomain.com` points to IP `203.0.113.10`.
|
||||
- `subdomain IN CNAME mydomain.com.` means `subdomain.mydomain.com` points to the same destination as `mydomain.com`.
|
||||
|
||||
So, if you want to point `mydomain.com` to your server, you can do it by adding an `A` record pointing to your server's public IP address.
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ description: Set up Samba on Debian to share folders over your local network and
|
||||
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||
Samba is a protocol that allows access to a folder located on a network drive. It can be configured on macOS, Windows, or Linux.
|
||||
Samba is a free implementation of the SMB/CIFS protocol, allowing access to a folder located on a network drive. It can be configured on macOS, Windows, or Linux.
|
||||
|
||||
There are many tutorials for setting up Samba on Windows or on NAS systems like Synology, but here we focus on Debian.
|
||||
|
||||
@@ -61,7 +61,7 @@ Then scroll to the end of the file and add the following configuration:
|
||||
```
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
### Create a Samba User and Group
|
||||
@@ -111,7 +111,7 @@ sudo smbpasswd -a sambauser
|
||||
```bash [Terminal]
|
||||
sudo smbpasswd -e sambauser
|
||||
```
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Accessing a Shared Folder
|
||||
@@ -146,11 +146,11 @@ sudo nano /smb/.credentials
|
||||
Write:
|
||||
|
||||
```properties [.credentials]
|
||||
username=smbuser
|
||||
username=sambauser
|
||||
password=password
|
||||
```
|
||||
|
||||
* `smbuser`: the user we created on the `remote-machine`
|
||||
* `sambauser`: the user we created on the `remote-machine`
|
||||
* `password`: the password set earlier
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
|
||||
@@ -199,7 +199,7 @@ sudo cp /etc/fstab /etc/fstab.bak
|
||||
Then add the mount configuration line:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo echo //remote-ip/video /mnt/video cifs _netdev,nofail,credentials=/smb/.credentials,x-systemd.automount,x-systemd.device-timeout=15 0 0 >> /etc/fstab
|
||||
echo "//remote-ip/video /mnt/video cifs _netdev,nofail,credentials=/smb/.credentials,x-systemd.automount,x-systemd.device-timeout=15 0 0" | sudo tee -a /etc/fstab
|
||||
```
|
||||
|
||||
Reboot the machine:
|
||||
|
||||
@@ -30,7 +30,7 @@ RAID is not a backup system but a service continuity system! It only allows hot-
|
||||
### No RAID
|
||||
|
||||
<div style="display: flex; align-items: center;">
|
||||
<img src="/img/global/no-raid.svg" alt="Image" style="max-width: 30%; max-height:230px; margin-right: 20px;">
|
||||
<img src="/img/global/no-raid.svg" alt="Disks with no RAID redundancy" style="max-width: 30%; max-height:230px; margin-right: 20px;">
|
||||
<ul>
|
||||
<li>Just your disks, without RAID. Data is stored disk by disk.</li>
|
||||
<li>If you lose a disk, only its data is lost.</li>
|
||||
@@ -43,7 +43,7 @@ Use your disks without RAID when you're not afraid of data loss and can tolerate
|
||||
### RAID 0
|
||||
|
||||
<div style="display: flex; align-items: center;">
|
||||
<img src="/img/global/raid0.svg" alt="Image" style="max-width: 30%; max-height:230px; margin-right: 20px;">
|
||||
<img src="/img/global/raid0.svg" alt="RAID 0 striping data across disks" style="max-width: 30%; max-height:230px; margin-right: 20px;">
|
||||
<ul>
|
||||
<li>OS sees 1 drive.</li>
|
||||
<li>Data is striped across all disks.</li>
|
||||
@@ -59,7 +59,7 @@ Use RAID 0 when you prioritize performance and are not concerned about data loss
|
||||
### RAID 1
|
||||
|
||||
<div style="display: flex; align-items: center;">
|
||||
<img src="/img/global/raid1.svg" alt="Image" style="max-width: 30%; max-height:230px; margin-right: 20px;">
|
||||
<img src="/img/global/raid1.svg" alt="RAID 1 mirroring data across disks" style="max-width: 30%; max-height:230px; margin-right: 20px;">
|
||||
<ul>
|
||||
<li>OS sees 1 drive.</li>
|
||||
<li>All disks contain identical data.</li>
|
||||
@@ -78,7 +78,7 @@ Use RAID 1 for strong redundancy. Each disk contains all data, so performance re
|
||||
|
||||
### RAID 5
|
||||
<p align="center">
|
||||
<img src="/img/global/raid5.svg" alt="Image" style="max-width: 40%; margin-right: 20px;">
|
||||
<img src="/img/global/raid5.svg" alt="RAID 5 with distributed parity" style="max-width: 40%; margin-right: 20px;">
|
||||
</p>
|
||||
|
||||
- OS sees 1 drive.
|
||||
@@ -92,7 +92,7 @@ Use RAID 5 when you want reliable storage with 3 to 5 disks and minimal space lo
|
||||
|
||||
### RAID 6
|
||||
<p align="center">
|
||||
<img src="/img/global/raid6.svg" alt="Image" style="max-width: 50%; margin-right: 20px;">
|
||||
<img src="/img/global/raid6.svg" alt="RAID 6 with double distributed parity" style="max-width: 50%; margin-right: 20px;">
|
||||
</p>
|
||||
|
||||
- OS sees 1 drive.
|
||||
@@ -102,7 +102,7 @@ Use RAID 5 when you want reliable storage with 3 to 5 disks and minimal space lo
|
||||
- Total capacity is the sum of all disks minus two (e.g., 4×10TB = 20TB).
|
||||
- Minimum of 4 disks (6 recommended to minimize space loss).
|
||||
|
||||
Use RAID 6 in similar situations as RAID 5, especially with 6 or more disks. More disks mean higher failure risk. RAID 6 offers peace of mind by tolerating two simultaneous failures.
|
||||
Use RAID 6 in similar situations as RAID 5, especially with 6 or more disks. More disks mean higher failure risk. RAID 6 offers peace of mind by tolerating two simultaneous failures. There's nothing more frustrating than losing a second disk while the array is still rebuilding from replacing the first.
|
||||
|
||||
## Software RAID
|
||||
(coming soon)
|
||||
|
||||
@@ -24,7 +24,7 @@ Here’s what we’re most interested in:
|
||||
- Its robust error notifications and monitoring.
|
||||
|
||||
## Structure
|
||||

|
||||

|
||||
|
||||
ZFS has a unique structure:
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ Larger boards generally offer more ports and features. Pre-built systems might u
|
||||
|
||||
## CPU
|
||||
<div style="display: flex; align-items: center;">
|
||||
<img src="/img/global/cpu.svg" alt="Image" style="max-width: 25%; max-height:230px; margin-right: 20px;">
|
||||
<img src="/img/global/cpu.svg" alt="CPU icon" style="max-width: 25%; max-height:230px; margin-right: 20px;">
|
||||
<p>The <strong>CPU</strong> (Central Processing Unit) is the computer's calculator. It processes most software tasks. Modern CPUs have multiple cores, often with virtual threads, to better handle workloads. They need to be cooled using either an active cooler (with a fan) or a passive one (fanless), depending on power consumption (watts). Choose your CPU based on how you plan to use the server.</p>
|
||||
</div>
|
||||
|
||||
@@ -51,7 +51,7 @@ For low-power home servers or NAS (non-intensive computing), consider Intel N100
|
||||
## RAM
|
||||
|
||||
<p align="center">
|
||||
<img src="/img/global/ram.svg" alt="Image" style="max-width: 65%;">
|
||||
<img src="/img/global/ram.svg" alt="RAM icon" style="max-width: 65%;">
|
||||
</p>
|
||||
|
||||
__RAM__ (Random Access Memory) is fast, temporary memory used by the CPU (and iGPU if applicable) for quick access during execution. It clears periodically and when the machine powers down. Better RAM = better CPU performance.
|
||||
@@ -64,10 +64,10 @@ The __GPU__ (Graphics Processing Unit) handles graphical, video, and sometimes A
|
||||
|
||||
Depending on the required performance, one can choose between a dedicated GPU with its own VRAM (a graphics card connected to a PCIe slot on the motherboard), or an iGPU, an integrated GPU built into the CPU (such as the N100/N150 or N305/N355), which uses the system’s shared RAM.
|
||||
|
||||
### HDD(s)
|
||||
## HDD(s)
|
||||
|
||||
<p align="center">
|
||||
<img src="/img/global/hdd.svg" alt="Image" style="max-width: 50%; margin-right: 20px;">
|
||||
<img src="/img/global/hdd.svg" alt="Hard disk drive icon" style="max-width: 50%; margin-right: 20px;">
|
||||
</p>
|
||||
|
||||
An __HDD__ (Hard Disk Drive), or hard drive, is a component used to store data. It was once the standard storage device in computers. HDDs consist of one or more stacked platters and read/write heads, somewhat like a vinyl record player.
|
||||
@@ -82,10 +82,10 @@ Generally, HDDs are best suited for storing data that doesn’t require frequent
|
||||
|
||||
Comes in 3.5" and 2.5" formats; servers usually favor the more reliable 3.5".
|
||||
|
||||
### SSD(s)
|
||||
## SSD(s)
|
||||
|
||||
<p align="center">
|
||||
<img src="/img/global/nvme.svg" alt="Image" style="max-width: 50%; margin-right: 20px;">
|
||||
<img src="/img/global/nvme.svg" alt="NVMe SSD icon" style="max-width: 50%; margin-right: 20px;">
|
||||
</p>
|
||||
|
||||
An __SSD__ (Solid State Drive) is a small circuit board with memory chips soldered onto it, used to store information. Unlike RAM, these chips retain data even when not powered, meaning the information is preserved after a reboot. SSDs are generally used as the main storage medium for your server.
|
||||
@@ -96,11 +96,11 @@ SSDs come in various formats, but today the preferred choice is the M.2 NVMe ver
|
||||
|
||||
However, SSDs are significantly more expensive than hard drives for the same storage capacity. Typically, the operating system (OS) is installed on the SSD to ensure fast performance. In a server environment, it's also ideal to store [Docker containers](/serveex/core/docker) and databases on the SSD. More broadly, any data that needs to be accessed frequently and quickly, such as websites, applications, or processing workloads, should be stored on an SSD.
|
||||
|
||||
### Network Card
|
||||
## Network Card
|
||||
|
||||
A __network card__ allows your machine to communicate with your network (including the internet). It consists of a controller chip and one or more network ports. These ports, often Ethernet ports, can come in different physical formats and support various data transfer standards:
|
||||
|
||||
- __RJ45 Gigabit Ethernet (10/100/1000):__ The standard RJ45 connector, supporting speeds from 10 Mbps (0.125 MB/s) up to 1000 Mbps (125 MB/s).
|
||||
- __RJ45 Gigabit Ethernet (10/100/1000):__ The standard RJ45 connector, supporting speeds from 10 Mbps (1.25 MB/s) up to 1000 Mbps (125 MB/s).
|
||||
- __RJ45 2.5G:__ Same connector type, supporting up to 2.5 Gbps (2,500 Mbps or 312.5 MB/s).
|
||||
- __RJ45 5G:__ Same connector, supporting up to 5 Gbps (625 MB/s).
|
||||
- __RJ45 10G Base-T:__ Same RJ45 format, supporting up to 10 Gbps (1.25 GB/s).
|
||||
@@ -116,7 +116,7 @@ The network card is usually built directly into the motherboard, but you can als
|
||||
|
||||
In general, for a server setup, it's recommended to have at least two Ethernet ports to ensure redundancy in case one connection fails.
|
||||
|
||||
### Input/Output Ports
|
||||
## Input/Output Ports
|
||||
|
||||
__I/O__ ports allow communication with external devices (displays, keyboard, mouse, network...). Motherboards typically offer:
|
||||
|
||||
@@ -127,7 +127,7 @@ __I/O__ ports allow communication with external devices (displays, keyboard, mou
|
||||
|
||||
Choose a motherboard and expansions based on your I/O needs.
|
||||
|
||||
### Power Supply
|
||||
## Power Supply
|
||||
|
||||
The __power supply unit__ (PSU) is the component that provides electrical power to your machine’s components. It connects to the wall via a power cord and has several output cables that plug into the motherboard and various peripherals, such as hard drives or dedicated graphics cards.
|
||||
|
||||
@@ -141,10 +141,10 @@ Another important factor is the form factor. There are several standard sizes, f
|
||||
|
||||
To choose the right PSU, a common rule of thumb is to estimate your system’s power needs based on usage, and then double that value. This is because most power supplies operate at optimal efficiency around 50% of their maximum load.
|
||||
|
||||
### Case
|
||||
## Case
|
||||
|
||||
<div style="display: flex; align-items: center;">
|
||||
<img src="/img/global/case.svg" alt="Image" style="max-width: 25%; max-height:230px; margin-right: 20px;">
|
||||
<img src="/img/global/case.svg" alt="Computer case icon" style="max-width: 25%; max-height:230px; margin-right: 20px;">
|
||||
<p>The <strong>case</strong> is also an essential component of your machine. It plays a key role in cooling, through its fans and airflow design, and it determines the form factor compatibility for your motherboard, power supply, and any dedicated GPU you may install.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -52,7 +52,7 @@ Cables are essential components of your network. Depending on their type and cat
|
||||
|
||||
Here’s a quick reference of the most common cable and port standards:
|
||||
|
||||
- **RJ45 Gigabit Ethernet 10/100/1000**: The standard RJ45 connector, supporting speeds from 10 Mbps (0.125 MB/s) to 1000 Mbps (125 MB/s)
|
||||
- **RJ45 Gigabit Ethernet 10/100/1000**: The standard RJ45 connector, supporting speeds from 10 Mbps (1.25 MB/s) to 1000 Mbps (125 MB/s)
|
||||
- **RJ45 2.5G**: Same connector, supporting speeds up to 2.5 Gbps (312.5 MB/s)
|
||||
- **RJ45 5G**: Same connector, supporting speeds up to 5 Gbps (625 MB/s)
|
||||
- **RJ45 10GBase-T**: Same connector, supporting speeds up to 10 Gbps (1.25 GB/s)
|
||||
|
||||
@@ -12,15 +12,15 @@ This article was written before the __massive__ increase in computer hardware pr
|
||||
|
||||
When you decide to dive into the adventure of running your own home server, the same questions usually come up: _“Where should I start?”_, _“Isn’t it expensive?”_. And often, people either give up or end up buying a proprietary NAS that they’ll throw away a year later once they realize it only brings headaches and wasted money.
|
||||
|
||||
A server isn’t a piece of furniture. It’s simply any computer capable of running Linux.That’s why mini PCs powered by **Intel N100** processors are so popular: for around $100–130 on Chinese platforms, you can get a machine that runs **24/7** for years, capable of handling everything you’d expect from a home server or personal cloud without sacrificing performance.
|
||||
A server isn’t a piece of furniture. It’s simply any computer capable of running Linux. That’s why mini PCs powered by **Intel N100** processors are so popular: for around $100–130 on Chinese platforms, you can get a machine that runs **24/7** for years, capable of handling everything you’d expect from a home server or personal cloud without sacrificing performance.
|
||||
|
||||
It’s **objectively inexpensive**, and anyone with a bit of curiosity can get started.
|
||||
|
||||
A mini PC for $100 + a USB dock for $50 that holds multiple hard drives = a complete platform for $150, versus **$350–1200** for branded NAS systems.
|
||||
|
||||
That’s all a **ProloNAS** is. It’s then up to you to scale your storage capacity according to your needs.
|
||||
That’s all a **ProloNAS** is: a NAS anyone can afford. The name is a French pun, *prolo* (slang for "working-class") plus *NAS*, a home server for the rest of us, not just people who can drop $1000 on a branded box. It’s then up to you to scale your storage capacity according to your needs.
|
||||
|
||||

|
||||

|
||||
|
||||
## Example Hardware
|
||||
|
||||
@@ -32,11 +32,11 @@ That’s all a **ProloNAS** is. It’s then up to you to scale your storage capa
|
||||
|
||||
## Why a NAS?
|
||||
|
||||
A **NAS** (Network Attached Storage) is a machine centered around storage, designed to be shared over a network.The idea is to have a **reliable and secure** storage space that serves as the backbone for your personal services and apps such as a self-hosted cloud like [Nextcloud](/serveex/cloud/nextcloud), a photo sync tool like [Immich](/serveex/cloud/immich), or a media server like [Jellyfin](/serveex/media/jellyfin). You can also store camera footage, backups, or even development projects on it.
|
||||
A **NAS** (Network Attached Storage) is a machine centered around storage, designed to be shared over a network. The idea is to have a **reliable and secure** storage space that serves as the backbone for your personal services and apps such as a self-hosted cloud like [Nextcloud](/serveex/cloud/nextcloud), a photo sync tool like [Immich](/serveex/cloud/immich), or a media server like [Jellyfin](/serveex/media/jellyfin). You can also store camera footage, backups, or even development projects on it.
|
||||
|
||||
### But why not just use a mini PC with an external hard drive?
|
||||
|
||||
Sure, a simple mini PC with 1–2 TB of storage will do for most people.And your movie collection might fit on an external drive of a few extra terabytes. But that’s **neither reliable nor scalable** a single shock or hardware failure could permanently destroy your data.
|
||||
Sure, a simple mini PC with 1–2 TB of storage will do for most people. And your movie collection might fit on an external drive of a few extra terabytes. But that’s **neither reliable nor scalable**: a single shock or hardware failure could permanently destroy your data.
|
||||
|
||||
A real NAS is built around **storage reliability**. It uses redundancy strategies like [RAID](/general/storage/raid) to protect against drive failure, and snapshot systems like [ZFS](/general/storage/zfs) to guard against corruption.
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ Options change how a command behaves. They come in two flavours, and most comman
|
||||
- **Short**, a single dash and a single letter: `ls -a`. They can be stacked, so `ls -l -a -h` is usually written `ls -lah`.
|
||||
- **Long**, two dashes and a whole word: `ls --all`. Longer to type, but you can still tell what it does six months later, which is why they're the better choice in a script.
|
||||
|
||||
Some options expect a value right after them: `ssh-keygen -t ed25519` (`-t` for type), `rsync --exclude @eaDir`. And case matters, always. In `ls`, `-r` reverses the sort order while `-R` walks into subfolders. Two different things, one letter apart.
|
||||
Some options expect a value right after them: `ssh-keygen -t ed25519` (`-t` for type), `rsync --exclude @eaDir`. And case matters, always. In `ls`, `-r` reverses the sort order while `-R` walks into subfolders. Same letter, different case.
|
||||
|
||||
### Arguments and paths
|
||||
|
||||
@@ -49,7 +49,9 @@ When the target is a place on the disk, you write it as a path, and there are a
|
||||
| `/var/log` | an **absolute** path, same result from anywhere |
|
||||
| `logs/today` | a **relative** path, understood from where you currently stand |
|
||||
|
||||
Which folder holds what is a subject of its own, covered in [folders and partitions](/general/linux/filesystem).
|
||||
::note{to="/general/linux/filesystem"}
|
||||
Which folder holds what is a subject of its own, covered in **folders and partitions**.
|
||||
::
|
||||
|
||||
The prompt itself tells you where you are: in `username@serveex:~/docker$`, you're logged in as `username` on the machine named `serveex`, inside the `docker` folder of your home. That final `$` means a normal user. If it ever shows `#`, you're root and every typo counts double.
|
||||
|
||||
@@ -241,7 +243,7 @@ The ones worth keeping at hand, and where their names come from.
|
||||
| `chmod` | change mode | Changes a file's permissions |
|
||||
| `chown` | change owner | Changes who owns a file |
|
||||
| `sudo` | substitute user do | Runs one command as administrator |
|
||||
| `apt` | advanced package tool | Installs, updates and removes packages |
|
||||
| `apt` | Advanced Package Tool | Installs, updates and removes packages |
|
||||
| `systemctl` | control systemd | Starts, stops and enables services |
|
||||
| `ssh` | secure shell | Opens a session on a remote machine |
|
||||
| `scp` | secure copy | Copies files over SSH |
|
||||
|
||||
@@ -22,13 +22,13 @@ That tree isn't arbitrary either. Every Debian install has the same folders in t
|
||||
| `/usr` | The installed programs themselves, managed by `apt` |
|
||||
| `/opt` | Software installed outside the package manager |
|
||||
| `/mnt` and `/media` | Where extra disks get mounted, `/media` for removable ones |
|
||||
| `/boot` | The kernel and the bootloader, on a small partition of its own |
|
||||
| `/boot` | The kernel and the bootloader. On a default UEFI Debian install it lives on `/`; only `/boot/efi` (the EFI system partition) is separate |
|
||||
| `/dev` | Your hardware, exposed as files (`/dev/sda` is a disk) |
|
||||
| `/proc` and `/sys` | The kernel's live state, invented on the fly, not real files |
|
||||
|
||||
## Folders are not partitions
|
||||
|
||||
Partitions are a different question from folders. A minimal Debian install typically creates two, one for `/` and one for swap, so every folder above except `/boot` lives on the same partition and shares the same free space. Two commands to see the reality of it: `lsblk` draws the tree of disks and partitions, `df -h` shows how full each one is.
|
||||
Partitions are a different question from folders. A minimal Debian install typically creates two, one for `/` and one for swap, so every folder above except `/boot/efi` lives on the same partition and shares the same free space. Two commands to see the reality of it: `lsblk` draws the tree of disks and partitions, `df -h` shows how full each one is.
|
||||
|
||||
```bash [Terminal]
|
||||
lsblk
|
||||
|
||||
@@ -55,7 +55,7 @@ sudo btop
|
||||
|
||||
Click a process to select it, :kbd{value="Esc"} opens the menu, :kbd{value="Q"} quits. The `+` and `-` keys fold and unfold the panels if the screen feels crowded.
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
## `duf`, disk space that reads like a table
|
||||
@@ -79,7 +79,7 @@ sudo duf
|
||||
|
||||
Local disks, network shares and system mounts are grouped separately. Add `--only local` to hide the pseudo-filesystems Docker leaves behind.
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
## `ncdu`, finding what ate the disk
|
||||
@@ -105,7 +105,7 @@ Arrows to move, :kbd{value="Enter"} to open a folder, :kbd{value="D"} to delete
|
||||
:kbd{value="D"} deletes immediately, with a single confirmation and no recycle bin. Run `ncdu` without `sudo` when you're only looking, so a mistyped key can't touch anything the system owns.
|
||||
::
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
## `tldr`, the manual without the 400 lines
|
||||
@@ -133,7 +133,7 @@ The examples are fetched once and stored locally, so the command works offline a
|
||||
tldr rsync
|
||||
```
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
## `lazydocker`, managing containers from the terminal
|
||||
@@ -144,10 +144,11 @@ The one exception: it isn't packaged by Debian. It's a full text interface for D
|
||||
#### Download the latest release
|
||||
|
||||
```bash [Terminal]
|
||||
curl -Lo /tmp/lazydocker.tar.gz "https://github.com/jesseduffield/lazydocker/releases/latest/download/lazydocker_0.25.2_Linux_x86_64.tar.gz"
|
||||
LAZYDOCKER_VERSION=$(curl -s https://api.github.com/repos/jesseduffield/lazydocker/releases/latest | grep -Po '"tag_name": "v\K[^"]*')
|
||||
curl -Lo /tmp/lazydocker.tar.gz "https://github.com/jesseduffield/lazydocker/releases/latest/download/lazydocker_${LAZYDOCKER_VERSION}_Linux_x86_64.tar.gz"
|
||||
```
|
||||
|
||||
Check the [releases page](https://github.com/jesseduffield/lazydocker/releases) for the current version number, and take `arm64` instead of `x86_64` if the server is a Raspberry Pi or similar.
|
||||
The release asset's filename embeds the version number, so it can't be fetched with a plain `latest` link; the first command reads the current version from GitHub's API instead of hardcoding one that will go stale. Take `arm64` instead of `x86_64` if the server is a Raspberry Pi or similar.
|
||||
|
||||
#### Install the binary
|
||||
|
||||
@@ -197,12 +198,12 @@ The [full list](https://github.com/jesseduffield/lazydocker/blob/master/docs/key
|
||||
Being outside `apt` also means it won't be updated by `apt full-upgrade`. Repeat these steps when you want a newer version.
|
||||
::
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
## `ufw`, a firewall you can actually read
|
||||
|
||||
Debian's firewall (`iptables`/`nftables` under the hood) is powerful and unreadable directly. `ufw`, *uncomplicated firewall*, is a thin layer on top that turns it into short, plain-English rules, block everything by default and open only what you actually expose.
|
||||
Debian's firewall (`iptables`/`nftables` under the hood) is powerful and unreadable directly. `ufw`, *uncomplicated firewall*, is a thin layer on top that turns it into short, plain-English rules: block everything by default and open only what you actually expose.
|
||||
|
||||
::steps{level="4"}
|
||||
#### Install it
|
||||
@@ -256,6 +257,6 @@ To Action From
|
||||
443/tcp ALLOW IN Anywhere
|
||||
```
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ navigation:
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
## A Home Lab by a Beginner, for Beginners
|
||||
|
||||

|
||||

|
||||
|
||||
**Serveex** is primarily a personal project aimed at hosting as many everyday services as possible at home, without relying on proprietary platforms (Google, Apple, Netflix, etc.). The goal was to experiment, learn, and document every step along the way. This is purely a scientific project and is not intended for production use.
|
||||
|
||||
@@ -47,7 +47,7 @@ Install Docker
|
||||
---
|
||||
icon: i-carbon-container-registry
|
||||
title: Container manager
|
||||
to: "/serveex/core/docker#installer-dockge-pour-gérer-et-déployer-les-conteneurs"
|
||||
to: "/serveex/core/docker#install-dockge-to-manage-and-deploy-containers"
|
||||
ui:
|
||||
icon: text-[#74C2FF]
|
||||
---
|
||||
@@ -62,7 +62,7 @@ to: /serveex/core/wireguard
|
||||
ui:
|
||||
icon: text-[#88171A]
|
||||
---
|
||||
Install and deploy Wireguard
|
||||
Install and deploy WireGuard
|
||||
::
|
||||
|
||||
::card{icon="i-noto-globe-showing-americas" title="Reverse Proxy" to="/serveex/core/swag"}
|
||||
@@ -174,7 +174,7 @@ to: /serveex/media/qbittorrent
|
||||
ui:
|
||||
icon: text-[#2F67BA]
|
||||
---
|
||||
Install and deploy Qbittorrent
|
||||
Install and deploy qBittorrent
|
||||
::
|
||||
|
||||
::card
|
||||
@@ -284,7 +284,7 @@ to: /serveex/apps/adguard
|
||||
ui:
|
||||
icon: text-[#68BC71]
|
||||
---
|
||||
Install and deploy Adguard Home
|
||||
Install and deploy AdGuard Home
|
||||
::
|
||||
|
||||
::card
|
||||
@@ -296,6 +296,8 @@ ui:
|
||||
icon: text-[#175DDC]
|
||||
---
|
||||
Install and deploy Vaultwarden
|
||||
::
|
||||
|
||||
::
|
||||
::
|
||||
|
||||
@@ -313,6 +315,14 @@ Install and deploy Authentik
|
||||
::card{icon="i-noto-crystal-ball" title="Multi-host Docker manager" to="/serveex/advanced/arcane"}
|
||||
Install and deploy Arcane
|
||||
::
|
||||
|
||||
::card{icon="i-lucide-database-backup" title="3-2-1 Backups" to="/serveex/advanced/backrest"}
|
||||
Install and deploy Backrest
|
||||
::
|
||||
|
||||
::card{icon="i-lucide-rotate-ccw" title="Instant Rollback" to="/serveex/advanced/btrfs-snapshots"}
|
||||
Set up BTRFS snapshots
|
||||
::
|
||||
::
|
||||
|
||||
## Coming Soon
|
||||
|
||||
@@ -8,9 +8,9 @@ description: Step-by-step guide to install Debian 13 on a home server and set up
|
||||
|
||||
[Debian 13 "Trixie"](https://www.debian.org/) is the base this whole guide sits on. It's a plain, boring, stable Linux, and for a homelab that's exactly the point: package versions stay frozen for the life of the release, security patches keep coming for about five years counting LTS, so the machine keeps running for years instead of needing a rebuild every few months.
|
||||
|
||||
The other reason is that it stays out of your way. Appliance systems like Unraid, TrueNAS or Synology's DSM put their own layer on top of Docker, and the day you need something their interface doesn't expose, you're stuck working around it. Debian is just a server: you install what you want, where you want, and nothing is hidden behind someone else's UI. It also happens to be what most self-hosted projects target first, so their docs hand you `apt` commands that work as-is, Docker publishes an official Debian repository, and any error message you paste into a search engine already has years of answers behind it. A minimal install is light enough to leave nearly all the RAM and CPU of a small N100 box to your containers.
|
||||
The other reason is that it stays out of your way. Appliance systems like Unraid, TrueNAS or Synology's DSM put their own layer on top of Linux, and the day you need something their interface doesn't expose, you're stuck working around it. Debian is just a server: you install what you want, where you want, and nothing is hidden behind someone else's UI. It also happens to be what most self-hosted projects target first, so their docs hand you `apt` commands that work as-is, Docker publishes an official Debian repository, and any error message you paste into a search engine already has years of answers behind it. A minimal install is light enough to leave nearly all the RAM and CPU of a small N100 box to your containers.
|
||||
|
||||

|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
@@ -20,7 +20,7 @@ The other reason is that it stays out of your way. Appliance systems like Unraid
|
||||
|
||||
### BIOS setup
|
||||
|
||||
Press :kbd{value="Del"} or :kbd{value="F2"} right after powering on to open the firmware setup (the boot screen usually says which key it is). Most machines also have a one-shot boot menu, often :kbd{value="F12"}, :kbd{value="F11"} or :kbd{value="F8"}, which lets you boot the USB installer once without touching the permanent boot order. Debian documents the general procedure in its [installation manual](https://www.debian.org/releases/forky/amd64/ch03s06.en.html), and here is what matters before you install:
|
||||
Press :kbd{value="Del"} or :kbd{value="F2"} right after powering on to open the firmware setup (the boot screen usually says which key it is). Most machines also have a one-shot boot menu, often :kbd{value="F12"}, :kbd{value="F11"} or :kbd{value="F8"}, which lets you boot the USB installer once without touching the permanent boot order. Debian documents the general procedure in its [installation manual](https://www.debian.org/releases/trixie/amd64/ch03s06.en.html), and here is what matters before you install:
|
||||
|
||||
- **Boot mode.** Prefer native UEFI. The important part is that the installer boots in the *same* mode you intend to run the server in, because UEFI uses GPT partitioning while legacy BIOS (and UEFI in CSM mode) uses a DOS partition table, and a mismatch installs the bootloader in the wrong place. Watch out on multi-boot machines: the default boot mode for removable devices is often not the one used for internal disks.
|
||||
- **Secure Boot** can stay enabled. Debian ships a Microsoft-signed shim bootloader, so it boots fine as-is.
|
||||
@@ -55,7 +55,7 @@ _Screenshot from [this bootable USB guide on DEV Community](https://dev.to/devop
|
||||
|
||||
Writing takes a few minutes.
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
### Install Debian
|
||||
@@ -89,6 +89,10 @@ Confirm the timezone guessed from your country.
|
||||
|
||||
*Guided, use entire disk* on the system drive, then *All files in one partition*, which gives you one big `/` plus a swap partition. Separate `/home` or `/var` partitions buy you very little here and mostly guarantee that one fills up while the others sit half empty. Pick LVM only if you already know you want snapshots or to grow volumes later. Your data disks are not touched at this stage, you'll mount them afterwards.
|
||||
|
||||
::warning{to="/serveex/advanced/btrfs-snapshots"}
|
||||
__For advanced users:__ this is the moment to decide, not later. Picking *Manual* here instead of *Guided* lets you format the root partition as Btrfs instead of ext4, unlocking instant, near-free snapshots you can roll back to before a risky update or config change. Once this step is done and Debian is installed on ext4, switching to Btrfs isn't possible without wiping the disk and starting over. See **BTRFS snapshots** if you want to set it up, it's not a replacement for real backups either, a snapshot lives on the same disk.
|
||||
::
|
||||
|
||||
Finish with *Finish partitioning and write changes to disk*, then confirm with *Yes*: this is the point of no return for that disk.
|
||||
|
||||

|
||||
@@ -117,7 +121,7 @@ Install it on the disk you just partitioned (`/dev/sda`, `/dev/nvme0n1`...), not
|
||||
|
||||

|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
::note
|
||||
@@ -209,14 +213,14 @@ Keep your current SSH session open while you test. Open a **second** terminal an
|
||||
The door is now closed for every other machine too, including the next one you'll want to connect from. To let a new one in, set `PasswordAuthentication yes` back in `hardening.conf`, restart SSH, run the two key steps above from that machine, then set it to `no` again and restart SSH one last time.
|
||||
::
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
### Wake the server up remotely
|
||||
|
||||
A machine that runs 24/7 for two hours of actual use burns power, spins fans and wears drives for nothing. Wake on LAN lets you shut it down properly when you're done and bring it back in a few seconds without walking to it: the network card stays powered in standby, listening for one specific broadcast (the *magic packet*) carrying the server's MAC address, and switches the machine on when it sees it. Handy for a backup target you only need at night, or a media server nobody watches during the day.
|
||||
|
||||
Two conditions before you start: the machine has to be wired to ethernet, WiFi cards almost never support this, and the packet has to be sent from the same local network, since a broadcast doesn't cross a router. The BIOS side was covered in [BIOS setup](#bios-setup), here is the Debian side.
|
||||
Two conditions before you start: the machine has to be wired to ethernet, WiFi cards almost never support this, and the packet has to be sent from the same local network, since a broadcast doesn't cross a router, unless you use a dedicated app and port-forwarding rules on your router. The BIOS side was covered in [BIOS setup](#bios-setup), here is the Debian side.
|
||||
|
||||
::steps{level="4"}
|
||||
#### Find the interface and its MAC address
|
||||
@@ -253,6 +257,7 @@ sudo nano /etc/systemd/system/wol.service
|
||||
```ini [wol.service]
|
||||
[Unit]
|
||||
Description=Enable Wake on LAN
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
@@ -277,7 +282,7 @@ wakeonlan aa:bb:cc:dd:ee:ff
|
||||
|
||||
Windows has no built-in sender, so the simplest route there is a phone app: any of the free *Wake on LAN* apps takes the MAC address and works the same way. The server should start within a couple of seconds.
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
::note
|
||||
@@ -311,7 +316,7 @@ sudo apt full-upgrade
|
||||
sudo apt autoremove --purge
|
||||
```
|
||||
|
||||
Every kernel update leaves the previous one installed, and `/boot` is a small partition that eventually fills up and breaks the next upgrade. Do this every single time, not once in a while. `--purge` also drops the config files of the packages being removed.
|
||||
Every kernel update leaves the previous one installed, and they pile up if nobody clears them out. Do this every single time, not once in a while. `--purge` also drops the config files of the packages being removed.
|
||||
|
||||
#### Reboot if the kernel moved
|
||||
|
||||
@@ -321,7 +326,7 @@ sudo reboot
|
||||
|
||||
A kernel or libc update only takes effect after a restart. Everything else applies immediately, so this is only needed when the upgrade touched one of those, and it's worth planning for a moment when nothing depends on the machine.
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
::tip
|
||||
|
||||
@@ -12,7 +12,7 @@ A **container** sidesteps the problem: it packages an app together with everythi
|
||||
|
||||
**Docker** is the tool that builds, starts and manages these containers. Point it at an *image*, a ready-made snapshot of an app maintained by its developers, and it downloads it and runs it in one command. The rest of Serveex is built entirely on it: every app from here on is one Docker container, or a handful of them working together.
|
||||
|
||||

|
||||

|
||||
|
||||
## Install Docker
|
||||
::steps{level="3"}
|
||||
@@ -37,7 +37,7 @@ sudo apt-get update
|
||||
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
```
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
**More options:** [Install Docker for Debian 13](https://docs.docker.com/engine/install/debian/)
|
||||
@@ -53,7 +53,7 @@ sudo mkdir /srv/docker
|
||||
## Install [Dockge](https://github.com/louislam/dockge) to manage and deploy containers
|
||||
[Dockge](https://github.com/louislam/dockge) is a web tool to create, configure, launch, and manage Docker containers. It's a simple, intuitive interface that’s lighter and easier for beginners than using the CLI or Portainer.
|
||||
|
||||

|
||||

|
||||
|
||||
### Configuration
|
||||
|
||||
@@ -65,7 +65,7 @@ tree:
|
||||
- srv:
|
||||
- docker:
|
||||
- dockge:
|
||||
- compose.yml
|
||||
- compose.yaml
|
||||
---
|
||||
::
|
||||
|
||||
@@ -81,7 +81,7 @@ sudo mkdir dockge
|
||||
|
||||
```bash [Terminal]
|
||||
cd /srv/docker/dockge
|
||||
sudo nano compose.yml
|
||||
sudo nano compose.yaml
|
||||
```
|
||||
Paste the following:
|
||||
|
||||
@@ -94,15 +94,52 @@ services:
|
||||
container_name: dockge
|
||||
ports:
|
||||
- 3555:5001 # LAN-accessible port will be 3555
|
||||
|
||||
environment:
|
||||
- DOCKER_HOST=tcp://docker-socket-proxy:2375
|
||||
- DOCKGE_STACKS_DIR=/srv/docker
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /srv/docker/dockge/data:/app/data
|
||||
- /srv/docker:/srv/docker
|
||||
networks:
|
||||
- dockge-internal
|
||||
depends_on:
|
||||
- docker-socket-proxy
|
||||
|
||||
docker-socket-proxy:
|
||||
image: lscr.io/linuxserver/socket-proxy:latest
|
||||
container_name: docker-socket-proxy-dockge
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
networks:
|
||||
- dockge-internal
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
environment:
|
||||
- DOCKGE_STACKS_DIR=/srv/docker
|
||||
- CONTAINERS=1
|
||||
- IMAGES=1
|
||||
- NETWORKS=1
|
||||
- VOLUMES=1
|
||||
- EXEC=1
|
||||
- INFO=1
|
||||
- SYSTEM=1
|
||||
- POST=1
|
||||
- ALLOW_START=1
|
||||
- ALLOW_STOP=1
|
||||
- ALLOW_RESTARTS=1
|
||||
restart: unless-stopped
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /run
|
||||
|
||||
networks:
|
||||
dockge-internal:
|
||||
name: dockge-internal
|
||||
```
|
||||
|
||||
::warning
|
||||
Dockge needs access to the Docker API to manage every other stack on this server, which is effectively root access to your host. Instead of mounting `/var/run/docker.sock` directly, this config sits **Docker Socket Proxy** in front of it, only allowing the specific permissions Dockge needs (containers, images, networks, volumes, exec, lifecycle actions), on their own internal network. Dockge has no built-in login by default, so never expose port `3555` beyond your LAN without putting it behind [TinyAuth](/serveex/security/tinyauth) or [Authentik](/serveex/advanced/authentik) first.
|
||||
::
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
|
||||
|
||||
#### Launch the container
|
||||
@@ -116,13 +153,13 @@ Then go to `http://yourserverip:3555` in your browser to access the login page.
|
||||
|
||||
More info on [Dockge and how to use it](https://github.com/louislam/dockge)
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
And there you go! Docker and a tool to easily manage your containers are ready!
|
||||
|
||||
## [Watchtower](https://watchtower.nickfedor.com/), to auto-update containers
|
||||
Watchtower is a container that checks for updates and pulls new images automatically, just by adding a label in your containers’ `compose.yml` files.
|
||||
Watchtower is a container that checks for updates and pulls new images automatically, just by adding a label in your containers’ `compose.yaml` files.
|
||||
|
||||
### Configuration
|
||||
|
||||
@@ -149,14 +186,55 @@ services:
|
||||
- WATCHTOWER_LABEL_ENABLE=true
|
||||
- WATCHTOWER_CLEANUP=true
|
||||
- WATCHTOWER_REMOVE_VOLUMES=true
|
||||
- DOCKER_HOST=tcp://docker-socket-proxy:2375
|
||||
# Discord notifications - uncomment if used
|
||||
#- WATCHTOWER_NOTIFICATIONS=slack
|
||||
#- WATCHTOWER_NOTIFICATION_SLACK_IDENTIFIER=Watchtower
|
||||
#- WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL=${WH_URL}
|
||||
networks:
|
||||
- watchtower-internal
|
||||
depends_on:
|
||||
- docker-socket-proxy
|
||||
|
||||
docker-socket-proxy:
|
||||
image: lscr.io/linuxserver/socket-proxy:latest
|
||||
container_name: docker-socket-proxy-watchtower
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
networks:
|
||||
- watchtower-internal
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
environment:
|
||||
- CONTAINERS=1
|
||||
- IMAGES=1
|
||||
- NETWORKS=1
|
||||
- VOLUMES=1
|
||||
- INFO=1
|
||||
- SYSTEM=1
|
||||
- POST=1
|
||||
- ALLOW_START=1
|
||||
- ALLOW_STOP=1
|
||||
- ALLOW_RESTARTS=1
|
||||
restart: unless-stopped
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /run
|
||||
|
||||
networks:
|
||||
watchtower-internal:
|
||||
name: watchtower-internal
|
||||
```
|
||||
|
||||
::warning
|
||||
|
||||
`WATCHTOWER_REMOVE_VOLUMES=true` deletes a container's anonymous volumes as soon as it's updated. Combined with a `latest` tag, an automatic update can silently wipe data for any app that still stores something in an anonymous (unnamed) volume instead of a bind mount.
|
||||
::
|
||||
|
||||
::note
|
||||
This config sits **Docker Socket Proxy** in front of the Docker API instead of mounting `/var/run/docker.sock` directly, so Watchtower only gets the permissions it actually needs (list/pull images, recreate containers) rather than full root-equivalent access to the host.
|
||||
::
|
||||
|
||||
#### Set your environment variables
|
||||
|
||||
Fill in the `.env` section in Dockge with the following:
|
||||
@@ -173,17 +251,20 @@ WH_URL=
|
||||
|
||||
#### Enable Watchtower on other containers
|
||||
|
||||
To have Watchtower monitor your other containers, add this to their `compose.yml`:
|
||||
To have Watchtower monitor your other containers, add this to their `compose.yaml`:
|
||||
|
||||
```yaml [compose.yaml]
|
||||
---
|
||||
labels:
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
services:
|
||||
yourapp:
|
||||
# ...
|
||||
labels:
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
```
|
||||
|
||||
Then restart the modified stacks.
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
And that's it! You now have a solid base to start deploying the services you want!
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: Wireguard
|
||||
title: WireGuard
|
||||
description: Install and configure WireGuard VPN to securely access your homelab from anywhere and connect all your devices to your private network.
|
||||
---
|
||||
|
||||
@@ -9,10 +9,10 @@ description: Install and configure WireGuard VPN to securely access your homelab
|
||||
## Introduction
|
||||
Using a VPN allows remote access to a server’s local resources without exposing them to the internet. It’s a clean and secure way to access services like SSH without exposing the port publicly. With a VPN, you can securely connect to your network from anywhere and make devices on different networks communicate.
|
||||
|
||||
Here we will use [Wireguard](https://www.wireguard.com/), a secure and high-performance VPN server, using containers:
|
||||
Here we will use [WireGuard](https://www.wireguard.com/), a secure and high-performance VPN server, using containers:
|
||||
|
||||
- [wg-easy](https://github.com/wg-easy/wg-easy) as the server, providing a very simple web UI to manage connections and download config files (including QR codes for phones)
|
||||
- [Wireguard](https://docs.linuxserver.io/images/docker-wireguard/?h=wireguard) as the client for Linux systems
|
||||
- [WireGuard](https://docs.linuxserver.io/images/docker-wireguard/?h=wireguard) as the client for Linux systems
|
||||
|
||||
Clients are also available for Windows, macOS, iOS, and Android.
|
||||
|
||||
@@ -27,7 +27,7 @@ To achieve this, we’ll create a **Virtual Private Network** (VPN), i.e., a sec
|
||||
|
||||
Additionally, you can add your phone, laptop, or other devices to the VPN and securely access your server resources wherever you are.
|
||||
|
||||

|
||||

|
||||
|
||||
In this diagram, machine 1 is part of two networks:
|
||||
|
||||
@@ -60,8 +60,7 @@ tree:
|
||||
- srv:
|
||||
- docker:
|
||||
- wg-easy:
|
||||
- config:
|
||||
- etc_wireguard/
|
||||
- etc_wireguard/
|
||||
- compose.yaml
|
||||
- .env
|
||||
---
|
||||
@@ -70,7 +69,7 @@ tree:
|
||||
::steps{level="3"}
|
||||
### Deploy the stack
|
||||
|
||||
Open Dockge, click **Compose**, and name the stack `wg_easy`.
|
||||
Open Dockge, click **Compose**, and name the stack `wg-easy`.
|
||||
|
||||
Copy the following configuration:
|
||||
|
||||
@@ -79,7 +78,7 @@ Copy the following configuration:
|
||||
services:
|
||||
wg-easy:
|
||||
environment:
|
||||
- INSECURE=true
|
||||
- INSECURE=true # disables the web UI's own HTTPS; fine on a LAN-only or SWAG-fronted setup, remove it otherwise
|
||||
image: ghcr.io/wg-easy/wg-easy:15
|
||||
container_name: wg-easy
|
||||
networks:
|
||||
@@ -148,10 +147,10 @@ Once connected, follow the web UI instructions to:
|
||||
|
||||
Then go to *Administrator → Admin Panel → Config*:
|
||||
|
||||
- Change `Allowed IPs` from `0.0.0.0/24` to `10.8.0.0/24` for **split tunneling**.
|
||||
- Remove IPv6 (it often causes unnecessary issues).
|
||||
- Change `Allowed IPs` from the default `0.0.0.0/0` (full tunnel) to `10.8.0.0/24` for **split tunneling**.
|
||||
- Optionally remove the IPv6 entry from `Allowed IPs` if you don't want client IPv6 traffic routed through the tunnel. This only affects what clients tunnel, not the container's own IPv6 setup above.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
### Retrieve Configuration Files
|
||||
@@ -177,7 +176,7 @@ Set it to `25` if it’s a permanently connected client.
|
||||
|
||||
Save, download, and rename the file to `wg0.conf` (or `wg1.conf`, etc.)
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
## Client Server Setup
|
||||
@@ -256,7 +255,7 @@ cd /srv/docker/wireguard
|
||||
sudo docker compose up -d
|
||||
```
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
::note
|
||||
@@ -277,4 +276,4 @@ Repeat this setup for each client.
|
||||
|
||||
And here’s the final setup overview:
|
||||
|
||||

|
||||

|
||||
|
||||
@@ -6,18 +6,18 @@ description: Set up SWAG as a reverse proxy with automatic SSL, expose your serv
|
||||
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||
[Swag](https://docs.linuxserver.io/general/swag/) is the core of this homelab. It’s a powerful reverse proxy that allows you to expose services on the internet using domain names, handling SSL certificate issuance (for encrypted connections), request routing, and access security (via HTTP auth or SSO like Authelia or Authentik). All the necessary documentation is [available here](https://docs.linuxserver.io/general/swag).
|
||||
[SWAG](https://docs.linuxserver.io/general/swag/) is the core of this homelab. It’s a powerful reverse proxy that allows you to expose services on the internet using domain names, handling SSL certificate issuance (for encrypted connections), request routing, and access security (via HTTP auth or SSO like Authelia or Authentik). All the necessary documentation is [available here](https://docs.linuxserver.io/general/swag).
|
||||
|
||||
::warning{to="/serveex/core/wireguard"}
|
||||
|
||||
SWAG is only useful for exposing your services to the internet, i.e. accessing them via a public URL like `https://service.mydomain.com`. If you don’t want to expose your services and prefer to always use a VPN to connect remotely, you can go **here instead**.
|
||||
::
|
||||
|
||||
Below is an example exposing Dockge. We will install SWAG along with the dbip mod for geolocation-based blocking, and the dashboard mod for managing swag, fail2ban, and geolocation.
|
||||
Below is an example exposing Dockge. We will install SWAG along with the dbip mod for geolocation-based blocking, the dashboard mod for managing swag, fail2ban, and geolocation, and the auto-reload mod, which automatically reloads nginx whenever a config file changes, without having to restart the container.
|
||||
|
||||
**Reverse proxy principle and its application in our case:**
|
||||
|
||||

|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
@@ -42,7 +42,7 @@ tree:
|
||||
- nginx.conf
|
||||
- proxy-confs:
|
||||
- dockge.subdomain.conf
|
||||
- compose.yml
|
||||
- compose.yaml
|
||||
- .env
|
||||
---
|
||||
::
|
||||
@@ -161,7 +161,7 @@ Save with :kbd{value="Ctrl+O"}, then :kbd{value="Enter"}, and exit with :kbd{val
|
||||
|
||||
### Enable DBIP in nginx.conf
|
||||
|
||||
Now configure swag to access DBIP, the geolocation-based access control module. Open the `nginx.conf` file:
|
||||
Now configure SWAG to access DBIP, the geolocation-based access control module. Open the `nginx.conf` file:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo nano /srv/docker/swag/config/nginx/nginx.conf
|
||||
@@ -175,14 +175,14 @@ include /config/nginx/dbip.conf;
|
||||
|
||||
Restart the stack in Dockge. This time, the SSL certificate should be successfully generated! Check the logs to confirm the server is ready.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Dashboard
|
||||
Access the dashboard locally by going to `http://yourserverip:81`
|
||||
On the left, you'll see a list of currently "proxied" services (none yet). On the right, the list of banned IPs. Below, various indicators. For more details, [click here](https://www.linuxserver.io/blog/introducing-swag-dashboard).
|
||||
|
||||

|
||||

|
||||
|
||||
## DBIP
|
||||
DBIP allows you to block connections based on countries. It relies on the configuration file named `dbip.conf` located in `/srv/docker/swag/config/nginx`. [More info here](https://virtualize.link/secure/).
|
||||
@@ -250,7 +250,7 @@ geo $lan-ip {
|
||||
|
||||
Save and close the file, then restart the stack.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
In the domain config files (see next section), you can enable or disable the whitelist or blacklist ([see documentation here](https://www.forum-nas.fr/threads/tuto-installer-swag-en-docker-reverse-proxy.15057/)). In our case, the whitelist allows only French requests. The blacklist blocks only the listed countries. We'll use the blacklist, like so:
|
||||
@@ -290,7 +290,7 @@ Now it's time to expose Dockge on the internet so you can access and manage your
|
||||
|
||||
::warning
|
||||
|
||||
Dockge does not support multi-factor authentication. Exposing it online could compromise all connected machines. Only do this if you're using an MFA solution like [TinyAuth](/serveex/security/tinyauth) or [Authentik](/serveex/advanced/authentik/). Otherwise, don’t expose it with SWAG. Use a VPN like [Wireguard](/serveex/core/wireguard) instead.
|
||||
Dockge does not support multi-factor authentication. Exposing it online could compromise all connected machines. Only do this if you're using an MFA solution like [TinyAuth](/serveex/security/tinyauth) or [Authentik](/serveex/advanced/authentik/). Otherwise, don’t expose it with SWAG. Use a VPN like [WireGuard](/serveex/core/wireguard) instead.
|
||||
::
|
||||
|
||||
::steps{level="3"}
|
||||
@@ -348,7 +348,7 @@ Save and exit. The configuration will update within a few seconds.
|
||||
|
||||
::note
|
||||
|
||||
By default, SWAG doesn’t recognize the name "dockge". You’ll need to add Dockge’s network to SWAG’s `compose.yml`.
|
||||
By default, SWAG doesn’t recognize the name "dockge". You’ll need to add Dockge’s network to SWAG’s `compose.yaml`.
|
||||
::
|
||||
|
||||
### Add Dockge's network to SWAG
|
||||
@@ -383,14 +383,14 @@ Redeploy the SWAG stack.
|
||||
|
||||
Wait a moment, then visit `https://dockge.mydomain.com` in your browser. You should be redirected to Dockge. You can also check the service status from the dashboard (`http://yourserverip:81` on your local network).
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Exposing Another Service with SWAG
|
||||
SWAG includes templates for most known services, named `servicename.subdomain.conf.sample`. Just create the subdomain in your registrar's DNS zone (like OVH), point it to your main domain via a CNAME, then copy and rename the sample file:
|
||||
|
||||
```bash [Terminal]
|
||||
cd /srv/docker/swag/config/proxy-confs
|
||||
cd /srv/docker/swag/config/nginx/proxy-confs
|
||||
sudo cp servicename.subdomain.conf.sample servicename.subdomain.conf
|
||||
```
|
||||
|
||||
@@ -398,7 +398,7 @@ sudo cp servicename.subdomain.conf.sample servicename.subdomain.conf
|
||||
|
||||
__If the subdomain is not redirected properly__
|
||||
- Open the file and verify the container name in `set $upstream_app containername;`{lang=nginx}
|
||||
- Make sure you added the container's network in SWAG’s `compose.yml`
|
||||
- Make sure you added the container's network in SWAG’s `compose.yaml`
|
||||
::
|
||||
|
||||
You can also customize the subdomain by editing `server_name yoursubdomain.*;`{lang=nginx} and renaming the file to `yoursubdomain.subdomain.conf`.
|
||||
|
||||
@@ -58,7 +58,7 @@ Once created, your token will only be shown once. Save it securely, as it cannot
|
||||
|
||||
You must register for _Cloudflare Teams_ to access the _Zero Trust_ dashboard that manages tunnels and access policies. This is a premium service, but there’s a free plan for up to 50 users, perfect for a home lab. Keep in mind that a valid credit card is required to register, but the free plan incurs no charges.
|
||||
|
||||
Register [via this link](https://dash.teams.cloudflare.com/).
|
||||
Register [via this link](https://one.dash.cloudflare.com/).
|
||||
|
||||
## SWAG Configuration
|
||||
::note
|
||||
@@ -124,6 +124,17 @@ Save with :kbd{value="Ctrl+O"}, then :kbd{value="Enter"}, and exit with :kbd{val
|
||||
|
||||
### Deploy the SWAG stack
|
||||
|
||||
::warning
|
||||
|
||||
This replaces your whole SWAG service definition. If you already added a `networks:` section or `EXTRA_DOMAINS` for other apps (Dockge, TinyAuth, etc.), merge those into the block below instead of pasting over them, or you'll lose that configuration.
|
||||
::
|
||||
|
||||
Make sure the fail2ban database file already exists, or Docker will create a directory in its place instead of mounting the file, silently breaking ban persistence:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo touch /srv/docker/swag/config/fail2ban/fail2ban.sqlite3
|
||||
```
|
||||
|
||||
In Dockge, edit your SWAG stack with this:
|
||||
|
||||
```yaml [compose.yaml]
|
||||
@@ -190,7 +201,7 @@ TUNNEL_PW=
|
||||
| Variable | Value | Example |
|
||||
|----------------|-------------------------------------------------------------|--------------------------------|
|
||||
| `PUID` | User ID (`id username`) | `1000` |
|
||||
| `GUID` | Group ID (`id username`) | `1000` |
|
||||
| `PGID` | Group ID (`id username`) | `1000` |
|
||||
| `DOMAIN` | Your reserved domain | `mondomaine.fr` |
|
||||
| `PLUGIN` | DNS provider (also configure `cloudflare.ini`) | `cloudflare` |
|
||||
| `EMAIL` | Email for the certificate | `you@email.com` |
|
||||
@@ -209,7 +220,7 @@ Then confirm your tunnel appears under _Networks > Tunnels_ in [Cloudflare Zero
|
||||

|
||||
::
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Managing Multiple Tunnels for Multiple Servers
|
||||
@@ -235,7 +246,7 @@ In the [Cloudflare DNS dashboard](https://dash.cloudflare.com/), click your doma
|
||||
| `CNAME` | `subdomain1` | `yourtunnelid1.cfargotunnel.com` |
|
||||
| `CNAME` | `subdomain2` | `yourtunnelid2.cfargotunnel.com` |
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
If you have many subdomains, point them to the above reference subdomains.
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
---
|
||||
title: TinyAuth
|
||||
description: Install TinyAuth, a lightweight forward-auth proxy, and pair it with Pocket ID to add SSO login in front of your self-hosted apps. Protect your app behind Swag with forward-auth.
|
||||
description: Install TinyAuth, a lightweight forward-auth proxy, and pair it with Pocket ID to add SSO login in front of your self-hosted apps. Protect your app behind SWAG with forward-auth.
|
||||
---
|
||||
|
||||
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||
[TinyAuth](https://tinyauth.app) is a small forward-auth proxy: a single login page that Swag can insert in front of any app before letting a request through, checking whether a visitor is authenticated before forwarding them on.
|
||||
[TinyAuth](https://tinyauth.app) is a small forward-auth proxy: a single login page that SWAG can insert in front of any app before letting a request through, checking whether a visitor is authenticated before forwarding them on.
|
||||
|
||||

|
||||
|
||||
It supports a simple local username/password login out of the box, which is what we'll set up here. It can also delegate login to an external OIDC provider like [Pocket ID](/serveex/security/pocket-id) instead, so anyone visiting a protected app authenticates with a passkey via Pocket ID and then gets forwarded through: install Pocket ID afterwards and follow [its guide](/serveex/security/pocket-id#connecting-pocket-id-to-tinyauth) to connect the two.
|
||||
|
||||
- [TinyAuth documentation](https://tinyauth.app/docs)
|
||||
- [TinyAuth documentation](https://tinyauth.app/docs/getting-started)
|
||||
- [TinyAuth on GitHub](https://github.com/tinyauthapp/tinyauth)
|
||||
|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
::file-tree
|
||||
@@ -64,7 +66,7 @@ services:
|
||||
volumes:
|
||||
- /srv/docker/tinyauth/data:/data
|
||||
ports:
|
||||
- 3000:3000
|
||||
- 3002:3000 # host port only, avoids clashing with AdGuard's own 3000
|
||||
```
|
||||
|
||||
::tip{icon=""}
|
||||
@@ -94,9 +96,9 @@ TINYAUTH_AUTH_USERS=
|
||||
| `TINYAUTH_APPURL`{lang=properties} | The public URL you'll use to reach TinyAuth (see exposure below) | `https://tinyauth.mydomain.com` |
|
||||
| `TINYAUTH_AUTH_USERS`{lang=properties} | The hash generated above | `user:$$2a$$10$$UdLYoJ5lgPsC0RKq...` |
|
||||
|
||||
Deploy the stack. The local interface is available at `http://yourserverip:3000`.
|
||||
Deploy the stack. The local interface is available at `http://yourserverip:3002`.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Enabling Two-Factor Authentication
|
||||
@@ -130,12 +132,12 @@ sudo docker run -i -t --rm ghcr.io/tinyauthapp/tinyauth:v5 user verify --interac
|
||||
It re-prompts for the username, password, and current 6-digit code.
|
||||
::
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
From now on, that user needs both their password and a valid code from their authenticator app to log in.
|
||||
|
||||
## Exposing TinyAuth with Swag
|
||||
## Exposing TinyAuth with SWAG
|
||||
TinyAuth needs its own subdomain: it's the page users land on before being forwarded to the app they actually want.
|
||||
|
||||
::note
|
||||
@@ -152,9 +154,9 @@ Go to Dockge and edit SWAG's compose file by adding TinyAuth's network:
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Attach container to custom network
|
||||
networks: # Attach container to custom network
|
||||
# ...
|
||||
- tinyauth # Name of the declared network
|
||||
|
||||
@@ -174,7 +176,7 @@ Here we assume the TinyAuth network name is `tinyauth_default`. You can check th
|
||||
|
||||
### Create the subdomain.conf file
|
||||
|
||||
In the Swag folders, create the file `tinyauth.subdomain.conf`:
|
||||
In the SWAG folders, create the file `tinyauth.subdomain.conf`:
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
✨ __Tip:__ Use **File Browser Quantum** to navigate and edit files instead of using terminal commands.
|
||||
@@ -221,11 +223,11 @@ Wait a few minutes, then open `https://tinyauth.mydomain.com` in your browser an
|
||||
__If it fails:__ check your firewall rules.
|
||||
::
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Protecting an app via reverse proxy
|
||||
Swag doesn't ship a ready-made include file for TinyAuth, so we'll add the forward-auth check directly to the app's own `*.subdomain.conf`. We'll use Dockge as an example.
|
||||
SWAG doesn't ship a ready-made include file for TinyAuth, so we'll add the forward-auth check directly to the app's own `*.subdomain.conf`. We'll use Dockge as an example.
|
||||
|
||||
::steps{level="3"}
|
||||
### Open the app's subdomain.conf file
|
||||
@@ -284,7 +286,7 @@ The `location /tinyauth` block runs inside SWAG's own container, so SWAG needs t
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
That's it! Visiting `https://dockge.mydomain.com` now redirects to TinyAuth first. Repeat this `location /tinyauth` / `auth_request` pattern in any other app's `*.subdomain.conf` to protect it the same way.
|
||||
@@ -299,9 +301,9 @@ Sometimes you want most of an app locked behind TinyAuth, but a handful of paths
|
||||
|
||||
A regex `location` block always takes priority over the plain `location /` block, no matter which one appears first in the file. So any path matched by a regex location you define runs its own `proxy_pass`, without ever reaching the `auth_request /tinyauth;` line in `location /`.
|
||||
|
||||
For example, to leave Uptime-Kuma's public status page and its assets open while protecting everything else:
|
||||
For example, here's how to leave Uptime-Kuma's public status page and its assets open while protecting everything else. Only `api/status-page` is left public, not all of `/api`, since the rest of Uptime-Kuma's API is meant to stay behind authentication; `/metrics` (Uptime-Kuma's Prometheus endpoint) is left out of the regex entirely for the same reason:
|
||||
|
||||
```nginx [dockge.subdomain.conf]{9-16}
|
||||
```nginx [uptime-kuma.subdomain.conf]{9-16}
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
@@ -310,7 +312,7 @@ server {
|
||||
|
||||
include /config/nginx/ssl.conf;
|
||||
|
||||
location ~ ^/(status|assets|icon\.svg|api|upload|metrics) {
|
||||
location ~ ^/(status|assets|icon\.svg|api/status-page|upload) {
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
set $upstream_app uptime-kuma;
|
||||
|
||||
@@ -15,6 +15,8 @@ This makes it a good fit if you just need a simple, fast SSO backend, for exampl
|
||||
- [Pocket ID documentation](https://pocket-id.org/docs)
|
||||
- [Pocket ID on GitHub](https://github.com/pocket-id/pocket-id)
|
||||
|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
::file-tree
|
||||
@@ -63,7 +65,7 @@ services:
|
||||
ports:
|
||||
- 1411:1411
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:1411/healthz"]
|
||||
test: ["CMD", "/app/pocket-id", "healthcheck"]
|
||||
interval: 90s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
@@ -96,11 +98,11 @@ TRUST_PROXY=true
|
||||
|----------|-------|---------|
|
||||
| `APP_URL`{lang=properties} | The public URL you'll use to reach Pocket ID (see exposure below) | `https://id.mydomain.com` |
|
||||
| `ENCRYPTION_KEY`{lang=properties} | The key generated above | `Q2pVEqsTNRkJSO9SkJzU3KZ2...` |
|
||||
| `TRUST_PROXY`{lang=properties} | Required since Pocket ID sits behind Swag | `true` |
|
||||
| `TRUST_PROXY`{lang=properties} | Required since Pocket ID sits behind SWAG | `true` |
|
||||
|
||||
Deploy the stack. The local interface is available at `http://yourserverip:1411`.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## First login
|
||||
@@ -111,10 +113,10 @@ Pocket ID doesn't use passwords: your first account is created with a **passkey*
|
||||
|
||||
::note
|
||||
|
||||
Since `APP_URL` is already set to your future public domain, passkey registration may ask you to open Pocket ID from that domain instead. Expose it first (see below) if setup doesn't complete locally.
|
||||
Passkeys require a secure context: HTTPS, or `localhost`. Registering one from `http://yourserverip:1411` on another machine will be refused by the browser, since that's plain HTTP to a non-`localhost` address. If setup doesn't complete locally, expose Pocket ID first (see below) and finish setup over HTTPS instead.
|
||||
::
|
||||
|
||||
## Exposing Pocket ID with Swag
|
||||
## Exposing Pocket ID with SWAG
|
||||
Other apps need to reach Pocket ID over HTTPS to complete the OIDC login flow, so it must be exposed even if you only use it from home.
|
||||
|
||||
::note
|
||||
@@ -131,9 +133,9 @@ Go to Dockge and edit SWAG's compose file by adding Pocket ID's network:
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Attach container to custom network
|
||||
networks: # Attach container to custom network
|
||||
# ...
|
||||
- pocket-id # Name of the declared network
|
||||
|
||||
@@ -153,7 +155,7 @@ Here we assume the Pocket ID network name is `pocket-id_default`. You can check
|
||||
|
||||
### Create the subdomain.conf file
|
||||
|
||||
In the Swag folders, create the file `id.subdomain.conf`:
|
||||
In the SWAG folders, create the file `id.subdomain.conf`:
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
✨ __Tip:__ Use **File Browser Quantum** to navigate and edit files instead of using terminal commands.
|
||||
@@ -205,7 +207,7 @@ Wait a few minutes, then open `https://id.mydomain.com` in your browser.
|
||||
__If it fails:__ check your firewall rules.
|
||||
::
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Registering an OIDC client
|
||||
@@ -224,12 +226,14 @@ Go to _Administration > OIDC Clients_, then click _Add OIDC Client_. Fill in a n
|
||||
|
||||
Save, then copy the generated __Client ID__ and __Client Secret__. You'll need them in the other app's configuration.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Connecting Pocket ID to TinyAuth
|
||||
[TinyAuth](/serveex/security/tinyauth) can delegate its login to Pocket ID instead of (or alongside) its local username/password, so anyone visiting a protected app authenticates with a passkey and gets forwarded through.
|
||||
|
||||

|
||||
|
||||
::steps{level="3"}
|
||||
### Register TinyAuth as an OIDC client
|
||||
|
||||
@@ -276,7 +280,7 @@ Redeploy the TinyAuth stack. On your next visit to `https://tinyauth.mydomain.co
|
||||
✨ To skip straight to Pocket ID and hide the local login form, add `TINYAUTH_OAUTH_AUTOREDIRECT=pocketid` to the same `.env` file.
|
||||
::
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
That's it! TinyAuth now offers passwordless login via Pocket ID for every app it protects.
|
||||
|
||||
@@ -6,7 +6,9 @@ description: Install Uptime-Kuma to monitor your self-hosted services uptime, se
|
||||
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||

|
||||
[Uptime-Kuma](https://github.com/louislam/uptime-kuma) is a self-hosted monitoring tool that regularly checks whether your other services and sites are up and reachable, and alerts you the moment one goes down. It can also build a public status page to share your services' health with others.
|
||||
|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
@@ -62,10 +64,10 @@ You can now access the tool via `http://yourserverip:3200`.
|
||||
__If it fails:__ check your firewall rules.
|
||||
::
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Expose with Swag
|
||||
## Expose with SWAG
|
||||
::note{icon=""}
|
||||
📋 __Before you begin:__
|
||||
<br/><br/>
|
||||
@@ -74,13 +76,13 @@ We assume you have the subdomain `stats.mydomain.com` with a `CNAME` pointing to
|
||||
|
||||
::warning
|
||||
|
||||
Uptime-Kuma does not use multi-factor authentication. Exposing Uptime-Kuma on the internet could compromise the machines it monitors. Only do this if you're using an MFA system like [TinyAuth](/serveex/security/tinyauth) or [Authentik](/serveex/advanced/authentik/). Otherwise, don’t expose it with SWAG; use a VPN like [Wireguard](/serveex/core/wireguard) instead.
|
||||
Uptime-Kuma does not use multi-factor authentication. Exposing Uptime-Kuma on the internet could compromise the machines it monitors. Only do this if you're using an MFA system like [TinyAuth](/serveex/security/tinyauth) or [Authentik](/serveex/advanced/authentik/). Otherwise, don’t expose it with SWAG; use a VPN like [WireGuard](/serveex/core/wireguard) instead.
|
||||
::
|
||||
|
||||
::steps{level="3"}
|
||||
### Create the subdomain.conf file
|
||||
|
||||
In the Swag folders, create the `stats.subdomain.conf` file.
|
||||
In the SWAG folders, create the `stats.subdomain.conf` file.
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
✨ __Tip for those who dislike the terminal:__
|
||||
@@ -153,9 +155,9 @@ In Dockge, edit the SWAG compose and add the Uptime-Kuma network:
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Link container to custom network
|
||||
networks: # Link container to custom network
|
||||
# ...
|
||||
- uptime-kuma # Name of the declared network
|
||||
|
||||
@@ -173,7 +175,7 @@ Restart the stack and wait until SWAG is fully operational.
|
||||
Here we assume that the network name of Uptime-Kuma is `uptime-kuma_default`. You can verify the connection by visiting SWAG's dashboard at `http://yourserverip:81`.
|
||||
::
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
That's it! Uptime-Kuma is now exposed, and you can access it via `https://stats.mydomain.com`.
|
||||
@@ -190,7 +192,7 @@ sudo nano /srv/docker/swag/config/nginx/proxy-confs/stats.subdomain.conf
|
||||
|
||||
### Add the forward-auth check and public paths
|
||||
|
||||
Replace the file's content with the following. The `location ~ ^/(...)` block matches Uptime-Kuma's public status page and its assets, and is served directly, without ever reaching the `auth_request` check in `location /`:
|
||||
Replace the file's content with the following. The `location ~ ^/(...)` block matches Uptime-Kuma's public status page and its assets, and is served directly, without ever reaching the `auth_request` check in `location /`. Only `api/status-page` is left public, not all of `/api`, since the rest of Uptime-Kuma's API is meant to stay behind authentication; `/metrics` (Uptime-Kuma's Prometheus endpoint) is left out of the regex entirely for the same reason:
|
||||
|
||||
```nginx [stats.subdomain.conf]{9-16,32-33}
|
||||
server {
|
||||
@@ -201,7 +203,7 @@ server {
|
||||
|
||||
include /config/nginx/ssl.conf;
|
||||
|
||||
location ~ ^/(status|assets|icon\.svg|api|upload|metrics) {
|
||||
location ~ ^/(status|assets|icon\.svg|api/status-page|upload) {
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
set $upstream_app uptime-kuma;
|
||||
@@ -245,7 +247,7 @@ The `location /tinyauth` block runs inside SWAG's own container, so SWAG needs t
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
Redeploy the stack. Uptime-Kuma will then be publicly reachable via `https://stats.mydomain.com`, with the status page open and everything else behind TinyAuth.
|
||||
|
||||
@@ -9,7 +9,7 @@ description: Install Dozzle to monitor Docker container logs in real time from a
|
||||
|
||||
[Dozzle](https://dozzle.dev/) is a container that lets you access logs from your other containers and display them in real time through a user-friendly interface. It's a simple way to browse logs and retrieve information from the history.
|
||||
|
||||

|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
@@ -39,14 +39,47 @@ services:
|
||||
image: amir20/dozzle:latest
|
||||
ports:
|
||||
- 9135:8080
|
||||
volumes:
|
||||
- /docker/dozzle/data:/data
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- DOZZLE_HOSTNAME=${DOMAIN}
|
||||
- DOCKER_HOST=tcp://docker-socket-proxy:2375
|
||||
networks:
|
||||
- dozzle-internal
|
||||
depends_on:
|
||||
- docker-socket-proxy
|
||||
|
||||
docker-socket-proxy:
|
||||
image: lscr.io/linuxserver/socket-proxy:latest
|
||||
container_name: docker-socket-proxy-dozzle
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
networks:
|
||||
- dozzle-internal
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
environment:
|
||||
- CONTAINERS=1
|
||||
- IMAGES=1
|
||||
- INFO=1
|
||||
- EVENTS=1
|
||||
- ALLOW_LOGS=1
|
||||
restart: unless-stopped
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /run
|
||||
|
||||
networks:
|
||||
dozzle-internal:
|
||||
name: dozzle-internal
|
||||
```
|
||||
|
||||
::note
|
||||
Dozzle only ever reads container logs, so this config sits **Docker Socket Proxy** in front of the Docker API instead of mounting `/var/run/docker.sock` directly, keeping `POST` disabled entirely: Dozzle can list containers and stream their logs, and nothing else.
|
||||
::
|
||||
|
||||
::tip{icon=""}
|
||||
✨ __Tip:__ Add the watchtower label to each container to automate updates
|
||||
|
||||
@@ -70,17 +103,17 @@ DOMAIN=dozzle.mydomain.com
|
||||
|
||||
Deploy the container. Go to `http://yourserverip:9135`. Voilà, your Dozzle web UI is up and running!
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Exposing Dozzle with Swag
|
||||
## Exposing Dozzle with SWAG
|
||||
|
||||
::warning
|
||||
|
||||
Dozzle does not use multi-factor authentication. Exposing Dozzle to the internet could compromise the connected machines. Only do this if you use a multi-factor authentication system like [TinyAuth](/serveex/security/tinyauth) or [Authentik](/serveex/advanced/authentik/). Otherwise, do not expose it with SWAG and instead use a VPN like [Wireguard](/serveex/core/wireguard).
|
||||
Dozzle does not use multi-factor authentication. Exposing Dozzle to the internet could compromise the connected machines. Only do this if you use a multi-factor authentication system like [TinyAuth](/serveex/security/tinyauth) or [Authentik](/serveex/advanced/authentik/). Otherwise, do not expose it with SWAG and instead use a VPN like [WireGuard](/serveex/core/wireguard).
|
||||
::
|
||||
|
||||
You may want to access Dozzle remotely and on all your devices. To do so, we’ll expose Dozzle via Swag.
|
||||
You may want to access Dozzle remotely and on all your devices. To do so, we’ll expose Dozzle via SWAG.
|
||||
|
||||
::note{icon=""}
|
||||
📋 __Before you begin:__
|
||||
@@ -97,9 +130,9 @@ Go to Dockge and edit the SWAG compose file to add Dozzle’s network:
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Connects the container to a custom network
|
||||
networks: # Connects the container to a custom network
|
||||
# ...
|
||||
- dozzle # Network name declared in the stack
|
||||
|
||||
@@ -119,7 +152,7 @@ We assume the Dozzle network name is `dozzle_default`. You can verify the connec
|
||||
|
||||
### Create the subdomain.conf file
|
||||
|
||||
In the Swag folder, create the `dozzle.subdomain.conf` file.
|
||||
In the SWAG folder, create the `dozzle.subdomain.conf` file.
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
✨ __Tip:__ You can use **File Browser Quantum** to browse and edit files instead of using terminal commands.
|
||||
@@ -183,7 +216,7 @@ server {
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
And there you go, Dozzle is now exposed!
|
||||
|
||||
@@ -56,7 +56,7 @@ services:
|
||||
- ${PORT}:80
|
||||
environment:
|
||||
- PUID=${PUID}
|
||||
- PGID=${GUID}
|
||||
- PGID=${PGID}
|
||||
- TZ=Europe/Paris
|
||||
- APP_KEY=${API_KEY}
|
||||
- DB_CONNECTION=sqlite
|
||||
@@ -67,19 +67,19 @@ services:
|
||||
|
||||
### Set your environment variables
|
||||
|
||||
Find your `PUID` and `GUID` by running the following command:
|
||||
Find your `PUID` and `PGID` by running the following command:
|
||||
|
||||
```bash [Terminal]
|
||||
id yourusername
|
||||
```
|
||||
|
||||
In the `.env` file, set the variable `API_KEY` with the key you generated and add a cron-style test schedule, as well as your `PUID` and `GUID`, for example:
|
||||
In the `.env` file, set the variable `API_KEY` with the key you generated and add a cron-style test schedule, as well as your `PUID` and `PGID`, for example:
|
||||
|
||||
```properties [.env]
|
||||
SCHEDULE=15 */6 * * * # every 6 hours
|
||||
API_KEY=base64:zihejehkj8_nzhY/OjeieR= # your key
|
||||
PUID=1000
|
||||
GUID=1000
|
||||
PGID=1000
|
||||
PORT=3225 # port to access the web UI
|
||||
```
|
||||
|
||||
@@ -87,9 +87,9 @@ PORT=3225 # port to access the web UI
|
||||
✨ **Tip:** You can configure additional environment variables by referring to the **official documentation**.
|
||||
::
|
||||
|
||||
Deploy the container and go to `http://yourserverip:3225`. Log in with the account `admin@exemple.com` and the password `password`. Don’t forget to change your ID and password once logged in!
|
||||
Deploy the container and go to `http://yourserverip:3225`. Log in with the account `admin@example.com` and the password `password`. Don’t forget to change your ID and password once logged in!
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Exposing Speedtest Tracker with SWAG
|
||||
@@ -102,7 +102,7 @@ Now we want to expose Speedtest Tracker to the internet so you can access it rem
|
||||
|
||||
::warning
|
||||
|
||||
Speedtest Tracker does not use multi-factor authentication. Exposing it on the internet could compromise connected devices. Do so only if you use a multi-factor system like [TinyAuth](/serveex/security/tinyauth) or [Authentik](/serveex/advanced/authentik/). Otherwise, avoid using SWAG and prefer a VPN like [Wireguard](/serveex/core/wireguard).
|
||||
Speedtest Tracker does not use multi-factor authentication. Exposing it on the internet could compromise connected devices. Do so only if you use a multi-factor system like [TinyAuth](/serveex/security/tinyauth) or [Authentik](/serveex/advanced/authentik/). Otherwise, avoid using SWAG and prefer a VPN like [WireGuard](/serveex/core/wireguard).
|
||||
::
|
||||
|
||||
::steps{level="3"}
|
||||
@@ -165,7 +165,7 @@ Save and exit. The configuration will update in a few seconds.
|
||||
|
||||
::note
|
||||
|
||||
By default, SWAG doesn’t know the name "speedtest-tracker". To allow access, you need to add Speedtest Tracker’s network to SWAG’s `compose.yml`.
|
||||
By default, SWAG doesn’t know the name "speedtest-tracker". To allow access, you need to add Speedtest Tracker’s network to SWAG’s `compose.yaml`.
|
||||
::
|
||||
|
||||
Go to Dockge, and edit SWAG’s compose to include Speedtest Tracker’s network:
|
||||
@@ -194,7 +194,7 @@ Restart the stack by clicking "Deploy" and wait for SWAG to be fully up.
|
||||
This assumes the Speedtest Tracker network is named `speedtest-tracker_default`. You can verify the connection by visiting SWAG’s dashboard at `http://yourserverip:81`.
|
||||
::
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
Wait a moment, then visit `https://speedtest.yourdomain.com` in your browser. You should be redirected to Speedtest Tracker. You can check service status via the dashboard (`http://yourserverip:81` from the local network).
|
||||
|
||||
@@ -53,13 +53,35 @@ services:
|
||||
network_mode: host
|
||||
volumes:
|
||||
- ./socket:/beszel_socket
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
environment:
|
||||
LISTEN: /beszel_socket/beszel.sock
|
||||
DOCKER_HOST: tcp://127.0.0.1:2375
|
||||
# Do not remove quotes around the key
|
||||
KEY: ${KEY}
|
||||
depends_on:
|
||||
- docker-socket-proxy
|
||||
|
||||
docker-socket-proxy:
|
||||
image: lscr.io/linuxserver/socket-proxy:latest
|
||||
container_name: docker-socket-proxy-beszel
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
ports:
|
||||
- 127.0.0.1:2375:2375
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
environment:
|
||||
- CONTAINERS=1
|
||||
restart: unless-stopped
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /run
|
||||
```
|
||||
|
||||
::note
|
||||
`beszel-agent` runs with `network_mode: host`, so it can't join a dedicated internal network like the other proxied stacks on this site; instead, **Docker Socket Proxy** publishes its API on `127.0.0.1` only, reachable from the agent via the host's own loopback interface, with just `CONTAINERS=1` enabled since the agent only needs to read container stats.
|
||||
::
|
||||
|
||||
::tip{icon=""}
|
||||
✨ __Tip:__ Add the Watchtower label to each container to automate updates.
|
||||
|
||||
@@ -86,7 +108,7 @@ For the `KEY` value, you'll need to launch Beszel once to get it.
|
||||
|
||||
Deploy the container and go to `http://yourserverip:8090`. Your Beszel web UI is now accessible!
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
::caution
|
||||
@@ -122,11 +144,28 @@ services:
|
||||
container_name: beszel-agent
|
||||
restart: unless-stopped
|
||||
network_mode: host
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
environment:
|
||||
LISTEN: ${PORT}
|
||||
KEY: ${KEY}
|
||||
DOCKER_HOST: tcp://127.0.0.1:2375
|
||||
depends_on:
|
||||
- docker-socket-proxy
|
||||
|
||||
docker-socket-proxy:
|
||||
image: lscr.io/linuxserver/socket-proxy:latest
|
||||
container_name: docker-socket-proxy-beszel
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
ports:
|
||||
- 127.0.0.1:2375:2375
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
environment:
|
||||
- CONTAINERS=1
|
||||
restart: unless-stopped
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /run
|
||||
```
|
||||
|
||||
And in `.env`:
|
||||
@@ -143,14 +182,14 @@ Deploy the stack on the remote server. Data will begin flowing into the web UI a
|
||||
__If it fails:__ check your firewall rules.
|
||||
::
|
||||
|
||||
## Expose Beszel with Swag
|
||||
## Expose Beszel with SWAG
|
||||
|
||||
::warning
|
||||
|
||||
Beszel does not support multi-factor authentication. Exposing it on the internet could compromise connected machines. Only do this if you're using a system like [TinyAuth](/serveex/security/tinyauth) or [Authentik](/serveex/advanced/authentik/). Otherwise, do not expose with SWAG. Use a VPN like [Wireguard](/serveex/core/wireguard) instead.
|
||||
Beszel does not support multi-factor authentication. Exposing it on the internet could compromise connected machines. Only do this if you're using a system like [TinyAuth](/serveex/security/tinyauth) or [Authentik](/serveex/advanced/authentik/). Otherwise, do not expose with SWAG. Use a VPN like [WireGuard](/serveex/core/wireguard) instead.
|
||||
::
|
||||
|
||||
If you want to access Beszel remotely from all your devices, expose it using Swag.
|
||||
If you want to access Beszel remotely from all your devices, expose it using SWAG.
|
||||
|
||||
::note{icon="" to="/general/networking/nat"}
|
||||
📋 __Prerequisite:__
|
||||
@@ -161,15 +200,15 @@ You must have created a DNS subdomain like `beszel.mydomain.com` with a `CNAME`
|
||||
::steps{level="3"}
|
||||
### Add Beszel's network to SWAG
|
||||
|
||||
In Dockge, edit Swag's compose file and add Beszel’s network:
|
||||
In Dockge, edit SWAG's compose file and add Beszel’s network:
|
||||
|
||||
```yaml [compose.yaml]
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks:
|
||||
networks:
|
||||
# ...
|
||||
- beszel # network declared in the stack
|
||||
|
||||
@@ -180,16 +219,16 @@ networks:
|
||||
external: true
|
||||
```
|
||||
|
||||
Redeploy the stack and wait for Swag to become fully operational.
|
||||
Redeploy the stack and wait for SWAG to become fully operational.
|
||||
|
||||
::note
|
||||
|
||||
We assume the network name is `beszel_default`. You can check connectivity by visiting Swag's dashboard at `http://yourserverip:81`.
|
||||
We assume the network name is `beszel_default`. You can check connectivity by visiting SWAG's dashboard at `http://yourserverip:81`.
|
||||
::
|
||||
|
||||
### Create the subdomain.conf file
|
||||
|
||||
In Swag’s config folders, create `beszel.subdomain.conf`.
|
||||
In SWAG’s config folders, create `beszel.subdomain.conf`.
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
✨ __Tip:__ Use **File Browser Quantum** to browse and edit files instead of terminal commands.
|
||||
@@ -247,7 +286,7 @@ server {
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
That’s it! Beszel is now exposed!
|
||||
|
||||
@@ -8,7 +8,7 @@ description: Install UpSnap to remotely wake up machines on your local network v
|
||||
|
||||
[UpSnap](https://github.com/seriousm4x/UpSnap) is a container that allows you to remotely power on, shut down, or put your machines to sleep. It mainly uses Wake-On-Lan (WoL) over the network and offers advanced features.
|
||||
|
||||

|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
@@ -71,13 +71,13 @@ services:
|
||||
Fill in the `.env`, for example:
|
||||
|
||||
```properties [.env]
|
||||
RANGE=192.168.1.0/24 # scans all devices on the local network with an IP between 192.168.0.1 and 192.168.1.255
|
||||
SCAN_RANGE=192.168.1.0/24 # scans all devices on the local network with an IP between 192.168.1.1 and 192.168.1.254
|
||||
DNS=192.168.1.1 # DNS IP to resolve domain names, typically your router’s IP
|
||||
```
|
||||
|
||||
Deploy the container and go to `http://yourserverip:8095`. Just follow the steps to create your account!
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
::caution
|
||||
@@ -85,14 +85,14 @@ Deploy the container and go to `http://yourserverip:8095`. Just follow the steps
|
||||
__If it fails:__ check your firewall rules.
|
||||
::
|
||||
|
||||
## Exposing UpSnap with Swag
|
||||
## Exposing UpSnap with SWAG
|
||||
|
||||
::warning
|
||||
|
||||
UpSnap does not support multi-factor authentication. Exposing it on the internet could compromise connected machines. Do this only if you're using a multi-factor authentication system like [TinyAuth](/serveex/security/tinyauth) or [Authentik](/serveex/advanced/authentik/). Otherwise, avoid exposing it with SWAG and use a VPN like [Wireguard](/serveex/core/wireguard) instead.
|
||||
UpSnap does not support multi-factor authentication. Exposing it on the internet could compromise connected machines. Do this only if you're using a multi-factor authentication system like [TinyAuth](/serveex/security/tinyauth) or [Authentik](/serveex/advanced/authentik/). Otherwise, avoid exposing it with SWAG and use a VPN like [WireGuard](/serveex/core/wireguard) instead.
|
||||
::
|
||||
|
||||
You may want to access it remotely from all your devices. To do so, we'll expose UpSnap via Swag.
|
||||
You may want to access it remotely from all your devices. To do so, we'll expose UpSnap via SWAG.
|
||||
|
||||
::note{icon=""}
|
||||
📋 __Beforehand:__
|
||||
@@ -101,37 +101,30 @@ We assume you've created a subdomain in your [DNS zone](/general/networking/dns)
|
||||
::
|
||||
|
||||
::steps{level="3"}
|
||||
### Add UpSnap's network to SWAG
|
||||
### Make the host reachable from SWAG
|
||||
|
||||
Go to Dockge, and edit the SWAG compose by adding the UpSnap network:
|
||||
UpSnap runs with `network_mode: host` (needed for Wake-on-LAN broadcasts and network scanning to work reliably), so it never joins a Docker network SWAG could attach to like other stacks. Instead, give SWAG a way to reach the host itself:
|
||||
|
||||
```yaml [compose.yaml]
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Connects the container to the custom network
|
||||
# ...
|
||||
- upsnap # Network name declared in the stack
|
||||
|
||||
networks: # Defines the custom network
|
||||
# ...
|
||||
upsnap: # Network name declared in the stack
|
||||
name: upsnap_default # Actual name of the external network
|
||||
external: true # Indicates it's an external network
|
||||
container_name: # ...
|
||||
# ...
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway" # resolves to the Docker host's own IP
|
||||
```
|
||||
|
||||
Restart the stack by clicking "deploy" and wait for SWAG to be fully operational.
|
||||
|
||||
::note
|
||||
|
||||
Here we assume the network name for upsnap is `upsnap_default`. You can check the connection in the SWAG dashboard at `http://yourserverip:81`.
|
||||
`host-gateway` is a special value Docker resolves to the host machine's IP automatically, so this works regardless of your server's actual address.
|
||||
::
|
||||
|
||||
### Create the subdomain.conf file
|
||||
|
||||
In the Swag folders, create the file `upsnap.subdomain.conf`.
|
||||
In the SWAG folders, create the file `upsnap.subdomain.conf`.
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
✨ __Tip:__ You can use **File Browser Quantum** to navigate your files and edit documents instead of using terminal commands.
|
||||
@@ -184,7 +177,7 @@ server {
|
||||
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
set $upstream_app upsnap;
|
||||
set $upstream_app host.docker.internal;
|
||||
set $upstream_port 8095;
|
||||
set $upstream_proto http;
|
||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
@@ -195,7 +188,7 @@ server {
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
And that’s it! You’ve exposed UpSnap!
|
||||
@@ -262,7 +255,7 @@ server {
|
||||
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
set $upstream_app upsnap;
|
||||
set $upstream_app host.docker.internal;
|
||||
set $upstream_port 8095;
|
||||
set $upstream_proto http;
|
||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
|
||||
@@ -16,7 +16,7 @@ As always, we'll use the [linuxserver.io image](https://docs.linuxserver.io/imag
|
||||
|
||||
::note{to="/serveex/core/wireguard"}
|
||||
|
||||
Unlike Plex, Jellyfin has no cloud relay: to access your server outside your local network, you must expose it yourself (see below), or use a VPN like **Wireguard**.
|
||||
Unlike Plex, Jellyfin has no cloud relay: to access your server outside your local network, you must expose it yourself (see below), or use a VPN like **WireGuard**.
|
||||
::
|
||||
|
||||
## Install Jellyfin
|
||||
@@ -44,7 +44,7 @@ tree:
|
||||
Create the `movies`, `tvseries`, and `library` folders in `/media`:
|
||||
|
||||
```bash [Terminal]
|
||||
mkdir -p /media/movies /media/library /media/tvseries
|
||||
mkdir -p /media/movies /media/tvseries /media/library
|
||||
```
|
||||
|
||||
### Deploy the stack
|
||||
@@ -59,7 +59,7 @@ services:
|
||||
container_name: jellyfin
|
||||
environment:
|
||||
- PUID=${PUID}
|
||||
- PGID=${GUID}
|
||||
- PGID=${PGID}
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- /srv/docker/jellyfin/config:/config
|
||||
@@ -86,7 +86,7 @@ services:
|
||||
|
||||
### Set your environment variables
|
||||
|
||||
Find your PUID and GUID by running:
|
||||
Find your PUID and PGID by running:
|
||||
|
||||
```bash [Terminal]
|
||||
id username
|
||||
@@ -96,7 +96,7 @@ Fill in your `.env` file with the retrieved values, for example:
|
||||
|
||||
```properties [.env]
|
||||
PUID=1000
|
||||
GUID=1000
|
||||
PGID=1000
|
||||
```
|
||||
|
||||
Deploy the stack. The local interface is available at `http://yourserverip:8096`.
|
||||
@@ -106,7 +106,7 @@ Deploy the stack. The local interface is available at `http://yourserverip:8096`
|
||||
The `/dev/dri` device is only needed for hardware-accelerated transcoding on Intel/AMD GPUs. Remove it if your server doesn't have one, or adapt it for an NVIDIA GPU following **linuxserver.io's documentation**.
|
||||
::
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Configure Jellyfin
|
||||
@@ -160,7 +160,7 @@ Then uncheck any codec your specific GPU doesn't support hardware-decode for. [I
|
||||
|
||||
Further down the same page, enable **Tone mapping**. This only takes effect once the OpenCL mod above is installed and the stack redeployed; enabling it without that step first will make HDR transcodes fail instead of just skipping the tone mapping.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Watching at Home
|
||||
@@ -229,7 +229,7 @@ Replace `10.8.0.2` with whatever address your server actually got. Leaving the d
|
||||
A `.conf` file is a credential, not just a settings file: whoever has it can connect to your VPN as that device. Once it's imported, delete it from the USB drive (and anywhere else you copied it, like Downloads folders), and never share it with anyone else.
|
||||
::
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
### Restricting a third-party peer to just Jellyfin
|
||||
@@ -258,7 +258,7 @@ docker exec wg-easy iptables -L WG_CLIENTS -n -v
|
||||
|
||||
You should see an `ACCEPT` line for that peer's IP pointing only at your Jellyfin server, followed by a catch-all `DROP`.
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
Once connected, open the Jellyfin app or `http://10.8.0.2:8096` (your server's VPN address) from that device. Only traffic to that address goes through the VPN; the rest of the device's connection is untouched.
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
---
|
||||
title: Qbittorrent
|
||||
title: qBittorrent
|
||||
description: Install qBittorrent with Gluetun and ProtonVPN to download torrents securely behind a VPN on your self-hosted server.
|
||||
---
|
||||
|
||||
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||

|
||||

|
||||
|
||||
To safely download your favorite media, we'll build a system using:
|
||||
|
||||
- [Qbittorrent](https://github.com/linuxserver/docker-qbittorrent) as the BitTorrent client
|
||||
- [qBittorrent](https://github.com/linuxserver/docker-qbittorrent) as the BitTorrent client
|
||||
- [Proton VPN Plus](https://protonvpn.com/torrenting), a VPN to secure your traffic. You need a subscription (promos available) to access the BitTorrent protocol. You can also use another VPN as long as it supports BitTorrent.
|
||||
- [Gluetun](https://github.com/qdm12/gluetun)
|
||||
- [Qbittorrent port update](https://codeberg.org/TechnoSam/qbittorrent-gluetun-port-update) to automatically update the VPN port (which changes regularly).
|
||||
- [qBittorrent port update](https://codeberg.org/TechnoSam/qbittorrent-gluetun-port-update) to automatically update the VPN port (which changes regularly).
|
||||
- The [VueTorrent](https://github.com/gabe565/linuxserver-mod-vuetorrent) mod for a modern and intuitive UI.
|
||||
|
||||
Here’s the system we’ll set up:
|
||||
|
||||

|
||||

|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -34,7 +34,7 @@ tree:
|
||||
- gluetun/
|
||||
- compose.yaml
|
||||
- .env
|
||||
- "media # linked to Jellyfin and Qbittorrent":
|
||||
- "media # linked to Jellyfin and qBittorrent":
|
||||
- "downloads/ # generic downloads, selected in settings"
|
||||
- "movies/ # used for downloading movies"
|
||||
- "tvseries/ # used for downloading TV shows"
|
||||
@@ -47,7 +47,7 @@ tree:
|
||||
If not already done, create the `downloads` folder under `/media`:
|
||||
|
||||
```bash [Terminal]
|
||||
mkdir -P /media/downloads
|
||||
mkdir -p /media/downloads
|
||||
```
|
||||
|
||||
### Deploy the stack
|
||||
@@ -67,7 +67,7 @@ services:
|
||||
- DOCKER_MODS=ghcr.io/gabe565/linuxserver-mod-vuetorrent|ghcr.io/t-anc/gsp-qbittorent-gluetun-sync-port-mod:main
|
||||
- TZ=Europe/Paris
|
||||
- PUID=${PUID}
|
||||
- PGID=${GUID}
|
||||
- PGID=${PGID}
|
||||
- WEBUI_PORT=${UI_PORT}
|
||||
- GSP_GTN_API_KEY=${GSP_KEY}
|
||||
- GSP_QBT_USERNAME=${ID}
|
||||
@@ -88,7 +88,7 @@ services:
|
||||
devices:
|
||||
- /dev/net/tun:/dev/net/tun
|
||||
ports:
|
||||
- ${UI_PORT}:5695 # Port de la web-ui
|
||||
- ${UI_PORT}:${UI_PORT} # Port de la web-ui
|
||||
- 8000:8000 # Port de controle de Gluetun
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
@@ -122,7 +122,7 @@ services:
|
||||
|
||||
### Configure the download port update
|
||||
|
||||
Before editing the `.env` in Dockge, let's configure the download port update. Proton and most VPNs rotate the forwarding port, which must be communicated to Qbittorrent.
|
||||
Before editing the `.env` in Dockge, let's configure the download port update. Proton and most VPNs rotate the forwarding port, which must be communicated to qBittorrent.
|
||||
|
||||
We’ve added the mod `ghcr.io/t-anc/gsp-qbittorent-gluetun-sync-port-mod` to the container.
|
||||
|
||||
@@ -164,7 +164,7 @@ In Dockge, fill in the variables in `.env`:
|
||||
|
||||
```properties [.env]
|
||||
PUID=
|
||||
GUID=
|
||||
PGID=
|
||||
UI_PORT=
|
||||
PR_KEY=
|
||||
GSP_KEY= # the key you generated and entered in config.toml
|
||||
@@ -177,14 +177,14 @@ Detailed info:
|
||||
| Variable | Description | Example |
|
||||
|------------|-------------|---------|
|
||||
| `PUID` | User ID (`id yourusername`) | `1000` |
|
||||
| `GUID` | Group ID (`id yourusername`) | `1000` |
|
||||
| `PGID` | Group ID (`id yourusername`) | `1000` |
|
||||
| `UI_PORT` | Port for accessing the web UI | `5695` |
|
||||
| `PR_KEY` | Private key from Proton | `buKsjNHLyzKMM1qYnzOy4s7SHfly` |
|
||||
| `GSP_KEY` | Key you generated for port update | `MnBa47MeVmk7xiv` |
|
||||
| `ID` | Qbittorrent UI login username | `user` |
|
||||
| `PW` | Qbittorrent UI password | `password` |
|
||||
| `ID` | qBittorrent UI login username | `user` |
|
||||
| `PW` | qBittorrent UI password | `password` |
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Deployment
|
||||
@@ -194,7 +194,7 @@ Detailed info:
|
||||
|
||||
Once done, deploy the container.
|
||||
|
||||
::note{to="/serveex/core/docker/#dockge"}
|
||||
::note{to="/serveex/core/docker#install-dockge-to-manage-and-deploy-containers"}
|
||||
|
||||
**Startup logs will show a temporary password for `admin` user.**
|
||||
See logs in **Dockge** to retrieve it, or type this command in a terminal:
|
||||
@@ -214,10 +214,10 @@ __If login fails:__ check your firewall rules.
|
||||
|
||||
Change your username and password in the "webui" settings.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
You're done! In Qbittorrent settings, under "Downloads", set `/media/downloads` as the default folder.
|
||||
You're done! In qBittorrent settings, under "Downloads", set `/media/downloads` as the default folder.
|
||||
|
||||
When adding a download, remember to select the proper directory so Jellyfin can sync correctly (`/media/movies` or `/media/tvseries`). You can also automate this with categories and folders.
|
||||
|
||||
@@ -225,10 +225,10 @@ When adding a download, remember to select the proper directory so Jellyfin can
|
||||
|
||||
::warning
|
||||
|
||||
Qbittorrent does not support multi-factor authentication. Exposing it to the internet may put your system at risk. Only do this if you use MFA via [TinyAuth](/serveex/security/tinyauth) or [Authentik](/serveex/advanced/authentik/). Otherwise, don’t expose it with SWAG. Use a VPN like [Wireguard](/serveex/core/wireguard) instead.
|
||||
qBittorrent does not support multi-factor authentication. Exposing it to the internet may put your system at risk. Only do this if you use MFA via [TinyAuth](/serveex/security/tinyauth) or [Authentik](/serveex/advanced/authentik/). Otherwise, don’t expose it with SWAG. Use a VPN like [WireGuard](/serveex/core/wireguard) instead.
|
||||
::
|
||||
|
||||
To start downloads from outside your home, without a VPN, you can expose the Qbittorrent web UI.
|
||||
To start downloads from outside your home, without a VPN, you can expose the qBittorrent web UI.
|
||||
|
||||
::note
|
||||
|
||||
@@ -321,7 +321,7 @@ server {
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
set $upstream_app gluetun;
|
||||
set $upstream_port 5555;
|
||||
set $upstream_port 5695;
|
||||
set $upstream_proto http;
|
||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
|
||||
@@ -331,12 +331,12 @@ server {
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
Wait a few minutes, then go to `https://seedbox.mydomain.com`. You should land on the Qbittorrent interface.
|
||||
Wait a few minutes, then go to `https://seedbox.mydomain.com`. You should land on the qBittorrent interface.
|
||||
|
||||
## Protecting Qbittorrent with TinyAuth
|
||||
## Protecting qBittorrent with TinyAuth
|
||||
Add [TinyAuth](/serveex/security/tinyauth)'s forward-auth check directly to `seedbox.subdomain.conf`, the same way as [the TinyAuth guide](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy):
|
||||
|
||||
```nginx [seedbox.subdomain.conf]{26-38,41-42}
|
||||
@@ -399,7 +399,7 @@ server {
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
set $upstream_app gluetun;
|
||||
set $upstream_port 5555;
|
||||
set $upstream_port 5695;
|
||||
set $upstream_proto http;
|
||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
|
||||
@@ -418,4 +418,4 @@ The `location /tinyauth` block runs inside SWAG's own container, so SWAG needs t
|
||||
|
||||
And that’s it! You now have a ready-to-use media center.
|
||||
|
||||

|
||||

|
||||
|
||||
@@ -26,7 +26,7 @@ tree:
|
||||
- srv:
|
||||
- docker:
|
||||
- jellyfin:
|
||||
- compose.yml
|
||||
- compose.yaml
|
||||
- .env
|
||||
- config/
|
||||
- sonarr:
|
||||
@@ -49,7 +49,7 @@ tree:
|
||||
|
||||
::warning
|
||||
|
||||
__Warning:__ Make sure to follow this file structure carefully, especially the `media` folder. This folder must be mounted **exactly the same way** in both the _Qbittorrent_ compose file (`/your/path/media:/media`) and the _arr_ applications. If not, the _arr_ apps may not recognize the path provided by Qbittorrent and will fail to create _hardlinks_. Without hardlinks, the _arr_ apps will copy the files instead, **doubling the space used** on your storage.
|
||||
__Warning:__ Make sure to follow this file structure carefully, especially the `media` folder. This folder must be mounted **exactly the same way** in both the _Qbittorrent_ compose file (`/your/path/media:/media`) and the _arr_ applications. If not, the _arr_ apps may not recognize the path provided by qBittorrent and will fail to create _hardlinks_. Without hardlinks, the _arr_ apps will copy the files instead, **doubling the space used** on your storage.
|
||||
::
|
||||
|
||||
::steps{level="3"}
|
||||
@@ -133,8 +133,8 @@ services:
|
||||
container_name: bazarr
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- PUID=${PUID}
|
||||
- PGID=${PGID}
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- /srv/docker/bazarr/config:/config
|
||||
@@ -162,15 +162,15 @@ Set your `.env` file with the variables below:
|
||||
|
||||
```properties [.env]
|
||||
PUID=
|
||||
GUID=
|
||||
PGID=
|
||||
MEDIA_PATH=
|
||||
```
|
||||
|
||||
| Variable | Description | Example |
|
||||
|----------------|-------------------------------------------------------------------------------------------------|-------------|
|
||||
| `PUID` | Set using your user info (check with `id yourusername`) | `1000` |
|
||||
| `GUID` | Same as above | `1000` |
|
||||
| `MEDIA_PATH` | Path to your media folder, here: `/media`. It must match the one used by Qbittorrent. | `/media` |
|
||||
| `PGID` | Same as above | `1000` |
|
||||
| `MEDIA_PATH` | Path to your media folder, here: `/media`. It must match the one used by qBittorrent. | `/media` |
|
||||
|
||||
::note
|
||||
|
||||
@@ -183,7 +183,7 @@ sudo chown -R 1000:1000 /srv/docker/seerr/config
|
||||
|
||||
Deploy the stack.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
### Configure Radarr
|
||||
@@ -207,7 +207,7 @@ Create an account and choose *forms login*.
|
||||
|
||||
::warning
|
||||
|
||||
__Warning:__ If you already have movies in `movies` from Qbittorrent, do not let Radarr add them. Radarr might modify them, which could stop seeding in Qbittorrent.
|
||||
__Warning:__ If you already have movies in `movies` from qBittorrent, do not let Radarr add them. Radarr might modify them, which could stop seeding in qBittorrent.
|
||||
::
|
||||
|
||||
#### Configure Profiles
|
||||
@@ -216,12 +216,12 @@ Go to *Settings > Profiles*. These are your default quality profiles. When you m
|
||||
|
||||

|
||||
|
||||
#### Add Qbittorrent
|
||||
#### Add qBittorrent
|
||||
|
||||
In *Settings > Download Clients*, add Qbittorrent.
|
||||
In *Settings > Download Clients*, add qBittorrent.
|
||||
|
||||
- Use your server IP as *Host* and port `5695` if following this guide.
|
||||
- Provide your Qbittorrent *Username* and *Password*.
|
||||
- Provide your qBittorrent *Username* and *Password*.
|
||||
- Click *Test*.
|
||||
- If successful, click *Save*.
|
||||
|
||||
@@ -240,7 +240,7 @@ Then, in Radarr, go to *Settings > Connect*, add a new connection and choose *Je
|
||||
|
||||
- Go to *Settings > General* and copy your *API Key* for later use.
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
### Configure Sonarr
|
||||
@@ -280,7 +280,7 @@ In *Settings > Apps*, add Radarr and Sonarr with the following details:
|
||||
- API Key: use the one copied from Radarr and Sonarr.
|
||||
- Click *Test*, then *Save* if all goes well.
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
### Configuring Bazarr
|
||||
@@ -325,7 +325,7 @@ Go to *Settings > General* and create a username and password using *forms login
|
||||
|
||||
Repeat the same steps for Radarr.
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
### Configuring Seerr
|
||||
@@ -378,7 +378,7 @@ If the test succeeds, continue filling in the fields:
|
||||
- Check all 4 boxes at the bottom.
|
||||
- Save and continue.
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
And that’s it! Just request a movie or series, then check in qBittorrent or Radarr/Sonarr. Within a few minutes, your media will be available on Jellyfin!
|
||||
@@ -389,12 +389,12 @@ It can be useful to expose Seerr if you want to send requests from outside your
|
||||
|
||||
::warning
|
||||
|
||||
Seerr has no built-in two-factor authentication. Only expose it if you're using a secure authentication solution like [TinyAuth](/serveex/security/tinyauth) or [Authentik](/serveex/advanced/authentik). Otherwise, don't expose it with SWAG, use a VPN like [Wireguard](/serveex/core/wireguard) instead.
|
||||
Seerr has no built-in two-factor authentication. Only expose it if you're using a secure authentication solution like [TinyAuth](/serveex/security/tinyauth) or [Authentik](/serveex/advanced/authentik). Otherwise, don't expose it with SWAG, use a VPN like [WireGuard](/serveex/core/wireguard) instead.
|
||||
::
|
||||
|
||||
::note
|
||||
|
||||
We assume you have the subdomain `films.mydomain.com` with a `CNAME` pointing to `films.fr` in your [DNS zone](/general/networking/dns). And that [unless you’re using Cloudflare Zero Trust](/serveex/security/cloudflare), port `443` on your router is forwarded to port `443` on your server via [NAT rules](/general/networking/nat).
|
||||
We assume you have the subdomain `films.mydomain.com` with a `CNAME` pointing to `mydomain.com` in your [DNS zone](/general/networking/dns). And that [unless you’re using Cloudflare Zero Trust](/serveex/security/cloudflare), port `443` on your router is forwarded to port `443` on your server via [NAT rules](/general/networking/nat).
|
||||
::
|
||||
|
||||
::steps{level="3"}
|
||||
@@ -406,9 +406,9 @@ Go to Dockge, edit the SWAG compose file, and add the Seerr network, which is th
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Connects the container to a custom network
|
||||
networks: # Connects the container to a custom network
|
||||
# ...
|
||||
- jellyfin # Name of the network declared in the stack
|
||||
|
||||
@@ -503,7 +503,7 @@ Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ct
|
||||
|
||||
Wait a few minutes, then visit `http://films.mydomain.com` in your browser.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
::caution
|
||||
|
||||
@@ -8,7 +8,7 @@ description: Install Immich, a self-hosted alternative to Google Photos and iClo
|
||||
|
||||
[Immich](https://immich.app/docs/overview/introduction) is a self-hosted photo and video management solution that replaces cloud services like Google Photos or iCloud. It offers powerful features like face recognition and geolocation.
|
||||
|
||||

|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
@@ -50,7 +50,7 @@ If you're using a NAS or a network-shared drive via **Samba** to store your data
|
||||
|
||||
Deploy the container. You can connect and follow the setup instructions at `http://yourserverip:2283`.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Exposing Immich with SWAG
|
||||
@@ -71,9 +71,9 @@ In Dockge, open the SWAG stack and edit the compose file to add Immich's network
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Connects the container to the custom network
|
||||
networks: # Connects the container to the custom network
|
||||
# ...
|
||||
- immich # Network name defined in the stack
|
||||
|
||||
@@ -166,7 +166,7 @@ server {
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
That's it! Immich is now accessible from the internet. Don’t forget to install the [iOS](https://apps.apple.com/us/app/immich/id1613945652) / [Android](https://play.google.com/store/apps/details?id=app.alextran.immich) apps to sync your devices.
|
||||
@@ -197,7 +197,7 @@ In Immich, go to _Administration > Settings > Authentication Settings > OAuth_,
|
||||
| Client ID | The client ID copied from Pocket ID |
|
||||
| Client Secret | The client secret copied from Pocket ID |
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
::tip{icon="" to="/serveex/advanced/authentik"}
|
||||
|
||||
@@ -8,7 +8,7 @@ description: Install Nextcloud to self-host your files, photos, and calendar, a
|
||||
|
||||
[Nextcloud](https://nextcloud.com/) is a self-hosted solution that allows you to access and synchronize your data across all your devices. It also includes collaboration features, calendar, and more. It’s a great alternative to services like Google Drive, iCloud, or OneDrive.
|
||||
|
||||

|
||||

|
||||
|
||||
## Installation
|
||||
::note{to="https://docs.linuxserver.io/images/docker-nextcloud/"}
|
||||
@@ -43,7 +43,7 @@ services:
|
||||
container_name: nextcloud
|
||||
environment:
|
||||
- PUID=${PUID}
|
||||
- PGID=${GUID}
|
||||
- PGID=${PGID}
|
||||
- TZ=Etc/UTC
|
||||
volumes:
|
||||
- /srv/docker/nextcloud/config:/config
|
||||
@@ -60,7 +60,7 @@ If you’re using a NAS or network-shared drive via **Samba**, replace `/srv/doc
|
||||
|
||||
### Set your environment variables
|
||||
|
||||
Find your `PUID` and `GUID` by running the following command:
|
||||
Find your `PUID` and `PGID` by running the following command:
|
||||
|
||||
```bash [Terminal]
|
||||
id username
|
||||
@@ -70,13 +70,13 @@ Then fill out the `.env` file with your preferred port and the values found abov
|
||||
|
||||
```properties [.env]
|
||||
PUID=1000
|
||||
GUID=1000
|
||||
PGID=1000
|
||||
PORT=4545
|
||||
```
|
||||
|
||||
Deploy the stack and visit `http://yourserverip:4545` to complete the setup.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
::caution
|
||||
@@ -84,8 +84,8 @@ Deploy the stack and visit `http://yourserverip:4545` to complete the setup.
|
||||
__If it fails:__ check your firewall rules.
|
||||
::
|
||||
|
||||
## Exposing Nextcloud with Swag
|
||||
The goal of this setup is to access Nextcloud remotely from all your devices. We’ll use Swag to expose the app.
|
||||
## Exposing Nextcloud with SWAG
|
||||
The goal of this setup is to access Nextcloud remotely from all your devices. We’ll use SWAG to expose the app.
|
||||
|
||||
::note
|
||||
|
||||
@@ -101,9 +101,9 @@ In Dockge, go to your SWAG stack and edit the compose to add Nextcloud's network
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks:
|
||||
networks:
|
||||
# ...
|
||||
- nextcloud
|
||||
|
||||
@@ -155,7 +155,7 @@ Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ct
|
||||
|
||||
### Create the subdomain.conf file
|
||||
|
||||
In Swag’s folders, create the file `nextcloud.subdomain.conf`:
|
||||
In SWAG’s folders, create the file `nextcloud.subdomain.conf`:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo nano /srv/docker/swag/config/nginx/proxy-confs/nextcloud.subdomain.conf
|
||||
@@ -197,7 +197,7 @@ server {
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
That’s it! You’ve exposed Nextcloud! Don’t forget to install [the desktop and mobile apps](https://nextcloud.com/install/).
|
||||
@@ -230,7 +230,7 @@ In Nextcloud, go to _Administration > OpenID Connect_, click the `+` button, and
|
||||
| Discovery endpoint | Pocket ID's OIDC discovery URL |
|
||||
| Scope | `openid email profile groups` |
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
::tip{icon="" to="/serveex/advanced/authentik"}
|
||||
|
||||
@@ -84,19 +84,18 @@ Mount every folder you listed under `sources` in `config.yaml` at the same path
|
||||
::tip{icon=""}
|
||||
✨ __Tip:__ Add the watchtower label to automate updates.
|
||||
|
||||
```yaml [compose.yaml]
|
||||
services:
|
||||
filebrowser-quantum:
|
||||
#...
|
||||
labels:
|
||||
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
```
|
||||
```yaml [compose.yaml]
|
||||
services:
|
||||
filebrowser-quantum:
|
||||
#...
|
||||
labels:
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
```
|
||||
::
|
||||
|
||||
Deploy the container and go to `http://yourserverip:8020`. Log in with the default `admin` / `admin` credentials, then immediately change the password in your profile settings.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
::caution
|
||||
@@ -104,14 +103,14 @@ Deploy the container and go to `http://yourserverip:8020`. Log in with the defau
|
||||
__If it doesn't work:__ check your firewall rules.
|
||||
::
|
||||
|
||||
## Exposing File Browser Quantum with Swag
|
||||
## Exposing File Browser Quantum with SWAG
|
||||
|
||||
::warning
|
||||
|
||||
File Browser Quantum does not support multi-factor authentication. Exposing it publicly could put your systems at risk. Only do this if you're using a secure authentication solution like [TinyAuth](/serveex/security/tinyauth) or [Authentik](/serveex/advanced/authentik/). Otherwise, don't expose it with SWAG. Use a VPN like [Wireguard](/serveex/core/wireguard) instead.
|
||||
File Browser Quantum does not support multi-factor authentication. Exposing it publicly could put your systems at risk. Only do this if you're using a secure authentication solution like [TinyAuth](/serveex/security/tinyauth) or [Authentik](/serveex/advanced/authentik/). Otherwise, don't expose it with SWAG. Use a VPN like [WireGuard](/serveex/core/wireguard) instead.
|
||||
::
|
||||
|
||||
You may want to access File Browser Quantum remotely from all your devices. To do that, we'll expose it through Swag.
|
||||
You may want to access File Browser Quantum remotely from all your devices. To do that, we'll expose it through SWAG.
|
||||
|
||||
::note{icon=""}
|
||||
|
||||
@@ -127,9 +126,9 @@ In Dockge, go to the SWAG stack and edit the compose file to add File Browser Qu
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Connects the container to the custom network
|
||||
networks: # Connects the container to the custom network
|
||||
# ...
|
||||
- filebrowser-quantum # Name of the network declared in the stack
|
||||
|
||||
@@ -149,7 +148,7 @@ Restart the stack by clicking "deploy" and wait for SWAG to fully initialize.
|
||||
|
||||
### Create the subdomain.conf file
|
||||
|
||||
In the Swag folders, create the file `fbq.subdomain.conf`.
|
||||
In the SWAG folders, create the file `fbq.subdomain.conf`.
|
||||
|
||||
```bash [Terminal]
|
||||
sudo nano /srv/docker/swag/config/nginx/proxy-confs/fbq.subdomain.conf
|
||||
@@ -205,7 +204,7 @@ server {
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
That's it! File Browser Quantum is now exposed.
|
||||
|
||||
@@ -8,7 +8,7 @@ description: Install Pingvin Share, a self-hosted file sharing platform to send
|
||||
|
||||
[Pingvin](https://github.com/stonith404/pingvin-share) is a tool for quickly sharing files, similar to WeTransfer. Its many sharing options (password, expiration time, custom link, etc.) make it the ideal tool for sharing files quickly. Pingvin can also create _upload requests_, i.e. a shareable link you can send to someone so they can upload their files for you to retrieve.
|
||||
|
||||

|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
@@ -42,31 +42,29 @@ services:
|
||||
```
|
||||
::note
|
||||
|
||||
From here on, we assume the network name for Swag is `swag_default`.
|
||||
From here on, we assume the network name for SWAG is `swag_default`.
|
||||
::
|
||||
|
||||
::tip{icon=""}
|
||||
✨ __Tip:__ Add the watchtower label to each container to automate updates.
|
||||
|
||||
```yaml [compose.yaml]
|
||||
services:
|
||||
pingvin-share:
|
||||
#...
|
||||
labels:
|
||||
```yaml [compose.yaml]
|
||||
services:
|
||||
pingvin-share:
|
||||
#...
|
||||
labels:
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
|
||||
clamav:
|
||||
#...
|
||||
labels:
|
||||
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
```
|
||||
clamav:
|
||||
#...
|
||||
labels:
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
```
|
||||
::
|
||||
|
||||
Deploy the container and go to `http://yourserverip:3600`. That's it! Your Pingvin web UI instance is up and running!
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
::caution
|
||||
@@ -74,8 +72,8 @@ Deploy the container and go to `http://yourserverip:3600`. That's it! Your Pingv
|
||||
__If it fails:__ check your firewall rules.
|
||||
::
|
||||
|
||||
## Exposing Pingvin with Swag
|
||||
The whole point of a solution like this is being able to access it remotely, from all your devices. To do this, we'll expose Pingvin through Swag.
|
||||
## Exposing Pingvin with SWAG
|
||||
The whole point of a solution like this is being able to access it remotely, from all your devices. To do this, we'll expose Pingvin through SWAG.
|
||||
|
||||
::note{icon=""}
|
||||
📋 __Prerequisite:__ <br/><br/>
|
||||
@@ -91,9 +89,9 @@ In Dockge, go to the SWAG stack and edit the compose file to add the pingvin net
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Connects the container to the custom network
|
||||
networks: # Connects the container to the custom network
|
||||
# ...
|
||||
- pingvin # Name of the network declared in the stack
|
||||
|
||||
@@ -113,7 +111,7 @@ Redeploy the stack by clicking "deploy" and wait for SWAG to be fully up.
|
||||
|
||||
### Create the subdomain.conf file
|
||||
|
||||
In the Swag folders, create the `pingvin.subdomain.conf` file.
|
||||
In the SWAG folders, create the `pingvin.subdomain.conf` file.
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
|
||||
@@ -179,7 +177,7 @@ server {
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
That's it, you've exposed Pingvin!
|
||||
@@ -206,7 +204,7 @@ In Pingvin, go to _Administration > Configuration > Social Login_ and fill in:
|
||||
| Discovery URI | Pocket ID's OIDC discovery URL |
|
||||
| Scope | `openid email profile groups` |
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
That's it! From now on, when you log in to Pingvin, an "Open ID" button will be available below the login form.
|
||||
@@ -224,15 +222,15 @@ In your Authentik admin area, create an OAuth2/OpenID provider.
|
||||
|
||||
Fill in each section as follows, replacing `mydomain.com` with your own domain. Copy the `Client ID` and `Client Secret` fields somewhere safe.
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
#### Create the application
|
||||
|
||||
Save and create a `pingvin` application as follows.
|
||||
|
||||

|
||||

|
||||
|
||||
#### Add the provider to your outpost
|
||||
|
||||
@@ -247,7 +245,7 @@ Leave Authentik, and go to Pingvin's admin interface. In the _"OAuth"_ section,
|
||||
- `OpenID client ID` with the ID you copied in step 2.
|
||||
- `OpenID client secret` with the token you copied in step 2.
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
:::
|
||||
|
||||
@@ -8,7 +8,7 @@ description: Install code-server to run VS Code in your browser from your homela
|
||||
|
||||
[code-server](https://github.com/linuxserver/docker-code-server) is a container that lets you access [VS Code](https://code.visualstudio.com/) via a web UI in a Linux environment. It's literally VS Code and your projects in your pocket, available anywhere.
|
||||
|
||||

|
||||

|
||||
|
||||
## Installation
|
||||
::note{to="https://docs.linuxserver.io/images/docker-code-server/"}
|
||||
@@ -43,7 +43,7 @@ services:
|
||||
container_name: code-server
|
||||
environment:
|
||||
- PUID=${PUID}
|
||||
- PGID=${GUID}
|
||||
- PGID=${PGID}
|
||||
- TZ=Etc/UTC
|
||||
- HASHED_PASSWORD=${PW}
|
||||
volumes:
|
||||
@@ -58,14 +58,13 @@ services:
|
||||
::tip{icon=""}
|
||||
✨ Add the Watchtower label to each container to automate updates
|
||||
|
||||
```yaml [compose.yaml]
|
||||
services:
|
||||
code-server:
|
||||
#...
|
||||
labels:
|
||||
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
```
|
||||
```yaml [compose.yaml]
|
||||
services:
|
||||
code-server:
|
||||
#...
|
||||
labels:
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
```
|
||||
::
|
||||
|
||||
### Set your environment variables
|
||||
@@ -76,7 +75,7 @@ Choose a password and generate its hash:
|
||||
echo -n "yourpassword" | npx argon2-cli -e
|
||||
```
|
||||
|
||||
Save the result carefully. Find your PUID and GUID with:
|
||||
Save the result carefully. Find your PUID and PGID with:
|
||||
|
||||
```bash [Terminal]
|
||||
id yourusername
|
||||
@@ -87,7 +86,7 @@ Fill in the `.env` file with the values you found, for example:
|
||||
```properties [.env]
|
||||
PW='$argon2i$v=19$m=4096,t=3,p=1$wST5QhBgk2lu1ih4DMuxvg$LS1alrVdIWtvZHwnzCM1DUGg+5DTO3Dt1d5v9XtLws4'
|
||||
PUID=1000
|
||||
GUID=1000
|
||||
PGID=1000
|
||||
```
|
||||
|
||||
::warning
|
||||
@@ -97,7 +96,7 @@ __Note:__ Make sure to wrap the hash in single quotes `'`
|
||||
|
||||
Deploy the container and go to `http://yourserverip:8443`. Voilà, your code-server instance is up and running in the browser!
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
::caution
|
||||
@@ -118,8 +117,8 @@ services:
|
||||
```
|
||||
Once inside VS Code, you'll have access to the mounted folder.
|
||||
|
||||
## Expose code-server with Swag
|
||||
The whole point of such a solution is to access it remotely from any device. To do this, we’ll expose code-server via Swag.
|
||||
## Expose code-server with SWAG
|
||||
The whole point of such a solution is to access it remotely from any device. To do this, we’ll expose code-server via SWAG.
|
||||
|
||||
::note
|
||||
|
||||
@@ -135,16 +134,16 @@ In Dockge, go to the SWAG stack and edit the compose file to add code-server’s
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Connects the container to a custom network
|
||||
networks: # Connects the container to a custom network
|
||||
# ...
|
||||
- code-server # Name of the network defined in the stack
|
||||
|
||||
networks: # Defines the custom network
|
||||
# ...
|
||||
code-server: # Name of the network defined in the stack
|
||||
name: code-serveur # Actual name of the external network
|
||||
name: code-server_default # Actual name of the external network
|
||||
external: true # Indicates it’s an external network
|
||||
```
|
||||
|
||||
@@ -157,7 +156,7 @@ Redeploy the stack by clicking “deploy” and wait until SWAG is fully operati
|
||||
|
||||
### Create the subdomain.conf file
|
||||
|
||||
Inside the Swag config folders, create the file `code.subdomain.conf`.
|
||||
Inside the SWAG config folders, create the file `code.subdomain.conf`.
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
✨ __Tip:__ You can use **File Browser Quantum** to navigate and edit your files instead of using terminal commands.
|
||||
@@ -221,7 +220,7 @@ server {
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
That’s it! code-server is now exposed!
|
||||
|
||||
@@ -65,7 +65,7 @@ GID=1000
|
||||
|
||||
Deploy the container and go to `http://yourserverip:3333`. Your Forgejo instance is now up and running!
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
::caution
|
||||
@@ -73,8 +73,8 @@ Deploy the container and go to `http://yourserverip:3333`. Your Forgejo instance
|
||||
__If it fails:__ check your firewall rules.
|
||||
::
|
||||
|
||||
## Exposing Forgejo with Swag
|
||||
The benefit of this setup is being able to access it remotely from any of your devices. To do so, we’ll expose Forgejo through Swag.
|
||||
## Exposing Forgejo with SWAG
|
||||
The benefit of this setup is being able to access it remotely from any of your devices. To do so, we’ll expose Forgejo through SWAG.
|
||||
|
||||
::note
|
||||
|
||||
@@ -90,9 +90,9 @@ In Dockge, go to the SWAG stack and edit the compose file by adding Forgejo's ne
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Connect the container to the custom network
|
||||
networks: # Connect the container to the custom network
|
||||
# ...
|
||||
- forgejo # Name of the declared network
|
||||
|
||||
@@ -112,7 +112,7 @@ Redeploy the stack by clicking "Deploy" and wait until SWAG is fully operational
|
||||
|
||||
### Create the subdomain.conf file
|
||||
|
||||
Inside the Swag folders, create the file `forgejo.subdomain.conf`.
|
||||
Inside the SWAG folders, create the file `forgejo.subdomain.conf`.
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
✨ __Tip:__ You can use **File Browser Quantum** to navigate and edit your files instead of using terminal commands.
|
||||
@@ -201,7 +201,7 @@ ROOT_URL = https://forgejo.yourdomain.com/
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit, then restart the container.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
And that’s it! Forgejo is now exposed to the web.
|
||||
@@ -238,7 +238,7 @@ As an admin, go to _Site Administration > Identity & Access > Authentication Sou
|
||||
|
||||
Also enable __Skip local 2FA__.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
::tip{icon="" to="/serveex/advanced/authentik"}
|
||||
|
||||
@@ -31,19 +31,18 @@ services:
|
||||
::tip{icon=""}
|
||||
✨ __Tip:__ Add the Watchtower label to each container to enable automatic updates.
|
||||
|
||||
```yaml [compose.yaml]
|
||||
services:
|
||||
it-tools:
|
||||
#...
|
||||
labels:
|
||||
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
```
|
||||
```yaml [compose.yaml]
|
||||
services:
|
||||
it-tools:
|
||||
#...
|
||||
labels:
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
```
|
||||
::
|
||||
|
||||
Deploy the container and visit `http://yourserverip:3222`. That’s it, your IT Tools web UI instance is up and running!
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
::caution
|
||||
@@ -51,8 +50,8 @@ Deploy the container and visit `http://yourserverip:3222`. That’s it, your IT
|
||||
__If it fails:__ check your firewall rules.
|
||||
::
|
||||
|
||||
## Expose IT Tools with Swag
|
||||
You might want to access it remotely on all your devices. To do that, we'll expose IT Tools using Swag.
|
||||
## Expose IT Tools with SWAG
|
||||
You might want to access it remotely on all your devices. To do that, we'll expose IT Tools using SWAG.
|
||||
|
||||
::note
|
||||
|
||||
@@ -68,9 +67,9 @@ In Dockge, go to the SWAG stack and edit the compose file to add the IT Tools ne
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Connects the container to the custom network
|
||||
networks: # Connects the container to the custom network
|
||||
# ...
|
||||
- it-tools # Network name as defined in the IT Tools stack
|
||||
|
||||
@@ -95,7 +94,7 @@ Restart the stack by clicking "deploy" and wait for SWAG to be fully operational
|
||||
|
||||
### Create the subdomain.conf file
|
||||
|
||||
Inside the Swag folders, create the file `tools.subdomain.conf`.
|
||||
Inside the SWAG folders, create the file `tools.subdomain.conf`.
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
✨ __Tip:__ You can use **File Browser Quantum** to navigate and edit your files instead of using terminal commands.
|
||||
@@ -160,7 +159,7 @@ server {
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
And that’s it! IT Tools is now exposed!
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: Adguard Home
|
||||
title: AdGuard Home
|
||||
description: Install AdGuard Home for network-wide ad and tracker blocking with DNS-over-HTTPS, client management, and custom filtering rules.
|
||||
---
|
||||
|
||||
@@ -10,9 +10,9 @@ description: Install AdGuard Home for network-wide ad and tracker blocking with
|
||||
|
||||
It works as a DNS server that redirects tracking domains to a “black hole,” preventing your devices from connecting to them.
|
||||
|
||||
In practice, once it's in place, all you need to do is set your devices to use Adguard as their DNS server.
|
||||
In practice, once it's in place, all you need to do is set your devices to use AdGuard as their DNS server.
|
||||
|
||||

|
||||

|
||||
|
||||
**Quick reminder of how DNS works:**
|
||||
|
||||
@@ -20,14 +20,14 @@ When you visit a site or use an app, it makes requests to various domains to loa
|
||||
|
||||
By default, your device uses your ISP's DNS server, which is usually configured in your router or, for mobile devices, at the carrier’s CGNAT level. You can change this in your browser settings, your device’s system settings, or even directly in your router, depending on your ISP.
|
||||
|
||||
Adguard will act as a middleman between your device and the upstream DNS servers. If you configure your devices to use Adguard:
|
||||
AdGuard will act as a middleman between your device and the upstream DNS servers. If you configure your devices to use AdGuard:
|
||||
|
||||
- If the domain is not in a blocklist, Adguard queries the upstream DNS servers and returns the correct IP to your device.
|
||||
- If the domain *is* in a blocklist, Adguard will block the request and return nothing, so the associated content won’t load.
|
||||
- If the domain is not in a blocklist, AdGuard queries the upstream DNS servers and returns the correct IP to your device.
|
||||
- If the domain *is* in a blocklist, AdGuard will block the request and return nothing, so the associated content won’t load.
|
||||
|
||||
This is how ads and malicious domains are blocked: Adguard blocks only the bad domains, allowing the rest of the page to load normally.
|
||||
This is how ads and malicious domains are blocked: AdGuard blocks only the bad domains, allowing the rest of the page to load normally.
|
||||
|
||||

|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
@@ -37,7 +37,7 @@ tree:
|
||||
/:
|
||||
- srv:
|
||||
- docker:
|
||||
- adguard:
|
||||
- adguardhome:
|
||||
- confdir/
|
||||
- workdir/
|
||||
- compose.yaml
|
||||
@@ -47,7 +47,7 @@ tree:
|
||||
|
||||
::note
|
||||
|
||||
We will also mount the `/srv/docker/swag/config/etc/letsencrypt` folder to access Swag's SSL certificate.
|
||||
We will also mount the `/srv/docker/swag/config/etc/letsencrypt` folder to access SWAG's SSL certificate.
|
||||
::
|
||||
|
||||
::steps{level="3"}
|
||||
@@ -62,10 +62,11 @@ Name the stack `adguardhome` and paste the configuration below:
|
||||
services:
|
||||
adguardhome:
|
||||
container_name: adguard
|
||||
image: adguard/adguardhome
|
||||
image: adguard/adguardhome:latest
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 53:53/udp
|
||||
- 53:53/tcp
|
||||
- 8080:80/tcp
|
||||
- 4443:443/tcp
|
||||
- 853:853/tcp
|
||||
@@ -93,10 +94,15 @@ Deploy the stack.
|
||||
|
||||
Go to `http://yourserverip:3000` and follow the setup instructions.
|
||||
|
||||
### Done !
|
||||
::warning
|
||||
|
||||
The setup wizard asks you to pick an admin interface port. Keep it at `3000`: the SWAG configuration further down assumes the admin interface stays on that port, and changing it here would make exposing AdGuard with SWAG fail with a 502 error.
|
||||
::
|
||||
|
||||
That’s it! Adguard is deployed.
|
||||
### Done!
|
||||
::
|
||||
|
||||
That’s it! AdGuard is deployed.
|
||||
|
||||
## Exposing AdGuard with SWAG
|
||||
To make AdGuard usable from outside your home network, you need to expose it.
|
||||
@@ -120,9 +126,9 @@ In Dockge, go to the SWAG stack and edit the compose file to add the AdGuard net
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Connect the container to the custom network
|
||||
networks: # Connect the container to the custom network
|
||||
# ...
|
||||
- adguard # Name of the network declared in the stack
|
||||
|
||||
@@ -230,7 +236,7 @@ server {
|
||||
}
|
||||
```
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Protecting AdGuard with TinyAuth
|
||||
@@ -357,7 +363,7 @@ To configure encryption:
|
||||
- Go to _Settings_ then _Encryption_.
|
||||
- Set the options as follows:
|
||||
|
||||

|
||||

|
||||
|
||||
- Below, in the _Certificates_ section, check _Use file path for certificate_
|
||||
- In the input field, enter `/swag-ssl/live/mydomain.com/fullchain.pem`, replacing `mydomain.com` with your actual domain.
|
||||
|
||||
@@ -100,7 +100,7 @@ Then deploy the container.
|
||||
|
||||
Recently, Vaultwarden requires SSL to be accessed, which prevents access via a local IP. We'll expose it with SWAG, which provides an SSL certificate.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
::caution
|
||||
@@ -124,9 +124,9 @@ In Dockge, go to the SWAG stack and edit the compose file to add the Vaultwarden
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Connects container to custom network
|
||||
networks: # Connects container to custom network
|
||||
# ...
|
||||
- vaultwarden # Name of the declared network
|
||||
|
||||
@@ -244,10 +244,10 @@ server {
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
And there you go! Vaultwarden is now exposed! Visit `https://vault.yourdomain.com/admin` to access the admin panel and paste the password you specified when generatique the `ADMIN_TOKEN`. For more information, see the [Bitwarden documentation](https://bitwarden.com/help/).
|
||||
And there you go! Vaultwarden is now exposed! Visit `https://vault.yourdomain.com/admin` to access the admin panel and paste the password you specified when generating the `ADMIN_TOKEN`. For more information, see the [Bitwarden documentation](https://bitwarden.com/help/).
|
||||
|
||||
Don't forget to install Bitwarden browser extensions (they work with Vaultwarden) for [Chrome](https://chromewebstore.google.com/detail/gestionnaire-de-mots-de-p/nngceckbapebfimnlniiiahkandclblb) and [Firefox](https://addons.mozilla.org/fr/firefox/addon/bitwarden-password-manager/), as well as [iOS](https://apps.apple.com/fr/app/bitwarden/id1137397744) and [Android](https://play.google.com/store/apps/details?id=com.x8bit.bitwarden&hl=fr) apps to sync your passwords.
|
||||
|
||||
@@ -298,7 +298,7 @@ Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ct
|
||||
|
||||
Redeploy Vaultwarden. Your next visit to `https://vault.yourdomain.com` will prompt for SSO login instead of (or alongside) the local master password.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
::note{to="https://github.com/dani-garcia/vaultwarden/wiki/Enabling-SSO-support-using-OpenId-Connect"}
|
||||
@@ -329,7 +329,7 @@ SSO_CLIENT_SECRET=
|
||||
SSO_SCOPES=email profile offline_access
|
||||
```
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
:::
|
||||
|
||||
@@ -19,17 +19,17 @@ Authentik also supports multi-factor authentication, including TOTP (a code gene
|
||||
|
||||
It's a great alternative to VPNs for securely exposing services, especially ones that lack MFA or login protection (e.g., the SWAG dashboard).
|
||||
|
||||
Authentik has [extensive documentation](https://docs.goauthentik.io/docs/installation/docker-compose) and [great tutorials from Cooptonian](https://www.youtube.com/@cooptonian). Here, we’ll cover the basics using Dockge as an example.
|
||||
Authentik has [extensive documentation](https://docs.goauthentik.io/install-config/install/docker-compose) and [great tutorials from Cooptonian](https://www.youtube.com/@cooptonian). Here, we’ll cover the basics using Dockge as an example.
|
||||
|
||||
There are two main modes you should know:
|
||||
|
||||
- The first allows apps with native support for OpenID-compatible SSO to connect directly to Authentik. This is the preferred method, as the app itself decides what’s public and what’s protected.
|
||||
|
||||

|
||||

|
||||
|
||||
- The second method injects Authentik authentication through SWAG before reaching the target service.
|
||||
|
||||

|
||||

|
||||
|
||||
Both modes can be configured on a per-application basis.
|
||||
|
||||
@@ -43,7 +43,7 @@ tree:
|
||||
- docker:
|
||||
- authentik:
|
||||
- .env
|
||||
- compose.yml
|
||||
- compose.yaml
|
||||
- media/
|
||||
- certs/
|
||||
- custom-template/
|
||||
@@ -63,15 +63,15 @@ sudo mkdir -p /srv/docker/authentik/media /srv/docker/authentik/certs /srv/docke
|
||||
Navigate to the `authentik` folder via `cd /srv/docker/authentik` and generate a password and secret key to include in the `.env` file:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo echo "PG_PASS=$(openssl rand 36 | base64)" >> .env
|
||||
sudo echo "AUTHENTIK_SECRET_KEY=$(openssl rand 60 | base64)" >> .env
|
||||
echo "PG_PASS=$(openssl rand 36 | base64)" | sudo tee -a .env
|
||||
echo "AUTHENTIK_SECRET_KEY=$(openssl rand 60 | base64)" | sudo tee -a .env
|
||||
```
|
||||
|
||||
::note
|
||||
|
||||
To generate the keys, we created the folders ahead of deployment using Dockge. Dockge will prevent you from creating a stack with the same name in these folders unless a `compose.yml` file exists. So, create an empty `compose.yml` so it appears as an inactive stack:
|
||||
To generate the keys, we created the folders ahead of deployment using Dockge. Dockge will prevent you from creating a stack with the same name in these folders unless a `compose.yaml` file exists. So, create an empty `compose.yaml` so it appears as an inactive stack:
|
||||
```bash [Terminal]
|
||||
sudo nano /srv/docker/authentik/compose.yml
|
||||
sudo nano /srv/docker/authentik/compose.yaml
|
||||
```
|
||||
::
|
||||
|
||||
@@ -156,24 +156,54 @@ services:
|
||||
AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik}
|
||||
AUTHENTIK_POSTGRESQL__NAME: ${PG_DB:-authentik}
|
||||
AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS}
|
||||
# `user: root` and the docker socket volume are optional.
|
||||
# See more for the docker socket integration here:
|
||||
# `user: root` and the Docker integration below are optional, only needed if you
|
||||
# want Authentik to auto-manage embedded outposts on this host. See:
|
||||
# https://goauthentik.io/docs/outposts/integrations/docker
|
||||
# Removing `user: root` also prevents the worker from fixing the permissions
|
||||
# on the mounted folders, so when removing this make sure the folders have the correct UID/GID
|
||||
# (1000:1000 by default)
|
||||
user: root
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./media:/media
|
||||
- ./certs:/certs
|
||||
- ./custom-templates:/templates
|
||||
- ./ssh:/authentik/.ssh
|
||||
networks:
|
||||
- default
|
||||
- authentik-internal
|
||||
env_file:
|
||||
- .env
|
||||
depends_on:
|
||||
- postgresql
|
||||
- redis
|
||||
- docker-socket-proxy
|
||||
|
||||
docker-socket-proxy:
|
||||
image: lscr.io/linuxserver/socket-proxy:latest
|
||||
container_name: docker-socket-proxy-authentik
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
networks:
|
||||
- authentik-internal
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
environment:
|
||||
- CONTAINERS=1
|
||||
- IMAGES=1
|
||||
- NETWORKS=1
|
||||
- INFO=1
|
||||
- POST=1
|
||||
- ALLOW_START=1
|
||||
- ALLOW_STOP=1
|
||||
- ALLOW_RESTARTS=1
|
||||
restart: unless-stopped
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /run
|
||||
|
||||
networks:
|
||||
authentik-internal:
|
||||
name: authentik-internal
|
||||
|
||||
volumes:
|
||||
database:
|
||||
@@ -182,6 +212,10 @@ volumes:
|
||||
driver: local
|
||||
```
|
||||
|
||||
::note
|
||||
This adds **Docker Socket Proxy** so the optional Docker integration never needs `/var/run/docker.sock` mounted directly into the worker. If you enable it, set the connection's Docker URL in the admin UI to `http://docker-socket-proxy:2375` instead of the local socket path, as [Authentik's own docs recommend](https://goauthentik.io/docs/outposts/integrations/docker) for socket-proxy setups.
|
||||
::
|
||||
|
||||
### Begin the initial setup
|
||||
|
||||
In the `.env` file, the `PG_PASS` and `AUTHENTIK_SECRET_KEY` variables are already set.
|
||||
@@ -195,7 +229,7 @@ You can then begin the initial setup by visiting:
|
||||
__Warning:__ It’s recommended to create a new admin account and **disable** the default `akadmin` account.
|
||||
::
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Exposing Authentik
|
||||
@@ -284,9 +318,9 @@ Go to Dockge, and edit the SWAG compose file to add the Authentik network:
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Attach the container to the custom network
|
||||
networks: # Attach the container to the custom network
|
||||
# ...
|
||||
- authentik # Name of the network declared in the stack
|
||||
|
||||
@@ -299,7 +333,7 @@ networks: # Define the custom network
|
||||
|
||||
Restart the stack and wait for SWAG to be fully operational.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
You can now access Authentik via `https://auth.mydomain.com`
|
||||
@@ -316,13 +350,13 @@ Go to `https://auth.mydomain.com` and log in.
|
||||
|
||||
Go to _Settings_, click the _MFA_ section, then _Register_. Choose a method like _TOTP device_ (you'll need an authenticator app like Google Authenticator) and follow the steps.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
You’ll now be prompted to enter a one-time code at every login.
|
||||
|
||||
## Protecting a Native App
|
||||
Authentik is natively compatible with several applications. You can find the list and [support here](https://docs.goauthentik.io/integrations/services/).
|
||||
Authentik is natively compatible with several applications. You can find the list and [support here](https://integrations.goauthentik.io/).
|
||||
|
||||
## Protecting an App via Reverse Proxy
|
||||
SWAG lets you insert Authentik’s login page between a request and access to your service. To do this:
|
||||
@@ -340,15 +374,15 @@ Why do this when Dockge already has authentication? Because Dockge uses weak HTT
|
||||
- Select _Applications_ then _Create with wizard_
|
||||
- Fill in the fields as shown:
|
||||
|
||||

|
||||

|
||||
|
||||
- At the next step, choose "Forward authentication (single application)" and configure it as shown (flows are important):
|
||||
|
||||

|
||||

|
||||
|
||||
- Next, go to the _Outposts_ menu on the left and edit _authentik Embedded Outpost_:
|
||||
|
||||

|
||||

|
||||
|
||||
- Add the `dockge` application by moving it to the right column and save.
|
||||
|
||||
@@ -368,7 +402,7 @@ Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ct
|
||||
✨ __Tip:__ In Dockge's settings, you can disable Dockge's authentication to avoid double login. **Warning**: this means if the port is open on your local network, there will be no authentication at all.
|
||||
::
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
Now when accessing `https://dockge.mydomain.com`, you’ll be redirected to the Authentik login screen.
|
||||
@@ -380,7 +414,7 @@ Repeat this process for each app you want to protect (unless it has native integ
|
||||
|
||||
Your new architecture looks like this:
|
||||
|
||||

|
||||

|
||||
|
||||
## Protecting a Remote Server Service
|
||||
For a [native application](/serveex/advanced/authentik/#protecting-a-native-app) (via OAuth 2.0 or other), nothing changes.
|
||||
@@ -394,7 +428,7 @@ Prerequisites:
|
||||
- If the app has no native integration, use a compatible reverse proxy. We will use [SWAG](/serveex/core/swag) here.
|
||||
::
|
||||
|
||||
This container will forward requests to your main [Authentik](/serveex/advanced/authentik#authentik) instance over the internet (or your local network). The server will perform checks and respond to the Outpost, which will allow or block access accordingly.
|
||||
This container will forward requests to your main [Authentik](/serveex/advanced/authentik) instance over the internet (or your local network). The server will perform checks and respond to the Outpost, which will allow or block access accordingly.
|
||||
|
||||

|
||||
|
||||
@@ -425,7 +459,6 @@ authentik_host_insecure: false
|
||||
container_image:
|
||||
docker_network: null
|
||||
docker_map_ports: true
|
||||
docker_labels: null
|
||||
```
|
||||
|
||||
Save with :kbd{value="Ctrl+O"}, then :kbd{value="Enter"}, and exit with :kbd{value="Ctrl+X"}.
|
||||
@@ -436,12 +469,12 @@ We assume you’ve already installed [Docker](/serveex/core/docker) and [SWAG](/
|
||||
|
||||
### Create the stack folder
|
||||
|
||||
On your remote machine, use [Dockge](/serveex/core/docker/#installer-dockge-pour-gérer-et-déployer-les-conteneurs) to create a stack named `authentik-outpost`.
|
||||
On your remote machine, use [Dockge](/serveex/core/docker/#install-dockge-to-manage-and-deploy-containers) to create a stack named `authentik-outpost`.
|
||||
|
||||
If you haven’t installed [Dockge](/serveex/core/docker/#installer-dockge-pour-gérer-et-déployer-les-conteneurs), create a folder `/srv/docker/authentik-outpost`, or directly via command line:
|
||||
If you haven’t installed [Dockge](/serveex/core/docker/#install-dockge-to-manage-and-deploy-containers), create a folder `/srv/docker/authentik-outpost`, or directly via command line:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo mkdir -P /srv/docker/authentik-outpost
|
||||
sudo mkdir -p /srv/docker/authentik-outpost
|
||||
```
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
@@ -458,7 +491,7 @@ Via command line:
|
||||
```bash [Terminal]
|
||||
sudo nano /srv/docker/authentik-outpost/compose.yaml
|
||||
```
|
||||
Paste the following configuration, updating the version in `{AUTHENTIK_TAG:proxy:2024.2.3}`{lang=properties} to match your Authentik server version.
|
||||
Paste the following configuration, updating the version in `ghcr.io/goauthentik/proxy:2026.2`{lang=properties} to match your Authentik server version.
|
||||
|
||||
```yaml [compose.yaml]
|
||||
---
|
||||
@@ -466,7 +499,7 @@ version: "3.5"
|
||||
services:
|
||||
authentik_proxy:
|
||||
container_name: authentik-outpost
|
||||
image: ghcr.io/goauthentik/proxy:2024.2.3
|
||||
image: ghcr.io/goauthentik/proxy:2026.2
|
||||
# Optionally specify which networks the container should be
|
||||
# might be needed to reach the core authentik server
|
||||
restart: unless-stopped
|
||||
@@ -493,9 +526,9 @@ sudo nano /srv/docker/swag/compose.yaml
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: #...
|
||||
container_name: #...
|
||||
# ...
|
||||
networks: # Attach the container to the custom network
|
||||
networks: # Attach the container to the custom network
|
||||
|
||||
- authentik-outpost # Network name as declared in the stack
|
||||
|
||||
@@ -515,7 +548,7 @@ We assume the Dockge network name is `authentik-outpost_default`.
|
||||
|
||||
### Restart SWAG
|
||||
|
||||
If using [Dockge](/serveex/core/docker/#installer-dockge-pour-gérer-et-déployer-les-conteneurs), restart SWAG.
|
||||
If using [Dockge](/serveex/core/docker/#install-dockge-to-manage-and-deploy-containers), restart SWAG.
|
||||
|
||||
Otherwise, via terminal:
|
||||
|
||||
@@ -582,7 +615,7 @@ proxy_pass http://$upstream_authentik:9000;
|
||||
|
||||
Save with :kbd{value="Ctrl+O"}, then :kbd{value="Enter"}, and exit with :kbd{value="Ctrl+X"}.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
Then configure the applications to protect as you did on your main server, whether they are [native](/serveex/advanced/authentik/#protecting-a-native-app) or protected via [reverse proxy](/serveex/advanced/authentik#protecting-an-app-via-reverse-proxy).
|
||||
@@ -627,5 +660,5 @@ Restore the database:
|
||||
sudo docker exec authentik-postgresql pg_restore -U authentik -d authentik /path/to/wherever/mydb.tar
|
||||
```
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
@@ -6,7 +6,7 @@ description: Install Arcane, a modern Docker and Compose management web UI, as a
|
||||
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||
::note{to="/serveex/core/docker#installer-dockge-pour-gérer-et-déployer-les-conteneurs"}
|
||||
::note{to="/serveex/core/docker#install-dockge-to-manage-and-deploy-containers"}
|
||||
|
||||
This is an advanced alternative to **Dockge**: it can manage several remote Docker hosts from a single instance, and supports OIDC login natively instead of relying on a separate forward-auth proxy.
|
||||
::
|
||||
@@ -72,7 +72,7 @@ services:
|
||||
|
||||
docker-socket-proxy:
|
||||
image: lscr.io/linuxserver/socket-proxy:latest
|
||||
container_name: arcane-docker-proxy
|
||||
container_name: docker-socket-proxy-arcane
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
networks:
|
||||
@@ -142,7 +142,7 @@ PGID=1000
|
||||
|
||||
Deploy the stack. The local interface is available at `http://yourserverip:3552`.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
::caution
|
||||
@@ -155,7 +155,7 @@ The main benefit of this setup is being able to access Arcane remotely from all
|
||||
|
||||
::warning
|
||||
|
||||
Arcane's own local login has no multi-factor authentication. Only expose it if you're using [Pocket ID](/serveex/security/pocket-id) (see below) or [Authentik](/serveex/advanced/authentik) for login. Otherwise, don't expose it with SWAG. Use a VPN like [Wireguard](/serveex/core/wireguard) instead, especially given the level of access Arcane has over your host.
|
||||
Arcane's own local login has no multi-factor authentication. Only expose it if you're using [Pocket ID](/serveex/security/pocket-id) (see below) or [Authentik](/serveex/advanced/authentik) for login. Otherwise, don't expose it with SWAG. Use a VPN like [WireGuard](/serveex/core/wireguard) instead, especially given the level of access Arcane has over your host.
|
||||
::
|
||||
|
||||
::note
|
||||
@@ -172,9 +172,9 @@ Go to Dockge and edit SWAG's compose file by adding Arcane's network:
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Attach container to custom network
|
||||
networks: # Attach container to custom network
|
||||
# ...
|
||||
- arcane # Name of the declared network
|
||||
|
||||
@@ -194,7 +194,7 @@ Here we assume the Arcane network name is `arcane_default`. You can check the co
|
||||
|
||||
### Create the subdomain.conf file
|
||||
|
||||
In the Swag folders, create the file `arcane.subdomain.conf`:
|
||||
In the SWAG folders, create the file `arcane.subdomain.conf`:
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
✨ __Tip:__ Use **File Browser Quantum** to navigate and edit files instead of using terminal commands.
|
||||
@@ -240,7 +240,7 @@ Arcane's live updates run over a websocket, hence the `Upgrade`/`Connection` hea
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
That's it! Arcane is now accessible from the internet.
|
||||
@@ -290,7 +290,7 @@ Deploy the stack.
|
||||
|
||||
Back in Arcane, the new environment should show as connected within a few seconds. Switch to it from the environment picker to manage that host's containers and stacks.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Connecting Pocket ID
|
||||
@@ -330,7 +330,7 @@ Redeploy the stack.
|
||||
✨ To skip straight to Pocket ID and hide the local login form, set `OIDC_AUTO_REDIRECT_TO_PROVIDER=true`, or disable local login entirely under _Settings > Authentication_ for OIDC-only access.
|
||||
::
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
That's it! Arcane now offers a "Login with Pocket ID" option alongside the local login form.
|
||||
|
||||
@@ -0,0 +1,253 @@
|
||||
---
|
||||
title: Backrest
|
||||
description: Install Backrest, a friendly web UI for restic, and back up your server properly following the 3-2-1 rule, to a local disk, another server, S3, or Backblaze B2.
|
||||
---
|
||||
|
||||
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||
Let's be honest for a second: "backup strategy" for most homelabbers means copying a few folders to a USB stick that one time in 2019, then hoping for the best. [Backrest](https://github.com/garethgeorge/backrest) is here to fix that, without making you learn a scary command-line tool first.
|
||||
|
||||
Under the hood, Backrest is a clean web interface on top of [restic](https://restic.net/), a battle-tested, open-source backup engine. Restic does the actual work (encrypting, deduplicating, and shipping your data wherever you tell it to); Backrest gives you buttons and forms instead of a wall of flags to memorize.
|
||||
|
||||

|
||||
|
||||
## The 3-2-1 rule, or why one backup is not a backup
|
||||
|
||||
Before installing anything, let's talk about the rule that actually matters here, because a backup done wrong gives you false confidence, which is worse than no backup at all.
|
||||
|
||||
The **3-2-1 rule** says:
|
||||
|
||||
- **3** copies of your data: the original, plus at least two backups.
|
||||
- **2** different types of storage: not two copies sitting on the same disk, or on two disks in the same machine.
|
||||
- **1** copy offsite: physically somewhere else, not in the same room, house, or building as the original.
|
||||
|
||||
Each number closes a specific failure scenario:
|
||||
|
||||
- Only **1** backup? A single mistake (a bad `rm -rf`, a botched restore, a corrupted file silently copied over the good one) can take out your only safety net at the same time as the original.
|
||||
- Backups on the **same type of storage** (say, a second internal drive in the same server)? A power surge, a firmware bug, or a cheap PSU dying can very well take out every disk in the box at once.
|
||||
- No **offsite** copy? Fire, flood, theft, or "I unplugged the wrong power strip" don't care how many drives you have, if they're all in the same room.
|
||||
|
||||
This is also exactly why [RAID is not a backup](/general/storage/raid): RAID keeps a service running when a disk dies, it does nothing against ransomware encrypting every file it can reach, a fat-fingered delete, or your house catching fire. Backrest, pointed at a destination outside your server, is what actually covers those cases.
|
||||
|
||||
## What Backrest actually backs up, and where
|
||||
|
||||
Two concepts to know before clicking around:
|
||||
|
||||
- A **repository** is the destination: an encrypted, deduplicated storage location. This is your "2" and your "1" from the rule above, an external disk, another server, or cloud storage.
|
||||
- A **plan** is the rule you define: which folders to back up, into which repository, on what schedule, and how many old snapshots to keep around.
|
||||
|
||||
You can have several plans backing up to several repositories at once, which is exactly how you'd build a real 3-2-1 setup: one plan to a local repository for quick restores, another plan to an offsite repository for the "my house is on fire" scenario.
|
||||
|
||||
## Installation
|
||||
|
||||
::file-tree
|
||||
---
|
||||
tree:
|
||||
/:
|
||||
- srv:
|
||||
- docker:
|
||||
- backrest:
|
||||
- data/
|
||||
- config/
|
||||
- cache/
|
||||
- compose.yaml
|
||||
---
|
||||
::
|
||||
|
||||
::steps{level="3"}
|
||||
### Deploy the stack
|
||||
|
||||
Open Dockge, click `compose`, name the stack `backrest`, and paste the following:
|
||||
|
||||
```yaml [compose.yaml]
|
||||
---
|
||||
services:
|
||||
backrest:
|
||||
image: garethgeorge/backrest:latest
|
||||
container_name: backrest
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 9898:9898
|
||||
volumes:
|
||||
- ./data:/data
|
||||
- ./config:/config
|
||||
- ./cache:/cache
|
||||
# Whatever you want Backrest to be able to back up has to be
|
||||
# mounted here too: this stack only sees what it's given.
|
||||
- /srv/docker:/userdata/docker:ro
|
||||
- /etc:/userdata/etc:ro
|
||||
- /home:/userdata/home:ro
|
||||
environment:
|
||||
- BACKREST_DATA=/data
|
||||
- BACKREST_CONFIG=/config/config.json
|
||||
- XDG_CACHE_HOME=/cache
|
||||
- TZ=Europe/Paris
|
||||
```
|
||||
|
||||
The `/srv/docker`, `/etc` and `/home` lines above cover what's actually worth an off-site backup on a homelab server, per [folders and partitions](/general/linux/filesystem): `/srv/docker` holds every stack's config and data (databases, uploaded files, Vaultwarden's vault, Pocket ID's users, and so on), `/etc` holds your system configuration (the SSH hardening from the [installation guide](/serveex/core/installation#close-the-door-behind-you), your SWAG `.subdomain.conf` files, systemd units), and `/home` holds your own scripts and notes. All three are mounted read-only, a backup tool has no business writing to what it's backing up.
|
||||
|
||||
What's usually **not** worth it: a big media library or a torrent download folder sitting on a separate data disk. It's often huge, replaceable, and rarely worth paying for cloud storage or SSH bandwidth to protect.
|
||||
|
||||
::tip{icon=""}
|
||||
✨ __Tip:__ Add the Watchtower label to automate updates
|
||||
```yaml [compose.yaml]
|
||||
services:
|
||||
backrest:
|
||||
#...
|
||||
labels:
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
```
|
||||
::
|
||||
|
||||
Deploy the container, then open `http://yourserverip:9898`. The first visit asks you to set an admin username and password: do it immediately, Backrest has no account by default and the setup screen is wide open until you do.
|
||||
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Creating your first repository
|
||||
|
||||

|
||||
|
||||
In Backrest, go to **Add Repo**. The form is split into a few sections, here's what each field actually does:
|
||||
|
||||
- **Repo Name**: whatever helps you recognize it later, `usb-key` or `offsite-vps` for instance. You can't rename it afterwards, so pick something you won't regret.
|
||||
- **Auto Unlock**: leave this off unless you understand what it does. Restic locks a repository while it's working on it, so a second process doesn't corrupt things by writing at the same time. Auto Unlock removes that lock automatically on startup, which is convenient if Backrest crashed mid-backup and left a stale lock behind, but genuinely unsafe if two machines ever write to the same repository at once. For the single-server homelab setup this article covers, it's a minor convenience; leave it off if in doubt.
|
||||
- **Shared**: only relevant to Backrest's multihost feature (several of your machines managing the same repo config). Ignore it for a single server.
|
||||
- **Repository URI**: where the data actually lives. This is the field that changes for every destination below.
|
||||
- **Password**: the encryption password for this repository, click **Generate** for a strong random one. **Save it somewhere outside this server**, a password manager, a note on your phone, anywhere but a text file sitting next to the backups it protects. Lose it, and every single backup becomes an expensive pile of unreadable noise, no exceptions, not even for the developers of restic.
|
||||
- **Env Vars**: where you'll paste credentials for destinations that need them (S3 and B2 below). Local disks and SFTP don't need any.
|
||||
|
||||
::note
|
||||
The **Scheduling**, **Hooks**, and **Advanced** tabs of this form configure repository-wide maintenance (pruning old data, verifying integrity, notifications) rather than anything destination-specific. They're covered at the end of this article, once you've got a repository actually working.
|
||||
::
|
||||
|
||||
### Backing up to a local disk or USB key
|
||||
|
||||
The simplest possible offsite copy is a drive you physically move somewhere else after each backup, or a second machine's disk reached over the network. Either way, from Backrest's point of view it's just a folder, so the setup is identical: plug in the drive (or mount the remote share) on the host, add it to the compose file's volumes the same way you did for `/srv/docker` above, then in the Repository URI field, use the path as it appears **inside the container**:
|
||||
|
||||
```text
|
||||
/userdata/backup-drive
|
||||
```
|
||||
|
||||
That's it, no credentials, no Env Vars. This is the fastest repository to restore from too, since there's no network round-trip involved, which makes it a great pick for your "quick recovery" copy, paired with a proper offsite one below for the "my house is on fire" scenario.
|
||||
|
||||
::caution
|
||||
__If it fails:__ the path has to exist and be writable by the container before you submit the form. An empty folder is fine, restic initializes the repository structure itself on first use.
|
||||
::
|
||||
|
||||
### Backing up to another server
|
||||
|
||||
No cloud account, no problem: if you have SSH access to another machine, a friend's server, a cheap VPS, a Raspberry Pi at a relative's house, that's a perfectly valid offsite repository, and it costs whatever that machine already costs you.
|
||||
|
||||
First, make sure this server can SSH into the other one without typing a password every time:
|
||||
|
||||
```bash [Terminal]
|
||||
ssh-keygen -t ed25519 -f /srv/docker/backrest/config/id_ed25519 -N ""
|
||||
ssh-copy-id -i /srv/docker/backrest/config/id_ed25519.pub youruser@theotherserver
|
||||
```
|
||||
|
||||
Mount that key into the container by adding it to the compose file's volumes:
|
||||
|
||||
```yaml [compose.yaml]
|
||||
volumes:
|
||||
# ...
|
||||
- ./config/id_ed25519:/root/.ssh/id_ed25519:ro
|
||||
```
|
||||
|
||||
Redeploy the stack, then in Backrest use:
|
||||
|
||||
```text
|
||||
sftp:youruser@theotherserver:/path/to/backups
|
||||
```
|
||||
|
||||
::caution
|
||||
__If it fails:__ the target folder (`/path/to/backups` above) has to already exist on the other server, and that user needs write access to it. SSH there once by hand first (`ssh youruser@theotherserver`) to confirm the connection works and accept the host key, Backrest running inside a container won't get the interactive prompt for that.
|
||||
::
|
||||
|
||||
## Advanced: cloud object storage
|
||||
|
||||
A local drive or a friend's spare server covers the 3-2-1 rule perfectly well, and costs nothing beyond what you already own. Cloud object storage is the other classic option, worth it once you want an offsite copy that doesn't depend on anyone's spare hardware staying online, at the cost of a few cents to a few euros a month depending on how much you back up.
|
||||
|
||||
### Backblaze B2
|
||||
|
||||
[Backblaze B2](https://www.backblaze.com/cloud-storage) is object storage built with exactly this use case in mind, and it's usually the cheapest option for the "write often, read rarely" pattern a backup is.
|
||||
|
||||
Create a bucket in your Backblaze account, then generate an **application key** scoped to it. In Backrest, use:
|
||||
|
||||
```text
|
||||
b2:your-bucket-name:backrest
|
||||
```
|
||||
|
||||
With the following Env Vars:
|
||||
|
||||
| Variable | Value |
|
||||
|----------|-------|
|
||||
| `B2_ACCOUNT_ID` | The application key ID |
|
||||
| `B2_ACCOUNT_KEY` | The application key itself |
|
||||
|
||||
### S3-compatible storage
|
||||
|
||||
S3 isn't just an Amazon thing, it's a storage protocol that most cloud providers speak (OVH, Scaleway, MinIO if you self-host your own, and plenty of others), which makes it a solid, portable choice if you'd rather not depend on one specific provider.
|
||||
|
||||
Create a bucket with your provider of choice, then in Backrest's Repository URI field, use:
|
||||
|
||||
```text
|
||||
s3:https://s3.your-provider.com/your-bucket-name/backrest
|
||||
```
|
||||
|
||||
For actual AWS S3, drop the custom endpoint:
|
||||
|
||||
```text
|
||||
s3:s3.amazonaws.com/your-bucket-name/backrest
|
||||
```
|
||||
|
||||
With the following Env Vars:
|
||||
|
||||
| Variable | Value |
|
||||
|----------|-------|
|
||||
| `AWS_ACCESS_KEY_ID` | The access key from your provider |
|
||||
| `AWS_SECRET_ACCESS_KEY` | The secret key from your provider |
|
||||
|
||||
::note
|
||||
Generate these from your provider's dashboard, usually under something like "API keys" or "S3 credentials", scoped to that one bucket only if the provider allows it. There's no reason for a backup job's key to be able to touch anything else on your account.
|
||||
::
|
||||
|
||||
### Repository maintenance (optional, but worth setting up once)
|
||||
|
||||
Back in the **Scheduling** tab, three policies keep a repository healthy over time. None of them are required to start backing up, restic works fine without ever touching them, but they're worth understanding once your repository has been running for a while:
|
||||
|
||||
:::collapsible{name="the three maintenance policies"}
|
||||
- **Prune Policy**: deletes data that's no longer referenced by any snapshot (because old snapshots holding it were forgotten, see the retention policy in the next section). This is the only operation that actually frees up space on your storage. It's slow and reads a lot of data, so schedule it rarely, once a month is Backrest's own suggestion. **Max Unused After Prune** controls how thorough it is: a higher percentage leaves more unused data behind but finishes faster and copies less.
|
||||
- **Check Policy**: verifies your repository isn't silently corrupted. **Read Data %** controls how much of the actual backed-up data gets re-read and checksummed, not just the repository's internal structure. 100% means a full re-read of everything, which uses real bandwidth and time; a smaller percentage checks a random sample instead. Once a month is, again, a reasonable default.
|
||||
- **Forget Policy**: an optional repository-wide retention rule, applied across every plan writing to this repository instead of per-plan. Leave this disabled unless you specifically want one retention policy shared by multiple plans, it disables each plan's own retention policy the moment you turn it on.
|
||||
|
||||
Every one of these has a **Schedule Type**: `Disabled`, a plain `Interval` in hours or days, or a `Cron Expression` for anything more specific, plus a **Reference Clock** (your server's local time, UTC, or relative to the last time it ran) to anchor that schedule against.
|
||||
:::
|
||||
|
||||
## Creating a backup plan
|
||||
|
||||
Back in Backrest, go to **Add Plan**. This form covers what to back up and when, as opposed to the repository form above, which only covers where:
|
||||
|
||||
- **Plan Name**: same rule as the repo name, pick something clear, you can't change it later.
|
||||
- **Repository**: the one you just created above.
|
||||
- **Paths**: click **Add** to add a row, then type in the container-side path for whatever you mounted above, it's a plain text field, but it autocompletes real paths from the container's filesystem as you type, handy to confirm a mount actually landed where you think. `/userdata/docker` for your stacks, `/userdata/etc` for your system config, `/userdata/home` for your own files. Click **Add** again for each additional folder, the small `-` button removes a row you don't need.
|
||||
- **Excludes** and **Excludes (Case Insensitive)**: patterns to skip within those paths, handy for cache folders or anything genuinely disposable that would otherwise bloat every snapshot for no reason.
|
||||
- **Schedule Type**: same three choices as the repository's own schedules above, `Disabled`, an `Interval`, or a `Cron Expression`. A nightly cron like `0 3 * * *` (every day at 3 AM) is a reasonable default for a homelab.
|
||||
- **Retention Policy**: how many snapshots to keep, and for how long. **By Time Period** lets you say "keep 7 daily, 4 weekly, 6 monthly" independently, which gives you plenty of restore points spread over time without the repository growing forever, since restic deduplicates unchanged data between snapshots anyway. **By Count** instead just keeps the last N snapshots regardless of age. **Latest (Count)** on top of either mode guarantees a minimum number of recent snapshots always survive, whatever the rest of the policy says.
|
||||
- **Advanced**: **Backup Flags** let you pass extra options straight to the underlying `restic backup` command for anything this form doesn't expose; **Hooks** run scripts or send notifications on backup events, the same mechanism as the repository's own Hooks tab, just scoped to this one plan instead of every plan using the repository.
|
||||
|
||||
That retention policy is your real defense against ransomware, by the way: if something starts encrypting your files at 2 AM, tonight's backup is compromised, but last week's snapshot isn't, and restic lets you restore from any of them.
|
||||
|
||||
::tip{icon="" to="/nonsense/bash/backrest-docker-stop"}
|
||||
✨ __Going further:__ if some of what you're backing up includes a live database, stopping its container for the few seconds a backup takes is safer than backing it up while it's being written to. See **Backrest Docker Stop** for a script that does exactly that, triggered automatically by Backrest itself.
|
||||
::
|
||||
|
||||
## Restoring a backup
|
||||
A backup you've never tried restoring is a guess, not a plan, so it's worth doing once before you actually need it. Open the plan, click into a snapshot, expand **Snapshot Browser** down to whatever you need, then click the **...** menu next to it and pick **Restore to path**.
|
||||
|
||||
Leave the path field empty and Backrest streams it straight to your browser's downloads instead, the simplest option for grabbing a single file. Type a path and Backrest writes the restored data inside the container at that location instead, and it pre-fills a scratch folder like `/userdata-backrest-restore-<snapshot id>`, deliberately not your original mount.
|
||||
|
||||
That default isn't an accident: `/srv/docker`, `/etc` and `/home` are mounted `:ro`, so restic can't write back into them, restoring straight into `/userdata/docker` fails with a read-only filesystem error. Restore to that suggested scratch path (or download instead), check what you got, then copy the files into their real place yourself with `sudo cp -a`, from the host, outside of Backrest entirely. It's one extra step, but it also means a restore can never silently clobber live data by accident, exactly the caution you want mid-incident.
|
||||
|
||||
And that's it, you now have an actual backup strategy instead of a folder called `backup_final_v2_REAL`.
|
||||
@@ -0,0 +1,169 @@
|
||||
---
|
||||
title: BTRFS Snapshots
|
||||
description: Format Debian's root filesystem with BTRFS and use Snapper to instantly roll back a risky update or config change, as a local complement to Backrest's off-site 3-2-1 backups.
|
||||
---
|
||||
|
||||
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||
[BTRFS](https://btrfs.readthedocs.io/) is a Linux filesystem with one killer feature for a homelab: **snapshots**. A snapshot freezes the exact state of a filesystem in an instant, at essentially zero cost, without copying a single byte of data upfront. Break something ten minutes after an `apt full-upgrade`, or overwrite the wrong `.env` file, and you can go back to exactly how things were before, without touching a backup at all.
|
||||
|
||||
This is not what [Backrest and the 3-2-1 rule](/serveex/advanced/backrest) are for, so it's worth being precise about the difference before setting anything up.
|
||||
|
||||
## Snapshots are not backups
|
||||
A snapshot lives on the exact same disk as the data it protects. It's instant, needs no network, and it's perfect for undoing a mistake you just made, but it does nothing at all the day that disk itself dies, gets stolen, or your server burns down. That's what a real [3-2-1 backup](/serveex/advanced/backrest) is for: a copy on different media, ideally off-site.
|
||||
|
||||
Think of it this way:
|
||||
|
||||
- **Snapshot** = an undo button. Instant, local, cheap, only useful while the disk is alive.
|
||||
- **Backup** = insurance. Slower, off-site, the only thing that survives the disk itself failing.
|
||||
|
||||
Keep both. Snapshots make you fearless about updates and experiments, backups make sure a dead drive stays an inconvenience instead of a catastrophe.
|
||||
|
||||
::note{to="/serveex/core/installation#partitioning"}
|
||||
|
||||
This guide assumes the root partition was formatted with Btrfs during [Debian's installation](/serveex/core/installation#partitioning). Btrfs can't be safely bolted onto an existing ext4 root after the fact, so this is a choice you make once, at install time.
|
||||
::
|
||||
|
||||
## Formatting the root partition with BTRFS
|
||||
Debian's *Guided* partitioning only ever offers ext4. To get Btrfs, pick *Manual* partitioning instead, at the same step [the main install guide](/serveex/core/installation#partitioning) describes:
|
||||
|
||||
::steps{level="3"}
|
||||
### Select Manual partitioning
|
||||
|
||||
At the partitioning method screen, choose *Manual* instead of *Guided - use entire disk*.
|
||||
|
||||
### Create a partition table
|
||||
|
||||
Select the disk, confirm creating a new empty partition table, then select the resulting *FREE SPACE* and choose *Create a new partition*.
|
||||
|
||||
### Set the partition size and type
|
||||
|
||||
Give the partition the rest of the disk (minus a small EFI partition if you're on UEFI, handled the same way as a Guided install), and set *Use as* to __Btrfs journaling file system__, with the mount point `/`.
|
||||
|
||||
### Finish partitioning
|
||||
|
||||
*Finish partitioning and write changes to disk*, then confirm with *Yes*.
|
||||
|
||||
### Done!
|
||||
::
|
||||
|
||||
Everything else in the [installer](/serveex/core/installation#install-debian) stays the same.
|
||||
|
||||
## Installing Snapper
|
||||
Rather than juggling raw `btrfs subvolume` commands by hand, [Snapper](https://github.com/openSUSE/snapper) is a small tool that manages the whole snapshot lifecycle: creating them, storing them tidily, pruning old ones, and automatically bracketing every `apt` operation with a snapshot pair.
|
||||
|
||||
```bash [Terminal]
|
||||
sudo apt install snapper
|
||||
sudo snapper -c root create-config /
|
||||
```
|
||||
|
||||
`create-config` registers a config named `root` for the `/` filesystem, and creates a dedicated `.snapshots` subvolume under it to store every snapshot, locked down to root. No `@`/`@home` subvolume split needed, this works fine on the plain single-subvolume layout the manual partitioning above just created.
|
||||
|
||||
Turn the config on by editing `/etc/default/snapper`:
|
||||
|
||||
```properties [/etc/default/snapper]
|
||||
SNAPPER_CONFIGS="root"
|
||||
```
|
||||
|
||||
Then enable the timers that run Snapper's periodic snapshots and cleanup:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo systemctl enable --now snapper-timeline.timer snapper-cleanup.timer
|
||||
```
|
||||
|
||||
`snapper-timeline.timer` fires **every hour** by default, that's fixed by the unit itself, not by a config option. Each run takes one snapshot and files it under the appropriate bucket (hourly, daily, monthly, yearly); the `TIMELINE_LIMIT_*` settings covered further down only control how many of each bucket survive, not how often a snapshot is taken. `snapper-cleanup.timer` runs once a day (plus once 10 minutes after boot) to enforce those limits.
|
||||
|
||||
::tip
|
||||
✨ To take timeline snapshots at a different frequency, for example every 6 hours instead of every hour, override the timer instead of editing the package's unit file directly:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo systemctl edit snapper-timeline.timer
|
||||
```
|
||||
|
||||
```ini [override.conf]
|
||||
[Timer]
|
||||
OnCalendar=
|
||||
OnCalendar=*-*-* 0/6:00:00
|
||||
```
|
||||
|
||||
The empty `OnCalendar=` line clears the packaged `hourly` value first, since systemd otherwise adds new `OnCalendar` lines to the existing ones instead of replacing them. Apply it with `sudo systemctl daemon-reload && sudo systemctl restart snapper-timeline.timer`.
|
||||
::
|
||||
|
||||
::note
|
||||
|
||||
Debian's package also ships an APT hook (`/etc/apt/apt.conf.d/80snapper`) that kicks in the moment a config is listed in `SNAPPER_CONFIGS`: from now on, every `apt install`, `apt upgrade` or `apt full-upgrade` automatically gets a snapshot right before and right after it runs, with zero extra effort on your part.
|
||||
::
|
||||
|
||||
## Taking a snapshot
|
||||
For anything outside apt, like editing a systemd unit or a Docker Compose file, take one yourself with a description that will actually mean something later:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo snapper create --description "before compose change on swag"
|
||||
```
|
||||
|
||||
List every snapshot with:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo snapper list
|
||||
```
|
||||
|
||||
```console [Output]
|
||||
# | Type | Pre # | Date | Description
|
||||
---+--------+-------+--------------------------+---------------------------------
|
||||
0 | single | | | current
|
||||
1 | single | | Tue 09 Sep 2026 18:30:00 | before compose change on swag
|
||||
2 | pre | | Tue 09 Sep 2026 19:00:01 | apt install unattended-upgrades
|
||||
3 | post | 2 | Tue 09 Sep 2026 19:00:14 | apt install unattended-upgrades
|
||||
```
|
||||
|
||||
## Restoring files from a snapshot
|
||||
Snapper keeps the full state of the filesystem at snapshot time under `/.snapshots/<number>/snapshot`, browsable like any other folder:
|
||||
|
||||
```bash [Terminal]
|
||||
ls /.snapshots/1/snapshot/etc/ssh/
|
||||
```
|
||||
|
||||
To see exactly what changed between a snapshot and the live system (`0` always means "current") before touching anything:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo snapper status 1..0
|
||||
```
|
||||
|
||||
That prints every file created, modified or deleted since. To undo those changes automatically:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo snapper undochange 1..0
|
||||
```
|
||||
|
||||
Or restore a single file by hand, which is often the safer, more surgical choice:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo cp -a /.snapshots/1/snapshot/etc/ssh/sshd_config /etc/ssh/sshd_config
|
||||
```
|
||||
|
||||
::note
|
||||
|
||||
This covers the vast majority of real homelab accidents: a bad config, a deleted file, a package upgrade that broke one thing. Snapper can also `rollback` the entire root filesystem to an earlier snapshot (it creates a new default subvolume and boots into it on the next restart), for a system in a genuinely bad state rather than just missing one file. It's a more delicate, less common operation, worth testing once on a machine you don't mind rebooting before you actually need it for real. And if the disk itself is the problem, that's exactly the scenario your off-site [Backrest](/serveex/advanced/backrest) backup is for anyway.
|
||||
::
|
||||
|
||||
## Managing and pruning snapshots
|
||||
Snapshots are cheap, not free: the moment the live filesystem diverges from one, the old blocks it still references stick around. Left unchecked, months of snapshots on a server that changes a lot (container images, logs) can quietly eat real disk space.
|
||||
|
||||
The `snapper-cleanup.timer` enabled above already prunes automatically, based on the config at `/etc/snapper/configs/root`:
|
||||
|
||||
| Setting | Default | What it does |
|
||||
|---------|---------|---------------|
|
||||
| `TIMELINE_LIMIT_HOURLY` / `_DAILY` / `_MONTHLY` / `_YEARLY` | `10` | How many timeline snapshots of each granularity to keep |
|
||||
| `TIMELINE_LIMIT_WEEKLY` | `0` | Off by default |
|
||||
| `NUMBER_LIMIT` | `50` | How many manual (`single`) snapshots to keep |
|
||||
|
||||
Adjust these to taste, then delete one immediately by hand if you need the space back right now:
|
||||
|
||||
```bash [Terminal]
|
||||
sudo snapper delete 1
|
||||
```
|
||||
|
||||
Check actual disk usage with `df -h /`: the numbers above only cap how many snapshots exist, not the space a very active server can still burn through between cleanups.
|
||||
|
||||
That's it: a rolling, automatic undo button for your server, quietly bracketing every update and pruning itself, running alongside the real backups Backrest is already taking off-site.
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: Introduction
|
||||
title: Stockeex
|
||||
description: Introduction to Stockeex, a personal project for stock and inventory management. Documentation coming soon.
|
||||
navigation:
|
||||
icon: i-lucide-bookmark
|
||||
@@ -15,5 +15,5 @@ currently writing, come back later...
|
||||
--
|
||||
```
|
||||
<div align="center">
|
||||
<img src="/img/stockeex/stockeex-raid.svg" alt="Image" style="max-width: 60%;">
|
||||
<img src="/img/stockeex/stockeex-raid.svg" alt="Diagram of a RAID array" style="max-width: 60%;">
|
||||
</div>
|
||||
|
||||
@@ -32,7 +32,7 @@ Discord alerts for GPU stock availability
|
||||
::card
|
||||
---
|
||||
icon: i-cbi-adguard
|
||||
title: Adguard CIDRE
|
||||
title: AdGuard CIDRE
|
||||
to: /nonsense/python/adguard-cidre
|
||||
ui:
|
||||
icon: text-[#68BC71]
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
---
|
||||
title: Adguard CIDRE
|
||||
title: AdGuard CIDRE
|
||||
description: A Python script to sync AdGuard Home CIDR allowlists automatically, securing your self-hosted DNS server exposed to the internet.
|
||||
---
|
||||
|
||||
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||
Adguard Home is a fantastic solution for DNS-level ad blocking and rewriting requests, perfect for removing ISP DNS trackers or intrusive ads.
|
||||
AdGuard Home is a fantastic solution for DNS-level ad blocking and rewriting requests, perfect for removing ISP DNS trackers or intrusive ads.
|
||||
|
||||
It works great locally, but if you want all your devices (even on the go) to benefit, you’ll need to expose Adguard to the internet. Unfortunately, that means anyone can use it, potentially overloading your €1/month remote VPS.
|
||||
It works great locally, but if you want all your devices (even on the go) to benefit, you’ll need to expose AdGuard to the internet. Unfortunately, that means anyone can use it, potentially overloading your €1/month remote VPS.
|
||||
|
||||
Adguard allows whitelisting or blacklisting clients. The problem? To whitelist a client, you need their IP, but for mobile phones, that IP changes often. Instead of trying to whitelist ever-changing IPs, the better approach is to block broader IP ranges by region.
|
||||
AdGuard allows whitelisting or blacklisting clients. The problem? To whitelist a client, you need their IP, but for mobile phones, that IP changes often. Instead of trying to whitelist ever-changing IPs, the better approach is to block broader IP ranges by region.
|
||||
|
||||
CIDRE is a tool that syncs geo-targeted IP ranges with firewalls. Instead of running CIDRE with a full firewall stack on the remote server, I figured I could just import those regularly updated IP ranges into Adguard’s blocklist.
|
||||
CIDRE is a tool that syncs geo-targeted IP ranges with firewalls. Instead of running CIDRE with a full firewall stack on the remote server, I figured I could just import those regularly updated IP ranges into AdGuard’s blocklist.
|
||||
|
||||
Thus, Adguard CIDRE Sync was born: a container that syncs Adguard’s blocklist with CIDRE’s updated IP ranges on a schedule of your choosing.
|
||||
Thus, AdGuard CIDRE Sync was born: a container that syncs AdGuard’s blocklist with CIDRE’s updated IP ranges on a schedule of your choosing.
|
||||
|
||||
The idea is to:
|
||||
|
||||
- Backup Adguard’s config file on first run (original untouched version saved)
|
||||
- Backup AdGuard’s config file on first run (original untouched version saved)
|
||||
- Download selected country IP ranges via an environment variable
|
||||
- Let you manually add custom IPs via a file
|
||||
- Concatenate, backup the config again (as the updated version), and inject the list into the correct blocklist section
|
||||
- Reload Adguard by restarting the container (using Docker socket proxy for limited permissions)
|
||||
- Reload AdGuard by restarting the container (using Docker socket proxy for limited permissions)
|
||||
|
||||
All fully autonomous, with frequency set via environment variable in the `docker-compose` config.
|
||||
|
||||
More info directly on the repo:
|
||||
|
||||
::card{title="🐋 __Adguard CIDRE Sync__" to="https://git.djeex.fr/Djeex/adguard-cidre" target="_blank"}
|
||||
Adguard blocklist sync bot
|
||||
::card{title="🐋 __AdGuard CIDRE Sync__" to="https://git.djeex.fr/Djeex/adguard-cidre" target="_blank"}
|
||||
AdGuard blocklist sync bot
|
||||
::
|
||||
|
||||
@@ -6,13 +6,13 @@ description: Lumeex is a static photo gallery site generator built with Python,
|
||||
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
<div align="center">
|
||||
<img src="https://git.djeex.fr/Djeex/lumeex/raw/branch/main/illustration/logo.svg" alt="Lumeex Screenshot" width="300"/>
|
||||
<img src="/img/nonsense/lumeex-logo.svg" alt="Lumeex logo" width="300"/>
|
||||
</div>
|
||||
<div align="center">
|
||||
<p>Yet another minimalist, lightweight photo gallery static site generator.</p>
|
||||
</div>
|
||||
<div align="center">
|
||||
<img src="https://git.djeex.fr/Djeex/lumeex/raw/branch/main/illustration/lumeex.png" alt="Lumeex Screenshot" />
|
||||
<img src="/img/nonsense/lumeex.png" alt="Lumeex gallery homepage" />
|
||||
</div>
|
||||
|
||||
---
|
||||
@@ -28,7 +28,7 @@ Eventually, after getting good results, I figured I might as well go all the way
|
||||
That’s how **Lum[eex]{style="color: #1ad6ff"}** was born.
|
||||
|
||||
<div align="center">
|
||||
<img src="https://git.djeex.fr/Djeex/lumeex/raw/branch/main/illustration/lumeex-webui.png" alt="Lumeex Screenshot" />
|
||||
<img src="/img/nonsense/lumeex-webui.png" alt="Lumeex configuration web UI" />
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
@@ -6,13 +6,13 @@ description: Instameex is a Docker-based tool to merge SDR and HDR photo exports
|
||||
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
<div align="center">
|
||||
<img src="https://git.djeex.fr/Djeex/instameex/raw/branch/main/src/assets/img/logo-long.svg" alt="Instameex Screenshot" width="300"/>
|
||||
<img src="/img/nonsense/instameex-logo-long.svg" alt="Instameex logo" width="300"/>
|
||||
</div>
|
||||
<div align="center">
|
||||
<p>Mix your SDR and HDR exports into an Instagram-ready HDR photo.</p>
|
||||
</div>
|
||||
<div align="center">
|
||||
<img src="https://git.djeex.fr/Djeex/instameex/raw/branch/main/illustration/instameex-illustration.png" width="640" alt="Instameex Screenshot" />
|
||||
<img src="/img/nonsense/instameex-illustration.png" width="640" alt="Instameex illustration" />
|
||||
</div>
|
||||
---
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ description: A bash script to detect and fix duplicate media files in Sonarr and
|
||||
|
||||
Six months after downloading terabytes of media, I realized that Sonarr and Radarr were copying them into my Plex library instead of creating hardlinks. This happens due to a counterintuitive mechanism: if you mount multiple folders in Sonarr/Radarr, it sees them as different filesystems and thus cannot create hardlinks. That’s why you should mount only one parent folder containing all child folders (like `downloads`, `movies`, `tvseries` inside a `media` parent folder).
|
||||
|
||||
So I restructured my directories, manually updated every path in Qbittorrent, Plex, and others. The last challenge was finding a way to detect existing duplicates, delete them, and automatically create hardlinks instead, to save space.
|
||||
So I restructured my directories, manually updated every path in qBittorrent, Plex, and others. The last challenge was finding a way to detect existing duplicates, delete them, and automatically create hardlinks instead, to save space.
|
||||
|
||||
::file-tree
|
||||
---
|
||||
|
||||
@@ -23,7 +23,7 @@ With this setup, Docker Socket Proxy communicates with Socat Proxy in their isol
|
||||
|
||||
In short:
|
||||
|
||||

|
||||

|
||||
|
||||
For example, with Beszel, the configuration would look like this:
|
||||
|
||||
@@ -77,6 +77,6 @@ services:
|
||||
|
||||
More information is available on the repository:
|
||||
|
||||
::card{title="🐋 **Socat Proxy**" to="https://git.djeex.fr/Djeex/socat-proxy" target="_blank"}
|
||||
::card{title="🐋 __Socat Proxy__" to="https://git.djeex.fr/Djeex/socat-proxy" target="_blank"}
|
||||
A lightweight bind-mount socket proxy
|
||||
::
|
||||
|
||||
@@ -6,11 +6,11 @@ description: A bash script that stops Docker containers before a Backrest backup
|
||||
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||
[Backrest](https://github.com/garethgeorge/backrest) is a fantastic backup tool. In the case of [Serveex](https://docu.djeex.fr/en/serveex/introduction), most of the data that needs to be backed up consists of containers, and those containers often include databases.
|
||||
[Backrest](https://github.com/garethgeorge/backrest) is a fantastic backup tool. In the case of [Serveex](/serveex/introduction), most of the data that needs to be backed up consists of containers, and those containers often include databases.
|
||||
|
||||
The problem? You can’t safely back up a database while it’s running. There are plenty of complex solutions involving database dumps, but often the simplest method is to stop the containers, perform the backup, and then restart them.
|
||||
|
||||
**Backrest** doesn’t natively provide this functionality, but it does allow the execution of custom scripts triggered by events, for example, at the start and end of a backup plan. Our goal is to stop the containers whose databases need to be backed up when the backup plan starts, and restart them when the backup plan finishes.To achieve this, we’ll need a small Bash script and a secure connection between Backrest and the Docker socket, to enable the following sequence:
|
||||
**Backrest** doesn’t natively provide this functionality, but it does allow the execution of custom scripts triggered by events, for example, at the start and end of a backup plan. Our goal is to stop the containers whose databases need to be backed up when the backup plan starts, and restart them when the backup plan finishes. To achieve this, we’ll need a small Bash script and a secure connection between Backrest and the Docker socket, to enable the following sequence:
|
||||
|
||||
- The backup plan starts
|
||||
- The event triggers the execution of a custom script
|
||||
|
||||
@@ -64,7 +64,7 @@ Deletion cancelled.
|
||||
|
||||
Answer `y` and it runs for real. Anything that isn't `rm`, `sudo apt update`, `sudo systemctl restart docker`, goes through without a prompt.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
::note
|
||||
|
||||
@@ -21,7 +21,7 @@ Not every article stays current forever. This section keeps two kinds of leftove
|
||||
::card
|
||||
---
|
||||
icon: i-simple-icons-wireguard
|
||||
title: Wireguard 14
|
||||
title: WireGuard 14
|
||||
to: /recycled/deprecated/wireguard-14
|
||||
ui:
|
||||
icon: text-[#88171A]
|
||||
@@ -55,7 +55,7 @@ The paid-tier alternative to Jellyfin
|
||||
::card
|
||||
---
|
||||
icon: i-cbi-qbittorrent
|
||||
title: Qbittorrent for Plex
|
||||
title: qBittorrent for Plex
|
||||
to: /recycled/alternatives/qbittorrent-for-plex
|
||||
ui:
|
||||
icon: text-[#2F67BA]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: Wireguard 14
|
||||
title: WireGuard 14
|
||||
description: Archived guide to installing WireGuard VPN using linuxserver.io's older wireguard image, kept for reference only.
|
||||
---
|
||||
|
||||
@@ -14,10 +14,10 @@ wg-easy 15 got a lot more complicated, "not so easy" anymore, arguably. That's e
|
||||
## Introduction
|
||||
Using a VPN allows remote access to a server’s local resources without exposing them to the internet. It’s a clean and secure way to access services like SSH without exposing the port publicly. With a VPN, you can securely connect to your network from anywhere and make devices on different networks communicate.
|
||||
|
||||
Here we will use [Wireguard](https://www.wireguard.com/), a secure and high-performance VPN server, using containers:
|
||||
Here we will use [WireGuard](https://www.wireguard.com/), a secure and high-performance VPN server, using containers:
|
||||
|
||||
- [wg-easy](https://github.com/wg-easy/wg-easy) as the server, providing a very simple web UI to manage connections and download config files (including QR codes for phones)
|
||||
- [Wireguard](https://docs.linuxserver.io/images/docker-wireguard/?h=wireguard) as the client for Linux systems
|
||||
- [WireGuard](https://docs.linuxserver.io/images/docker-wireguard/?h=wireguard) as the client for Linux systems
|
||||
|
||||
Clients are also available for Windows, macOS, iOS, and Android.
|
||||
|
||||
@@ -32,7 +32,7 @@ To achieve this, we’ll create a **Virtual Private Network** (VPN), i.e., a sec
|
||||
|
||||
Additionally, you can add your phone, laptop, or other devices to the VPN and securely access your server resources wherever you are.
|
||||
|
||||

|
||||

|
||||
|
||||
In this diagram, machine 1 is part of two networks:
|
||||
|
||||
@@ -140,7 +140,7 @@ IPS=
|
||||
|
||||
Deploy the stack.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
### Enable Forwarding on Host
|
||||
@@ -156,7 +156,7 @@ sudo sysctl net.ipv4.conf.all.src_valid_mark=1
|
||||
|
||||
To configure clients, download the config files from the server:
|
||||
|
||||
- Visit `http://your-server-ip:51821`
|
||||
- Visit `http://yourserverip:51821`
|
||||
- Create a client
|
||||
- Download the config file
|
||||
- Rename it to `wg0.conf`
|
||||
@@ -252,20 +252,20 @@ sudo docker compose up -d
|
||||
Repeat for each client
|
||||
::
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Other Devices
|
||||
|
||||
- **Phone:** Install Wireguard and scan the QR code from the web UI (`http://your-server-ip:51821`)
|
||||
- **PC:** Install the Wireguard client and import the config file
|
||||
- **Phone:** Install WireGuard and scan the QR code from the web UI (`http://yourserverip:51821`)
|
||||
- **PC:** Install the WireGuard client and import the config file
|
||||
|
||||
::warning
|
||||
|
||||
__Warning:__ If a client device is on the same LAN as the server, edit `wg0.conf` and change the endpoint to the local server IP:
|
||||
`Endpoint = your-server-ip:51820`
|
||||
`Endpoint = yourserverip:51820`
|
||||
::
|
||||
|
||||
And this is the result:
|
||||
|
||||

|
||||

|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: File Browser
|
||||
description: Install File Browser to browse and manage your server files from a web interface, exposed securely with SWAG.
|
||||
description: Archived guide to installing File Browser to browse and manage your server files, superseded by File Browser Quantum.
|
||||
---
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ services:
|
||||
container_name: filebrowser
|
||||
volumes:
|
||||
- /srv/docker/filebrowser/config:/config/
|
||||
- /path/to/your/folders:/yourfolders #add your folders to browse as /srv/docker:/srv/docker for exemple
|
||||
- /path/to/your/folders:/yourfolders #add your folders to browse as /srv/docker:/srv/docker for example
|
||||
ports:
|
||||
- 8010:80
|
||||
image: filebrowser/filebrowser:s6
|
||||
@@ -50,7 +50,7 @@ services:
|
||||
|
||||
Deploy the container and go to `http://yourserverip:8010`. That’s it! Your File Browser web UI is up and running!
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
::caution
|
||||
@@ -58,14 +58,14 @@ Deploy the container and go to `http://yourserverip:8010`. That’s it! Your Fil
|
||||
__If it doesn’t work:__ check your firewall rules.
|
||||
::
|
||||
|
||||
## Exposing File Browser with Swag
|
||||
## Exposing File Browser with SWAG
|
||||
|
||||
::warning
|
||||
|
||||
File Browser does not support multi-factor authentication. Exposing it publicly could put your systems at risk. Only do this if you’re using a secure authentication solution like [TinyAuth](/serveex/security/tinyauth) or [Authentik](/serveex/advanced/authentik/). Otherwise, do not expose it with SWAG. Use a VPN like [Wireguard](/serveex/core/wireguard) instead.
|
||||
File Browser does not support multi-factor authentication. Exposing it publicly could put your systems at risk. Only do this if you’re using a secure authentication solution like [TinyAuth](/serveex/security/tinyauth) or [Authentik](/serveex/advanced/authentik/). Otherwise, do not expose it with SWAG. Use a VPN like [WireGuard](/serveex/core/wireguard) instead.
|
||||
::
|
||||
|
||||
You may want to access File Browser remotely from all your devices. To do that, we’ll expose it through Swag.
|
||||
You may want to access File Browser remotely from all your devices. To do that, we’ll expose it through SWAG.
|
||||
|
||||
::note
|
||||
|
||||
@@ -81,9 +81,9 @@ In Dockge, go to the SWAG stack and edit the compose file to add File Browser’
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Connects the container to the custom network
|
||||
networks: # Connects the container to the custom network
|
||||
# ...
|
||||
- filebrowser # Name of the network declared in the stack
|
||||
|
||||
@@ -103,7 +103,7 @@ Restart the stack by clicking "deploy" and wait for SWAG to fully initialize.
|
||||
|
||||
### Create the subdomain.conf file
|
||||
|
||||
In the Swag folders, create the file `files.subdomain.conf`.
|
||||
In the SWAG folders, create the file `files.subdomain.conf`.
|
||||
|
||||
```bash [Terminal]
|
||||
sudo nano /srv/docker/swag/config/nginx/proxy-confs/files.subdomain.conf
|
||||
@@ -163,7 +163,7 @@ server {
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
That’s it! File Browser is now exposed!
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Plex
|
||||
description: Install Plex Media Server with Tautulli on your homelab to stream movies and TV shows from anywhere on all your devices.
|
||||
description: Archived guide to installing Plex Media Server with Tautulli, kept for reference — Serveex now recommends Jellyfin.
|
||||
---
|
||||
|
||||
|
||||
@@ -8,14 +8,14 @@ description: Install Plex Media Server with Tautulli on your homelab to stream m
|
||||
|
||||
::note{to="/serveex/media/jellyfin"}
|
||||
|
||||
This is an alternative to **Jellyfin**, kept here for reference. Plex isn't fully self-hosted: local playback still goes through Plex's own relay and requires a Plex account, and several features sit behind a Plex Pass paywall.
|
||||
This is an alternative to **Jellyfin**, kept here for reference. Plex isn't fully self-hosted: it requires a Plex account even for local playback, remote access can fall back to Plex's own relay when a direct connection fails, and several features sit behind a Plex Pass paywall.
|
||||
::
|
||||
|
||||
[Plex](https://www.plex.tv/fr/) is a self-hosted video streaming platform for managing your movie or TV show library and playing them locally or remotely. Plex has apps for TV, Android, iOS, Windows, and macOS, allowing you to stream your library just like Netflix.
|
||||
[Plex](https://www.plex.tv/) is a self-hosted video streaming platform for managing your movie or TV show library and playing them locally or remotely. Plex has apps for TV, Android, iOS, Windows, and macOS, allowing you to stream your library just like Netflix.
|
||||
|
||||
With *Plex Pass*, you can also organize and play your music content similar to Spotify, the difference being that it’s your content, hosted and streamed from your server.
|
||||
|
||||

|
||||

|
||||
|
||||
We'll also install [Tautulli](https://docs.linuxserver.io/images/docker-tautulli/), a tool that provides detailed stats about Plex. As always, we'll use linuxserver.io images where possible.
|
||||
|
||||
@@ -36,7 +36,7 @@ tree:
|
||||
- srv:
|
||||
- docker:
|
||||
- plex:
|
||||
- compose.yml
|
||||
- compose.yaml
|
||||
- .env
|
||||
- config/
|
||||
- transcode/
|
||||
@@ -72,7 +72,7 @@ services:
|
||||
network_mode: host
|
||||
environment:
|
||||
- PUID=${PUID}
|
||||
- PGID=${GUID}
|
||||
- PGID=${PGID}
|
||||
- TZ=Europe/Paris
|
||||
- VERSION=docker
|
||||
volumes:
|
||||
@@ -90,7 +90,7 @@ services:
|
||||
container_name: tautulli
|
||||
environment:
|
||||
- PUID=${PUID}
|
||||
- PGID=${GUID}
|
||||
- PGID=${PGID}
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- /srv/docker/tautulli/config:/config
|
||||
@@ -119,7 +119,7 @@ services:
|
||||
|
||||
### Set your environment variables
|
||||
|
||||
Find your PUID and GUID by running:
|
||||
Find your PUID and PGID by running:
|
||||
|
||||
```bash [Terminal]
|
||||
id username
|
||||
@@ -129,7 +129,7 @@ Fill in your `.env` file with the retrieved values, for example:
|
||||
|
||||
```properties [.env]
|
||||
PUID=1000
|
||||
GUID=1000
|
||||
PGID=1000
|
||||
```
|
||||
|
||||
Deploy the stack.
|
||||
@@ -142,7 +142,7 @@ Tautulli is accessible at `http://yourserverip:8181`.
|
||||
You must be on your local network during Plex's initial setup. Otherwise, the URL will redirect to your Plex account without detecting your server. A VPN won't help. If you have no choice, **you can handle the setup remotely via SSH tunnel**.
|
||||
::
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Configure Plex
|
||||
@@ -150,7 +150,7 @@ Plex offers a range of free movies/shows. After creating your account, I recomme
|
||||
|
||||
Then go to the _Remote Access_ section and manually select a port (we’ll use `1234`). It's best not to use the default port.
|
||||
|
||||

|
||||

|
||||
|
||||
- On your router, forward TCP port `1234` to port `32400` for your server’s IP using [NAT rules](/general/networking/nat).
|
||||
- Once done, return to Plex to verify that remote access is functional.
|
||||
@@ -173,7 +173,7 @@ Simply add your media to `/media/movies` and `/media/tvseries` on your server. Y
|
||||
If your media is stored on a network disk (e.g. NAS or external hard drive over the network), refer to the **Samba mount guide** so Plex can access it.
|
||||
::
|
||||
|
||||
## Expose Tautulli with Swag
|
||||
## Expose Tautulli with SWAG
|
||||
You don’t need to expose Plex, as it's accessible via your Plex account on plex.tv.
|
||||
|
||||
However, you may want to expose Tautulli so you can view stats from a simple URL when you're not home.
|
||||
@@ -192,9 +192,9 @@ Go to Dockge and edit SWAG’s compose file by adding Tautulli’s network:
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Attach container to custom network
|
||||
networks: # Attach container to custom network
|
||||
# ...
|
||||
- tautulli # Name of the declared network
|
||||
|
||||
@@ -312,7 +312,7 @@ server {
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
Wait a few minutes, then open `http://tautulli.mydomain.com` in your browser.
|
||||
|
||||
+27
-27
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Qbittorrent for Plex
|
||||
description: Install qBittorrent with Gluetun and ProtonVPN to download torrents securely behind a VPN on your self-hosted server.
|
||||
title: qBittorrent for Plex
|
||||
description: Archived guide to installing qBittorrent for a Plex setup, kept for reference — see the current qBittorrent guide instead.
|
||||
---
|
||||
|
||||
|
||||
@@ -8,22 +8,22 @@ description: Install qBittorrent with Gluetun and ProtonVPN to download torrents
|
||||
|
||||
::note{to="/serveex/media/qbittorrent"}
|
||||
|
||||
This is the seedbox setup paired with Plex rather than Jellyfin, kept here for reference. See **Qbittorrent** for the same setup paired with Jellyfin, the recommended alternative since Plex isn't fully self-hosted (its own relay, a required account) and gates features behind a Plex Pass paywall.
|
||||
This is the seedbox setup paired with Plex rather than Jellyfin, kept here for reference. See **qBittorrent** for the same setup paired with Jellyfin, the recommended alternative since Plex isn't fully self-hosted (its own relay, a required account) and gates features behind a Plex Pass paywall.
|
||||
::
|
||||
|
||||

|
||||

|
||||
|
||||
To safely download your favorite media, we'll build a system using:
|
||||
|
||||
- [Qbittorrent](https://github.com/linuxserver/docker-qbittorrent) as the BitTorrent client
|
||||
- [qBittorrent](https://github.com/linuxserver/docker-qbittorrent) as the BitTorrent client
|
||||
- [Proton VPN Plus](https://protonvpn.com/torrenting), a VPN to secure your traffic. You need a subscription (promos available) to access the BitTorrent protocol. You can also use another VPN as long as it supports BitTorrent.
|
||||
- [Gluetun](https://github.com/qdm12/gluetun)
|
||||
- [Qbittorrent port update](https://codeberg.org/TechnoSam/qbittorrent-gluetun-port-update) to automatically update the VPN port (which changes regularly).
|
||||
- [qBittorrent port update](https://codeberg.org/TechnoSam/qbittorrent-gluetun-port-update) to automatically update the VPN port (which changes regularly).
|
||||
- The [VueTorrent](https://github.com/gabe565/linuxserver-mod-vuetorrent) mod for a modern and intuitive UI.
|
||||
|
||||
Here’s the system we’ll set up:
|
||||
|
||||

|
||||

|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -39,7 +39,7 @@ tree:
|
||||
- gluetun/
|
||||
- compose.yaml
|
||||
- .env
|
||||
- "media # linked to Plex and Qbittorrent":
|
||||
- "media # linked to Plex and qBittorrent":
|
||||
- "downloads/ # generic downloads, selected in settings"
|
||||
- "movies/ # used for downloading movies"
|
||||
- "tvseries/ # used for downloading TV shows"
|
||||
@@ -52,7 +52,7 @@ tree:
|
||||
If not already done, create the `downloads` folder under `/media`:
|
||||
|
||||
```bash [Terminal]
|
||||
mkdir -P /media/downloads
|
||||
mkdir -p /media/downloads
|
||||
```
|
||||
|
||||
### Deploy the stack
|
||||
@@ -72,7 +72,7 @@ services:
|
||||
- DOCKER_MODS=ghcr.io/gabe565/linuxserver-mod-vuetorrent|ghcr.io/t-anc/gsp-qbittorent-gluetun-sync-port-mod:main
|
||||
- TZ=Europe/Paris
|
||||
- PUID=${PUID}
|
||||
- PGID=${GUID}
|
||||
- PGID=${PGID}
|
||||
- WEBUI_PORT=${UI_PORT}
|
||||
- GSP_GTN_API_KEY=${GSP_KEY}
|
||||
- GSP_QBT_USERNAME=${ID}
|
||||
@@ -93,7 +93,7 @@ services:
|
||||
devices:
|
||||
- /dev/net/tun:/dev/net/tun
|
||||
ports:
|
||||
- ${UI_PORT}:5695 # Port de la web-ui
|
||||
- ${UI_PORT}:${UI_PORT} # Port de la web-ui
|
||||
- 8000:8000 # Port de controle de Gluetun
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
@@ -127,7 +127,7 @@ services:
|
||||
|
||||
### Configure the port-forwarding sync
|
||||
|
||||
Before editing the `.env` in Dockge, let's configure the download port update. Proton and most VPNs rotate the forwarding port, which must be communicated to Qbittorrent.
|
||||
Before editing the `.env` in Dockge, let's configure the download port update. Proton and most VPNs rotate the forwarding port, which must be communicated to qBittorrent.
|
||||
|
||||
We’ve added the mod `ghcr.io/t-anc/gsp-qbittorent-gluetun-sync-port-mod` to the container.
|
||||
|
||||
@@ -169,7 +169,7 @@ In Dockge, fill in the variables in `.env`:
|
||||
|
||||
```properties [.env]
|
||||
PUID=
|
||||
GUID=
|
||||
PGID=
|
||||
UI_PORT=
|
||||
PR_KEY=
|
||||
GSP_KEY= # the key you generated and entered in config.toml
|
||||
@@ -182,14 +182,14 @@ Detailed info:
|
||||
| Variable | Description | Example |
|
||||
|------------|-------------|---------|
|
||||
| `PUID` | User ID (`id yourusername`) | `1000` |
|
||||
| `GUID` | Group ID (`id yourusername`) | `1000` |
|
||||
| `PGID` | Group ID (`id yourusername`) | `1000` |
|
||||
| `UI_PORT` | Port for accessing the web UI | `5695` |
|
||||
| `PR_KEY` | Private key from Proton | `buKsjNHLyzKMM1qYnzOy4s7SHfly` |
|
||||
| `GSP_KEY` | Key you generated for port update | `MnBa47MeVmk7xiv` |
|
||||
| `ID` | Qbittorrent UI login username | `user` |
|
||||
| `PW` | Qbittorrent UI password | `password` |
|
||||
| `ID` | qBittorrent UI login username | `user` |
|
||||
| `PW` | qBittorrent UI password | `password` |
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
## Deployment
|
||||
@@ -206,7 +206,7 @@ Once done, deploy the container.
|
||||
|
||||
### Log in and secure your account
|
||||
|
||||
Login at `http://server-ip:5695` (or the port you set).
|
||||
Login at `http://yourserverip:5695` (or the port you set).
|
||||
|
||||
::caution
|
||||
|
||||
@@ -215,10 +215,10 @@ __If login fails:__ check your firewall rules.
|
||||
|
||||
Change your username and password in the "webui" settings.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
You're done! In Qbittorrent settings, under "Downloads", set `/media/downloads` as the default folder.
|
||||
You're done! In qBittorrent settings, under "Downloads", set `/media/downloads` as the default folder.
|
||||
|
||||
When adding a download, remember to select the proper directory so Plex can sync correctly (`/media/movies` or `/media/tvseries`). You can also automate this with categories and folders.
|
||||
|
||||
@@ -226,10 +226,10 @@ When adding a download, remember to select the proper directory so Plex can sync
|
||||
|
||||
::warning
|
||||
|
||||
Qbittorrent does not support multi-factor authentication. Exposing it to the internet may put your system at risk. Only do this if you use MFA via [Authentik](/serveex/advanced/authentik/). Otherwise, don’t expose it with SWAG. Use a VPN like [Wireguard](/serveex/core/wireguard) instead.
|
||||
qBittorrent does not support multi-factor authentication. Exposing it to the internet may put your system at risk. Only do this if you use MFA via [Authentik](/serveex/advanced/authentik/). Otherwise, don’t expose it with SWAG. Use a VPN like [WireGuard](/serveex/core/wireguard) instead.
|
||||
::
|
||||
|
||||
To start downloads from outside your home, without a VPN, you can expose the Qbittorrent web UI.
|
||||
To start downloads from outside your home, without a VPN, you can expose the qBittorrent web UI.
|
||||
|
||||
::note
|
||||
|
||||
@@ -262,7 +262,7 @@ Click "Deploy" and wait for SWAG to fully initialize.
|
||||
|
||||
::note
|
||||
|
||||
We assume the network name is `seedbox_default`. You can confirm by checking the SWAG dashboard at http://server-ip:81.
|
||||
We assume the network name is `seedbox_default`. You can confirm by checking the SWAG dashboard at http://yourserverip:81.
|
||||
::
|
||||
|
||||
### Create the subdomain.conf file
|
||||
@@ -322,7 +322,7 @@ server {
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
set $upstream_app gluetun;
|
||||
set $upstream_port 5555;
|
||||
set $upstream_port 5695;
|
||||
set $upstream_proto http;
|
||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
|
||||
@@ -336,11 +336,11 @@ server {
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
Wait a few minutes, then go to `https://seedbox.mydomain.com`. You should land on the Qbittorrent interface.
|
||||
Wait a few minutes, then go to `https://seedbox.mydomain.com`. You should land on the qBittorrent interface.
|
||||
|
||||
And that’s it! You now have a ready-to-use media center.
|
||||
|
||||

|
||||

|
||||
+19
-19
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Servarr for Plex
|
||||
description: Automate media downloads with the Servarr stack, Radarr, Sonarr, Bazarr, Prowlarr, and Overseerr for movies and TV shows.
|
||||
description: Archived guide to the Servarr stack for a Plex setup, kept for reference — see the current Servarr guide instead.
|
||||
---
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ tree:
|
||||
- srv:
|
||||
- docker:
|
||||
- plex:
|
||||
- compose.yml
|
||||
- compose.yaml
|
||||
- config/
|
||||
- transcode/
|
||||
- tautulli:
|
||||
@@ -57,7 +57,7 @@ tree:
|
||||
::warning
|
||||
|
||||
__Warning:__ Make sure to follow this file structure carefully, especially the `media` folder. This folder must be mounted **exactly the same way** in both the _Qbittorrent_ compose file (`/your/path/media:/media`) and the _arr_ applications.
|
||||
If not, the _arr_ apps may not recognize the path provided by Qbittorrent and will fail to create _hardlinks_.
|
||||
If not, the _arr_ apps may not recognize the path provided by qBittorrent and will fail to create _hardlinks_.
|
||||
Without hardlinks, the _arr_ apps will copy the files instead, **doubling the space used** on your storage.
|
||||
::
|
||||
|
||||
@@ -197,19 +197,19 @@ Set your `.env` file with the variables below:
|
||||
|
||||
```properties [.env]
|
||||
PUID=
|
||||
GUID=
|
||||
PGID=
|
||||
MEDIA_PATH=
|
||||
```
|
||||
|
||||
| Variable | Description | Example |
|
||||
|----------------|-------------------------------------------------------------------------------------------------|-------------|
|
||||
| `PUID` | Set using your user info (check with `id yourusername`) | `1000` |
|
||||
| `GUID` | Same as above | `1000` |
|
||||
| `MEDIA_PATH` | Path to your media folder, here: `/media`. It must match the one used by Qbittorrent. | `/media` |
|
||||
| `PGID` | Same as above | `1000` |
|
||||
| `MEDIA_PATH` | Path to your media folder, here: `/media`. It must match the one used by qBittorrent. | `/media` |
|
||||
|
||||
Deploy the stack.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
### Configure Radarr
|
||||
@@ -233,7 +233,7 @@ Create an account and choose *forms login*.
|
||||
|
||||
::warning
|
||||
|
||||
__Warning:__ If you already have movies in `movies` from Qbittorrent, do not let Radarr add them. Radarr might modify them, which could stop seeding in Qbittorrent.
|
||||
__Warning:__ If you already have movies in `movies` from qBittorrent, do not let Radarr add them. Radarr might modify them, which could stop seeding in qBittorrent.
|
||||
::
|
||||
|
||||
#### Configure Profiles
|
||||
@@ -242,12 +242,12 @@ Go to *Settings > Profiles*. These are your default quality profiles. When you m
|
||||
|
||||

|
||||
|
||||
#### Add Qbittorrent
|
||||
#### Add qBittorrent
|
||||
|
||||
In *Settings > Download Clients*, add Qbittorrent.
|
||||
In *Settings > Download Clients*, add qBittorrent.
|
||||
|
||||
- Use your server IP as *Host* and port `5695` if following this guide.
|
||||
- Provide your Qbittorrent *Username* and *Password*.
|
||||
- Provide your qBittorrent *Username* and *Password*.
|
||||
- Click *Test*.
|
||||
- If successful, click *Save*.
|
||||
|
||||
@@ -264,7 +264,7 @@ Go to *Settings > Connect*, add a new connection and choose *Plex Media Server*.
|
||||
|
||||
- Go to *Settings > General* and copy your *API Key* for later use.
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
### Configure Sonarr
|
||||
@@ -304,7 +304,7 @@ In *Settings > Apps*, add Radarr and Sonarr with the following details:
|
||||
- API Key: use the one copied from Radarr and Sonarr.
|
||||
- Click *Test*, then *Save* if all goes well.
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
### Configuring Bazarr
|
||||
@@ -349,7 +349,7 @@ Go to *Settings > General* and create a username and password using *forms login
|
||||
|
||||
Repeat the same steps for Radarr.
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
### Configuring Overseerr
|
||||
@@ -404,7 +404,7 @@ If the test succeeds, continue filling in the fields:
|
||||
- Check all 4 boxes at the bottom.
|
||||
- Save and continue.
|
||||
|
||||
#### Done !
|
||||
#### Done!
|
||||
::
|
||||
|
||||
And that’s it! Just request a movie or series, then check in qBittorrent or Radarr/Sonarr. Within a few minutes, your media will be available on Plex!
|
||||
@@ -415,7 +415,7 @@ It can be useful to expose Overseerr if you want to send requests from outside y
|
||||
|
||||
::note
|
||||
|
||||
We assume you have the subdomain `films.mydomain.com` with a `CNAME` pointing to `films.fr` in your [DNS zone](/general/networking/dns). And that [unless you’re using Cloudflare Zero Trust](/serveex/security/cloudflare), port `443` on your router is forwarded to port `443` on your server via [NAT rules](/general/networking/nat).
|
||||
We assume you have the subdomain `films.mydomain.com` with a `CNAME` pointing to `mydomain.com` in your [DNS zone](/general/networking/dns). And that [unless you’re using Cloudflare Zero Trust](/serveex/security/cloudflare), port `443` on your router is forwarded to port `443` on your server via [NAT rules](/general/networking/nat).
|
||||
::
|
||||
|
||||
::steps{level="3"}
|
||||
@@ -427,9 +427,9 @@ Go to Dockge, edit the SWAG compose file, and add the Overseerr network, which i
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Connects the container to a custom network
|
||||
networks: # Connects the container to a custom network
|
||||
# ...
|
||||
- plex # Name of the network declared in the stack
|
||||
|
||||
@@ -522,7 +522,7 @@ server {
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
Wait a few minutes, then visit `http://films.mydomain.com` in your browser.
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Gitea
|
||||
description: Install Gitea, a lightweight self-hosted Git service to manage your code repositories privately on your own server.
|
||||
description: Archived guide to installing Gitea, kept for reference — Serveex now recommends Forgejo.
|
||||
---
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ This is an alternative to **Forgejo**, the community-run fork created after Gite
|
||||
|
||||
[Gitea](https://about.gitea.com/) is a self-hosted DevOps platform that allows you to manage repositories much like GitHub, but on your own infrastructure.
|
||||
|
||||

|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
@@ -67,7 +67,7 @@ GID=1000
|
||||
|
||||
Deploy the container and go to `http://yourserverip:3333`. Your Gitea instance is now up and running!
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
::caution
|
||||
@@ -75,8 +75,8 @@ Deploy the container and go to `http://yourserverip:3333`. Your Gitea instance i
|
||||
__If it fails:__ check your firewall rules.
|
||||
::
|
||||
|
||||
## Exposing Gitea with Swag
|
||||
The benefit of this setup is being able to access it remotely from any of your devices. To do so, we’ll expose Gitea through Swag.
|
||||
## Exposing Gitea with SWAG
|
||||
The benefit of this setup is being able to access it remotely from any of your devices. To do so, we’ll expose Gitea through SWAG.
|
||||
|
||||
::note
|
||||
|
||||
@@ -92,9 +92,9 @@ In Dockge, go to the SWAG stack and edit the compose file by adding Gitea's netw
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Connect the container to the custom network
|
||||
networks: # Connect the container to the custom network
|
||||
# ...
|
||||
- gitea # Name of the declared network
|
||||
|
||||
@@ -114,7 +114,7 @@ Redeploy the stack by clicking "Deploy" and wait until SWAG is fully operational
|
||||
|
||||
### Create the subdomain.conf file
|
||||
|
||||
Inside the Swag folders, create the file `gitea.subdomain.conf`.
|
||||
Inside the SWAG folders, create the file `gitea.subdomain.conf`.
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
✨ __Tip:__ You can use **File Browser** to navigate and edit your files instead of using terminal commands.
|
||||
@@ -203,11 +203,11 @@ ROOT_URL = https://gitea.yourdomain.com/
|
||||
|
||||
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit, then restart the container.
|
||||
|
||||
### Done !
|
||||
### Done!
|
||||
::
|
||||
|
||||
And that’s it! Gitea is now exposed to the web.
|
||||
|
||||
::tip{icon=""}
|
||||
✨ __Tip:__ You can protect this app natively via OIDC with [Pocket ID](/serveex/security/pocket-id) (register it as an OIDC client), or with Authentik by [following these instructions](https://docs.goauthentik.io/integrations/services/gitea/).
|
||||
✨ __Tip:__ You can protect this app natively via OIDC with [Pocket ID](/serveex/security/pocket-id) (register it as an OIDC client), or with Authentik by [following these instructions](https://integrations.goauthentik.io/development/gitea/).
|
||||
::
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@ seo:
|
||||
:::::
|
||||
|
||||
:::::div{class="my-6 pt-[25px] pb-[25px]"}
|
||||
{.w-full}
|
||||
{.w-full}
|
||||
:::::
|
||||
|
||||
:::::div{class="flex flex-col sm:flex-row sm:items-center gap-3"}
|
||||
@@ -43,7 +43,7 @@ Set up my homelab →
|
||||
::::
|
||||
|
||||
::::div{class="flex flex-col gap-5 justify-start self-start"}
|
||||
<h2 class="text-sm font-semibold text-muted uppercase tracking-wide mt-0 mb-0">And Other dumb things</h2>
|
||||
<h2 class="text-sm font-semibold text-muted uppercase tracking-wide mt-0 mb-0">And other dumb things</h2>
|
||||
|
||||
:::::card
|
||||
---
|
||||
|
||||
@@ -16,9 +16,9 @@ __Docu[·]{style="color: #1ad6ff"}djeex__ est le site regroupant la documentatio
|
||||
|
||||
## À propos de la documentation
|
||||
|
||||
La documentation fournie ici est distribuée à titre expérimentale, dans un esprit de partage d'expérience. Elle n'est en aucun cas faite pour construire une architecture de production ou pour de l'industrialisation. Il est possible qu'elle contienne des erreurs et/ou des approximations.
|
||||
La documentation fournie ici est distribuée à titre expérimental, dans un esprit de partage d'expérience. Elle n'est en aucun cas faite pour construire une architecture de production ou pour de l'industrialisation. Il est possible qu'elle contienne des erreurs et/ou des approximations.
|
||||
|
||||
Evidemment, l'usage de cette documentation doit strictement se limiter au cadre légal.
|
||||
Évidemment, l'usage de cette documentation doit strictement se limiter au cadre légal.
|
||||
|
||||
### Documentation disponible ou à venir
|
||||
|
||||
@@ -43,7 +43,7 @@ Votre homelab à déployer, pas à pas
|
||||
Scripts personnels et projets annexes
|
||||
::
|
||||
|
||||
::card{icon="i-noto-recycling-symbol" title="Poubelle" to="/recycled/deprecated/wireguard-14"}
|
||||
::card{icon="i-noto-recycling-symbol" title="Recyclage" to="/recycled/deprecated/wireguard-14"}
|
||||
Pages périmées, conservées pour archive ou alternatives
|
||||
::
|
||||
::
|
||||
|
||||
@@ -7,11 +7,11 @@ description: Comprendre le NAT, la redirection de ports et le DHCP sur un routeu
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||
|
||||

|
||||

|
||||
|
||||
## Qu'est-ce qu'un « port » ?
|
||||
|
||||
Les ports sont différents canaux par lesquels votre routeur envoie et reçoit des données, ce qui permet d'utiliser plusieurs services en meme temps. Lorsqu'il reçoit des données via un port, rvotre outeur transmet ensuite les données à la machine qui : :
|
||||
Les ports sont différents canaux par lesquels votre routeur envoie et reçoit des données, ce qui permet d'utiliser plusieurs services en même temps. Lorsqu'il reçoit des données via un port, votre routeur transmet ensuite les données à la machine qui :
|
||||
|
||||
- soit a émis la requête de départ,
|
||||
- soit est configurée pour recevoir les données arrivant sur un port spécifique.
|
||||
|
||||
@@ -8,11 +8,11 @@ description: Comprendre le fonctionnement du DNS, lire et éditer une zone DNS,
|
||||
|
||||
## Introduction
|
||||
|
||||
Lorsque vous naviguez sur un site, ou une application, des requêtes sont émises vers un ou des domaines afin d'afficher le contenu de votre page. Votre appareil ne connait pas les adresses IP de ces serveurs à joindre. Pour les connaitre, il va contacter un _serveur de nom_ (Domain Name Server) qui lui va lui répondre avec l'adresse IP la plus à jour pour le domaine de la requête.
|
||||
Lorsque vous naviguez sur un site, ou une application, des requêtes sont émises vers un ou des domaines afin d'afficher le contenu de votre page. Votre appareil ne connait pas les adresses IP de ces serveurs à joindre. Pour les connaitre, il va contacter un _serveur de nom_ (Domain Name Server) qui va lui répondre avec l'adresse IP la plus à jour pour le domaine de la requête.
|
||||
|
||||
La zone DNS, c'est une sorte de registre avec des panneaux qui redirige vos requêtes vers la bonne destination.
|
||||
|
||||

|
||||

|
||||
|
||||
## La zone DNS
|
||||
|
||||
@@ -23,21 +23,22 @@ Vous pouvez rentrer des _enregistrements_ dans cette zone DNS qui permettront d'
|
||||
Exemple d'une zone DNS du domaine mondomaine.fr:
|
||||
|
||||
```
|
||||
$TTL 3600
|
||||
@ IN SOA ns1.dns.me. dns.net. (2024051800 86400 3600 3600000 60)
|
||||
IN NS ns1.dns.me.
|
||||
IN NS ns2.dns.me.
|
||||
IN A 203.0.113.0
|
||||
www IN CNAME mondomaine.fr
|
||||
sousdomaine IN CNAME mondomaine.fr
|
||||
IN A 203.0.113.10
|
||||
www IN CNAME mondomaine.fr.
|
||||
sousdomaine IN CNAME mondomaine.fr.
|
||||
```
|
||||
|
||||
Dans cet exemple :
|
||||
|
||||
- `$TTL 3600` indique aux différents serveurs de noms de la planète que les enregistrement sont valides 1h (et qu'au-delà il faudra rev"rifier).
|
||||
- `$TTL 3600` indique aux différents serveurs de noms de la planète que les enregistrements sont valides 1h (et qu'au-delà il faudra revérifier).
|
||||
- `IN SOA ns1.dns.me. dns.net. (2024051800 86400 3600 3600000 60)` indique que `ns1.dns.me` est le serveur dns principal, et les nombres sont des indications de rafraichissement.
|
||||
- `IN NS ns1.dns.me.` et `IN NS ns2.dns.me.` indique que `ns1.dns.me` et `ns2.dns.me` sont des serveurs de noms pour ce domaine.
|
||||
- `IN A 203.0.113.0` signifie que `mondomaine.fr` pointe vers l'IP `203.0.113.0`
|
||||
- `sousdomaine IN CNAME mondomaine.fr` signifie que `sousdomaine.mondomaine.fr` pointe vers `mondomaine.fr` et donc vers l'IP `203.0.113.0`.
|
||||
- `IN A 203.0.113.10` signifie que `mondomaine.fr` pointe vers l'IP `203.0.113.10`
|
||||
- `sousdomaine IN CNAME mondomaine.fr.` signifie que `sousdomaine.mondomaine.fr` pointe vers `mondomaine.fr` et donc vers l'IP `203.0.113.10`.
|
||||
|
||||
Ainsi, si vous choisissez de pointer le domaine `mondomaine.fr` vers votre serveur, vous pouvez le faire en ajoutant un enregistrement `A` pointant vers l'IP publique de votre serveur.
|
||||
|
||||
@@ -55,4 +56,4 @@ Et si vous ajoutez un sous-domaine qui doit pointer vers votre serveur, vous pou
|
||||
__Pourquoi ne pas utiliser un enregistrement `A` pour le sous-domaine ?__ Si votre sous domaine pointe sur le meme serveur que `mondomaine.fr`, il vaut mieux utiliser un enregistrement `CNAME` car en cas de changement d'IP du serveur, il n'y aura aucune autre manipulation à faire.
|
||||
::
|
||||
|
||||
La plupart des registrar proposent des interfaces plus lisbles pour modifier ces informations. Renseignez-vous auprès de la documentation de votre registrar.
|
||||
La plupart des registrar proposent des interfaces plus lisibles pour modifier ces informations. Renseignez-vous auprès de la documentation de votre registrar.
|
||||
|
||||
@@ -6,16 +6,16 @@ description: Configurer Samba sur Debian pour partager des dossiers sur votre r
|
||||
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||
Samba est un protocole permettant d'accèder à un dossier situé sur un disque réseau. Il peut être configuré sous Mac, Windows ou Linux.
|
||||
Samba est une implémentation libre du protocole SMB/CIFS, permettant d'accèder à un dossier situé sur un disque réseau. Il peut être configuré sous Mac, Windows ou Linux.
|
||||
|
||||
De nombreux tutorials existent pour configurer Samba sous windows ou sur un NAS type Synology, ici nous nous concentrons sur Debian.
|
||||
De nombreux tutoriels existent pour configurer Samba sous Windows ou sur un NAS type Synology, ici nous nous concentrons sur Debian.
|
||||
|
||||

|
||||
|
||||
## Créer et configurer un dossier réseau partagé
|
||||
::note
|
||||
|
||||
Ici, nous allons partager le dossier `/video` d'une machine distant que nous appelerons `machine-distante`. Nous accéderons à ce dossier par la machine nommée `machine-locale`. L'utilisateur de connexion au disque réseau sera `sambauser`.
|
||||
Ici, nous allons partager le dossier `/video` d'une machine distante que nous appellerons `machine-distante`. Nous accéderons à ce dossier par la machine nommée `machine-locale`. L'utilisateur de connexion au disque réseau sera `sambauser`.
|
||||
::
|
||||
|
||||
::steps{level="3"}
|
||||
@@ -75,7 +75,7 @@ Comme nous avons configuré un partage sécurisé, nous allons devoir créer un
|
||||
sudo groupadd smbshare
|
||||
```
|
||||
|
||||
Nous allons maintenant permettre au groupe d'avoir le controle sur le dossier `/video`.
|
||||
Nous allons maintenant permettre au groupe d'avoir le contrôle sur le dossier `/video`.
|
||||
|
||||
```bash [Terminal]
|
||||
sudo chgrp -R smbshare /video
|
||||
@@ -88,13 +88,13 @@ sudo chmod 2775 /video
|
||||
```
|
||||
### Créer l'utilisateur
|
||||
|
||||
A présent nous allons ajouter un utilisateur nologin c'est à dire que cet utilisateur ne pourra pas se connecter sur le serveur pour faire des opérations, mais pourra tout de meme se connecter au service samba.
|
||||
A présent nous allons ajouter un utilisateur nologin c'est-à-dire que cet utilisateur ne pourra pas se connecter sur le serveur pour faire des opérations, mais pourra tout de même se connecter au service samba.
|
||||
|
||||
```bash [Terminal]
|
||||
sudo useradd -M -s /sbin/nologin sambauser
|
||||
```
|
||||
|
||||
Puis nous ajoutons l'utilisateur au groupe `sambashare` que nous avons créé précédemment.
|
||||
Puis nous ajoutons l'utilisateur au groupe `smbshare` que nous avons créé précédemment.
|
||||
|
||||
```bash [Terminal]
|
||||
sudo usermod -aG smbshare sambauser
|
||||
@@ -126,7 +126,7 @@ sudo apt install cifs-utils
|
||||
|
||||
### Créer le dossier de destination
|
||||
|
||||
Nous allons créer un dossier sur notre serveur sur lequel sera monté le dossier partagé de notre `machine-distante`. C'est à dire que dans ce dossier nous retrouverons le contenu du dossier partagé de notre `machine-distante`. Ici nous appellerons ce dossier `/mnt/video`.
|
||||
Nous allons créer un dossier sur notre serveur sur lequel sera monté le dossier partagé de notre `machine-distante`. C'est-à-dire que dans ce dossier nous retrouverons le contenu du dossier partagé de notre `machine-distante`. Ici nous appellerons ce dossier `/mnt/video`.
|
||||
|
||||
```bash [Terminal]
|
||||
sudo mkdir /mnt/video
|
||||
@@ -146,16 +146,16 @@ sudo nano /smb/.credentials
|
||||
Configurez comme suit :
|
||||
|
||||
```properties [.credentials]
|
||||
username=smbuser
|
||||
username=sambauser
|
||||
password=motdepasse
|
||||
```
|
||||
|
||||
* `smbuser` : L'utilisateur que nous avons configuré sur la `machine-distante`
|
||||
* `sambauser` : L'utilisateur que nous avons configuré sur la `machine-distante`
|
||||
* `motdepasse` : Le mot de passe que nous avons configuré sur la `machine-distante`
|
||||
|
||||
Enregistrez avec :kbd{value="Ctrl+O"} puis :kbd{value="Entrée"}, puis quittez avec :kbd{value="Ctrl+X"}.
|
||||
|
||||
Nous allons modifier les permissions du dossier afin que seul le propriétaire puis lire et écrire dans ce fichier.
|
||||
Nous allons modifier les permissions du dossier afin que seul le propriétaire puisse lire et écrire dans ce fichier.
|
||||
|
||||
```bash [Terminal]
|
||||
sudo chmod 600 /smb/.credentials
|
||||
@@ -182,7 +182,7 @@ Vérifiez que cela a fonctionné en tapant :
|
||||
sudo mount -t cifs
|
||||
```
|
||||
|
||||
Vous verrez différentes informations qui confirmerons le succès du montage.
|
||||
Vous verrez différentes informations qui confirmeront le succès du montage.
|
||||
|
||||
Et voilà, à présent vous accédez au dossier /video de `votre machine-distante`, depuis votre `machine-locale` !
|
||||
|
||||
@@ -199,7 +199,7 @@ sudo cp /etc/fstab /etc/fstab.bak
|
||||
Puis nous allons ajouter une ligne à la fin du fichier comportant les informations de montages dans le fichier `fstab`.
|
||||
|
||||
```bash [Terminal]
|
||||
sudo echo //ip-machine-distante/video /mnt/video cifs _netdev,nofail,credentials=/smb/.credentials,x-systemd.automount,x-systemd.device-timeout=15 0 0 >> /etc/fstab
|
||||
echo "//ip-machine-distante/video /mnt/video cifs _netdev,nofail,credentials=/smb/.credentials,x-systemd.automount,x-systemd.device-timeout=15 0 0" | sudo tee -a /etc/fstab
|
||||
```
|
||||
|
||||
Redémarrez.
|
||||
|
||||
@@ -30,7 +30,7 @@ Il existe plusieurs types de RAID, chacun ayant ses avantages et inconvénients.
|
||||
### Sans RAID
|
||||
|
||||
<div style="display: flex; align-items: center;">
|
||||
<img src="/img/global/no-raid.svg" alt="Image" style="max-width: 30%; max-height:230px; margin-right: 20px;">
|
||||
<img src="/img/global/no-raid.svg" alt="Disques sans redondance RAID" style="max-width: 30%; max-height:230px; margin-right: 20px;">
|
||||
<ul>
|
||||
<li>Vos disques sans RAID. Les données sont stockées disque par disque.</li>
|
||||
<li>Si vous perdez un disque, seules ses données sont perdues.</li>
|
||||
@@ -43,7 +43,7 @@ Utilisez vos disques sans RAID si vous n’avez pas peur de perdre des données
|
||||
### RAID 0
|
||||
|
||||
<div style="display: flex; align-items: center;">
|
||||
<img src="/img/global/raid0.svg" alt="Image" style="max-width: 30%; max-height:230px; margin-right: 20px;">
|
||||
<img src="/img/global/raid0.svg" alt="RAID 0 répartissant les données entre les disques" style="max-width: 30%; max-height:230px; margin-right: 20px;">
|
||||
<ul>
|
||||
<li>Le système voit un seul disque.</li>
|
||||
<li>Les données sont entrelacées entre tous les disques.</li>
|
||||
@@ -54,12 +54,12 @@ Utilisez vos disques sans RAID si vous n’avez pas peur de perdre des données
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Utilisez RAID 0 si vous souhaitez privilégier la performance et que la perte de données n’est pas un problème. Idéal pour le stockage temporaire à haute vitesse (montage vidéo, IA, etc). Pas adapté au stockage à long terme.
|
||||
Utilisez RAID 0 si vous souhaitez privilégier la performance et que la perte de données n’est pas un problème. Idéal pour le stockage temporaire à haute vitesse (montage vidéo, IA, etc). Pas adapté au stockage à long terme, car la perte d'un seul disque entraîne la perte totale des données.
|
||||
|
||||
### RAID 1
|
||||
|
||||
<div style="display: flex; align-items: center;">
|
||||
<img src="/img/global/raid1.svg" alt="Image" style="max-width: 30%; max-height:230px; margin-right: 20px;">
|
||||
<img src="/img/global/raid1.svg" alt="RAID 1 dupliquant les données entre les disques" style="max-width: 30%; max-height:230px; margin-right: 20px;">
|
||||
<ul>
|
||||
<li>Le système voit un seul disque.</li>
|
||||
<li>Tous les disques contiennent les mêmes données.</li>
|
||||
@@ -78,7 +78,7 @@ Utilisez RAID 1 pour une redondance maximale. Chaque disque contient toutes les
|
||||
|
||||
### RAID 5
|
||||
<p align="center">
|
||||
<img src="/img/global/raid5.svg" alt="Image" style="max-width: 40%; margin-right: 20px;">
|
||||
<img src="/img/global/raid5.svg" alt="RAID 5 avec parité distribuée" style="max-width: 40%; margin-right: 20px;">
|
||||
</p>
|
||||
|
||||
- Le système voit un seul disque.
|
||||
@@ -92,7 +92,7 @@ Utilisez RAID 5 pour un stockage fiable avec 3 à 5 disques et une perte minimal
|
||||
|
||||
### RAID 6
|
||||
<p align="center">
|
||||
<img src="/img/global/raid6.svg" alt="Image" style="max-width: 50%; margin-right: 20px;">
|
||||
<img src="/img/global/raid6.svg" alt="RAID 6 avec double parité distribuée" style="max-width: 50%; margin-right: 20px;">
|
||||
</p>
|
||||
|
||||
- Le système voit un seul disque.
|
||||
|
||||
@@ -7,7 +7,7 @@ description: Introduction à ZFS, système de fichiers et gestionnaire de volume
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||
|
||||
ZFS est populaire dans le monde des serveurs, des NAS (comme FreeNAS / TrueNAS), de la virtualisation, et même chez les particuliers qui veulent un stockage résilient. C'est est un _système de fichier_ (à l'instar de NTFS pour windows, EXT4, FAT32 etc...) mais également un _gestionnaire de volume_ (comme LVM par exemple).
|
||||
ZFS est populaire dans le monde des serveurs, des NAS (comme FreeNAS / TrueNAS), de la virtualisation, et même chez les particuliers qui veulent un stockage résilient. C'est un _système de fichier_ (à l'instar de NTFS pour Windows, EXT4, FAT32 etc.) mais également un _gestionnaire de volume_ (comme LVM par exemple).
|
||||
|
||||
Pour le dire simplement :
|
||||
|
||||
@@ -17,26 +17,26 @@ Pour le dire simplement :
|
||||
ZFS dépasse largement les limites des autres systèmes de fichiers, que ce soit en termes de performance ou de fonctionnalités.
|
||||
Ce qui nous intéresse le plus :
|
||||
|
||||
- ses fonctionnalités de __gestion des instantanés__ (snaphsot), permettant de rapidement revenir en arrière en cas de problème
|
||||
- ses fonctionnalités de __gestion des instantanés__ (snapshot), permettant de rapidement revenir en arrière en cas de problème
|
||||
- sa gestion des grappes de disques et [__ses équivalent au RAID__](/general/storage/raid) (Z-Mirror, RAIDZ1, RAIDZ2, RAIDZ3)
|
||||
- sa __reconstruction automatique des données corrumpues__ (via le scrubbing)
|
||||
- sa __reconstruction automatique des données corrompues__ (via le scrubbing)
|
||||
- ses performance avec son cache RAM (ZFS ARC)
|
||||
- ses notifications en cas d'erreur
|
||||
|
||||
## Structure
|
||||

|
||||

|
||||
|
||||
ZFS dispose d'une structure particulière :
|
||||
|
||||
- __vdev__ (virtual device) : une grappe de disques (physiques ou virtuel)
|
||||
- __zpool__ : un ensemble de disques physiques ou virtuels en volume simple, Z-mirror ou RAIDZ. Un _zpool_ peut englober plusieurs _vdev_ mais pas l'inverse.
|
||||
- __dataset__ : un système de de donnée dans un _zpool_. Chaque dataset peut avoir ses propres options (compression, quotas, permissions, etc.).
|
||||
- __zpool__ : un ensemble de _vdev_ configuré comme un seul pool de stockage. Un _zpool_ peut englober plusieurs _vdev_ mais pas l'inverse.
|
||||
- __dataset__ : un conteneur logique de données dans un _zpool_. Chaque dataset peut avoir ses propres options (compression, quotas, permissions, etc.).
|
||||
|
||||
Il existe plusieurs types de dataset :
|
||||
|
||||
- __file system__ : un système de fichier, ZFS par défaut, monté comme un volume sans quota de stockage.
|
||||
- __zvol__ : un "disque virtuel" avec un quota d'espace, que vous pouvez formater/partitionner comme vous le souhaitez. Il sera utilisable comme un disque physique.
|
||||
- __snapshot__ : un état figé d’un autre dataset à un instant donné. Ils peuvent etre créés manuellement ou via des outils de sauvegarde. Ils peuvent etre montés pour parcourir les données dans leur état au moment du snapshot.
|
||||
- __snapshot__ : un état figé d’un autre dataset à un instant donné. Ils peuvent être créés manuellement ou via des outils de sauvegarde. Ils peuvent être montés pour parcourir les données dans leur état au moment du snapshot.
|
||||
|
||||
## Pourquoi ZFS vs les autres ?
|
||||
### Intégrité des données
|
||||
@@ -54,9 +54,9 @@ ZFS propose son propre système de gestion de volumes (vdev). Vous pouvez créer
|
||||
|
||||
ZFS gère cela directement, pas besoin de logiciel RAID externe.
|
||||
|
||||
::note
|
||||
::note{to="/general/storage/raid"}
|
||||
|
||||
Consultez [l'article sur le RAID](/general/storage/raid) pour en savoir plus sur la solution qui vous convient.
|
||||
Consultez l'**article sur le RAID** pour en savoir plus sur la solution qui vous convient.
|
||||
::
|
||||
|
||||
### Snapshots et clones
|
||||
|
||||
@@ -8,17 +8,17 @@ description: Les fondamentaux du matériel serveur. CPU, RAM, stockage et facteu
|
||||
|
||||

|
||||
|
||||
Un __serveur__ n'est rien d'autre qu'un ordinateur dédié à des taches particulières, ayant vocation à rester accessible en permanence. En soi, sa structure ne diffère pas d'un ordinateur classique, si ce n'est que selon l'usage cible, on fera évoluer certains composants dans un sens ou dans un autre. Dans cet article, vous trouverez un aide mémoire pour comprendre quels sont les composants essentiels d'un serveur et comprendre leur fonction selon vos usages.
|
||||
Un __serveur__ n'est rien d'autre qu'un ordinateur dédié à des tâches particulières, ayant vocation à rester accessible en permanence. En soi, sa structure ne diffère pas d'un ordinateur classique, si ce n'est que selon l'usage cible, on fera évoluer certains composants dans un sens ou dans un autre. Dans cet article, vous trouverez un aide mémoire pour comprendre quels sont les composants essentiels d'un serveur et comprendre leur fonction selon vos usages.
|
||||
|
||||
## La carte mère
|
||||
La __carte mère__ est le socle de votre machine. C'est le composant qui relie tous les autres composants. Elle sert à les faire communiquer et à interagir avec vos périphériques (clavier, souris, etc...). Il faut donc la choisir en fonction de vos besoins en terme d'entrées/sorties (I/O) comme le nombre de ports USB, de ports réseau, leur vitesse, etc... Mais il faut également veiller à sa compatibilité avec les autres composants que vous allez brancher dessus.
|
||||
La __carte mère__ est le socle de votre machine. C'est le composant qui relie tous les autres composants. Elle sert à les faire communiquer et à interagir avec vos périphériques (clavier, souris, etc.). Il faut donc la choisir en fonction de vos besoins en terme d'entrées/sorties (I/O) comme le nombre de ports USB, de ports réseau, leur vitesse, etc. Mais il faut également veiller à sa compatibilité avec les autres composants que vous allez brancher dessus.
|
||||
|
||||
Les composants importants à brancher dessus sont :
|
||||
|
||||
- le CPU
|
||||
- la RAM
|
||||
- le stockage (HDD et/ou SSD)
|
||||
- l'eventuel GPU dédié
|
||||
- l'éventuel GPU dédié
|
||||
|
||||
Il existe plusieurs formats de carte mère grand public :
|
||||
|
||||
@@ -31,50 +31,50 @@ Bien sûr, selon la taille, le nombre de ports et de fonctionnalité diffère. D
|
||||
|
||||
## Le CPU
|
||||
<div style="display: flex; align-items: center;">
|
||||
<img src="/img/global/cpu.svg" alt="Image" style="max-width: 25%; max-height:230px; margin-right: 20px;">
|
||||
<p>Le <strong>CPU</strong> (Central processor Unit) est la supercalculette de l’ordinateur. Il traite la plupart des tâches logicielles. Aujourd’hui les processeurs comportent plusieurs cœurs, parfois eux même divisé en deux de façon logicielle, afin de mieux répartir la charge de travail et optimiser son fonctionnement. Il nécessite d'etre refroidit avec un dissipateur actif (avec ventilateur) ou passif (sans ventilateur) selon la chaleur qu'iil dégage, et donc selon la puissance en Watt qu'il requiert. Dans le cadre d'un serveur, on veillera donc à le choisir selon les usages que l'on aura. </p>
|
||||
<img src="/img/global/cpu.svg" alt="Icône de CPU" style="max-width: 25%; max-height:230px; margin-right: 20px;">
|
||||
<p>Le <strong>CPU</strong> (Central Processing Unit) est la supercalculette de l’ordinateur. Il traite la plupart des tâches logicielles. Aujourd’hui les processeurs comportent plusieurs cœurs, parfois eux-mêmes divisés en deux de façon logicielle, afin de mieux répartir la charge de travail et optimiser son fonctionnement. Il nécessite d'être refroidi avec un dissipateur actif (avec ventilateur) ou passif (sans ventilateur) selon la chaleur qu'il dégage, et donc selon la puissance en Watt qu'il requiert. Dans le cadre d'un serveur, on veillera donc à le choisir selon les usages que l'on aura. </p>
|
||||
</div>
|
||||
|
||||
::warning
|
||||
|
||||
__Attention :__ N'oubliez pas que pour installer un dissipateur tiers, vous devez vous assurer qu'il soit compatible avec le socket de votre processeur, c'est à dire le socle sur lequel il est installé sur la carte mère, et que vous devez également appliquer de la pate thermique sur le CPU avant d'installer le dissipateur.
|
||||
__Attention :__ N'oubliez pas que pour installer un dissipateur tiers, vous devez vous assurer qu'il soit compatible avec le socket de votre processeur, c'est-à-dire le socle sur lequel il est installé sur la carte mère, et que vous devez également appliquer de la pâte thermique sur le CPU avant d'installer le dissipateur.
|
||||
::
|
||||
|
||||
Il faut les juger selon :
|
||||
|
||||
- Leur nombre de coeurs (plus ils en ont, plus il peuvent paralléliser les tâches)
|
||||
- La fréquence de ces coeurs en Giga Hertz _Ghz_
|
||||
- Leur nombre de cœurs (plus ils en ont, plus il peuvent paralléliser les tâches)
|
||||
- La fréquence de ces cœurs en Giga Hertz _GHz_
|
||||
- Leur consommation en Watt _W_
|
||||
|
||||
Dans le cadre d'un homelab/NAS sans calcul intensif, aujourd'hui on se dirigera facilement vers les Intel N100/150 (4 coeurs) et N305/N355 (8 coeurs) qui sont des processeurs performants à très faible consommation (rappelez vous que ces machines sont censées tourner H24).
|
||||
Dans le cadre d'un homelab/NAS sans calcul intensif, aujourd'hui on se dirigera facilement vers les Intel N100/150 (4 cœurs) et N305/N355 (8 cœurs) qui sont des processeurs performants à très faible consommation (rappelez vous que ces machines sont censées tourner H24).
|
||||
|
||||
## La RAM
|
||||
|
||||
<p align="center">
|
||||
<img src="/img/global/ram.svg" alt="Image" style="max-width: 65%; margin-right: 20px;">
|
||||
<img src="/img/global/ram.svg" alt="Icône de RAM" style="max-width: 65%; margin-right: 20px;">
|
||||
</p>
|
||||
|
||||
La __RAM__ (Random Access Memory), est une zone de stockage éphémère ultra rapide utilisée par le CPU (et l'iGPU le cas échéant) pour stocker des informations et calculs le temps de les éxecuter. Elle se vide régulièrement selon les sollicitation et se vide également à chaque extinction de la machine. Plus elle est performante, plus les calculs du processeur sont efficaces.
|
||||
La __RAM__ (Random Access Memory), est une zone de stockage éphémère ultra rapide utilisée par le CPU (et l'iGPU le cas échéant) pour stocker des informations et calculs le temps de les exécuter. Elle se vide régulièrement selon les sollicitations et se vide également à chaque extinction de la machine. Plus elle est performante, plus les calculs du processeur sont efficaces.
|
||||
|
||||
Elle prend généralement la forme de barettes, à brancher sur la carte mère. Il en existe plusieurs format selon le type de carte mère, et de plusieurs générations (DDR5 de nos jours).
|
||||
Elle prend généralement la forme de barrettes, à brancher sur la carte mère. Il en existe plusieurs format selon le type de carte mère, et de plusieurs générations (DDR5 de nos jours).
|
||||
|
||||
## Le GPU
|
||||
|
||||
Le __GPU__ (Graphical Processor Unit) est un processeur dédié aux calculs graphiques, vidéo, et parfois d'intelligence artificielle. Dans le cadre d'un serveur, il aura son utilité pour tout ce qui touche au media center (par exemple [Jellyfin](/serveex/media/jellyfin)), mais aussi en terme d'accélération matérielle pour les calculs d'IA comme la reconnaissance faciale ou la recherche sur des photos (comme via [Immich](/serveex/cloud/immich) par exemple).
|
||||
Le __GPU__ (Graphics Processing Unit) est un processeur dédié aux calculs graphiques, vidéo, et parfois d'intelligence artificielle. Dans le cadre d'un serveur, il aura son utilité pour tout ce qui touche au media center (par exemple [Jellyfin](/serveex/media/jellyfin)), mais aussi en terme d'accélération matérielle pour les calculs d'IA comme la reconnaissance faciale ou la recherche sur des photos (comme via [Immich](/serveex/cloud/immich) par exemple).
|
||||
|
||||
Selon la puissance requise, on choisira un GPU dédié avec sa propre VRAM (une carte graphique à brancher sur un port PCIe de la carte mère), ou un iGPU, c'est à dire un GPU compris dans le CPU (comme les N100/N150 et N305/N355), qui utilisera la RAM globale de la machine
|
||||
Selon la puissance requise, on choisira un GPU dédié avec sa propre VRAM (une carte graphique à brancher sur un port PCIe de la carte mère), ou un iGPU, c'est-à-dire un GPU compris dans le CPU (comme les N100/N150 et N305/N355), qui utilisera la RAM globale de la machine
|
||||
|
||||
### Le ou les HDD
|
||||
## Le ou les HDD
|
||||
|
||||
<p align="center">
|
||||
<img src="/img/global/hdd.svg" alt="Image" style="max-width: 50%; margin-right: 20px;">
|
||||
<img src="/img/global/hdd.svg" alt="Icône de disque dur" style="max-width: 50%; margin-right: 20px;">
|
||||
</p>
|
||||
|
||||
Un __HDD__ (Hard Disk Drive) ou disque dur, est un composant servant à stocker des données. Autrefois, c'etait le stockage standard des machines informatiques. Ils sont constitués d'un ou plusieurs disques superposés en plateau, et de têtes de lecture, presque comme une platine vinyle.
|
||||
Un __HDD__ (Hard Disk Drive) ou disque dur, est un composant servant à stocker des données. Autrefois, c'était le stockage standard des machines informatiques. Ils sont constitués d'un ou plusieurs disques superposés en plateau, et de têtes de lecture, presque comme une platine vinyle.
|
||||
|
||||
Aujourd'hui, les HDD peuvent stocker des quantités extraordinaires de données (jusqu'à 30 To, soit 30 000 gigaoctets, pour les modèles grand public), mais ils restent limités en vitesse de lecture et d'écriture par leur nature mécanique. Ils sont également volumineux et très lourds.
|
||||
|
||||
De manière générale, on les privilégiera pour stocker des données qui ne servent pas à des calculs et ne nécessitent pas d'ecriture rapide, comme les media (videos, photos...) ou les cloud drive, stockage d'archives, etc. Ils sont performants dans ces scenario et surtout coutent beaucoup moins cher que des SSD à espace de stockage égal.
|
||||
De manière générale, on les privilégiera pour stocker des données qui ne servent pas à des calculs et ne nécessitent pas d'écriture rapide, comme les media (vidéos, photos...) ou les cloud drive, stockage d'archives, etc. Ils sont performants dans ces scénarios et surtout coûtent beaucoup moins cher que des SSD à espace de stockage égal.
|
||||
|
||||
::tip{icon="" to="/general/storage/raid"}
|
||||
✨ __Astuce :__ combinez plusieurs HDD en **RAID** pour améliorer les performances et la redondance.
|
||||
@@ -82,41 +82,41 @@ De manière générale, on les privilégiera pour stocker des données qui ne se
|
||||
|
||||
Il existe plusieurs formats de HDD : 3.5" et 2.5". De manière générale dans un serveur on privilégiera les 3.5, plus fiables.
|
||||
|
||||
### Le ou les SSD
|
||||
## Le ou les SSD
|
||||
|
||||
<p align="center">
|
||||
<img src="/img/global/nvme.svg" alt="Image" style="max-width: 50%; margin-right: 20px;">
|
||||
<img src="/img/global/nvme.svg" alt="Icône de SSD NVMe" style="max-width: 50%; margin-right: 20px;">
|
||||
</p>
|
||||
|
||||
Un __SSD__ (Solid State Drive) est une petite carte sur laquelle sont soudées des puces de mémoires servant à stocker de l'information. Contrairement à la RAM, ces puces conservent les informations même lorsqu'elles ne sont pas alimentées et donc les conservent après un redémarrage. C'est ce qui sert globalement de stockage principal pour votre serveur.
|
||||
|
||||
Contrairement aux HDD, ils ne disposent pas de parties mécaniques, sont très miniaturisés et surtout extrêmement rapides, de l'ordre de plusieurs gigaoctets par seconde pour les plus performants.
|
||||
|
||||
On les trouve dans plusieurs formats, aujourd'hui on priviligiera les versions M.2 NVMe, car ce sont les plus petits et plus rapides, et sont devenu un standard sur les cartes mères.
|
||||
On les trouve dans plusieurs formats, aujourd'hui on privilégiera les versions M.2 NVMe, car ce sont les plus petits et plus rapides, et sont devenues un standard sur les cartes mères.
|
||||
|
||||
Ils sont en revanche beaucoup plus chers que les disque durs à capacité de stockage égale. Généralement, on y stockera au moins le système d'exploitation de la machine (Operating System ou OS) pour garantir une certaine rapidité d'execution. Dans le cadre d'un serveur, on y stockera aussi si possible les conteneurs type [docker](/serveex/core/docker) et les bases de données. De manière générale, toute données dont un a besoin régulièrement et rapidement pour des calculs (site web, applications, etc...).
|
||||
Ils sont en revanche beaucoup plus chers que les disque durs à capacité de stockage égale. Généralement, on y stockera au moins le système d'exploitation de la machine (Operating System ou OS) pour garantir une certaine rapidité d'exécution. Dans le cadre d'un serveur, on y stockera aussi si possible les conteneurs type [docker](/serveex/core/docker) et les bases de données. De manière générale, toutes les données dont on a besoin régulièrement et rapidement pour des calculs (site web, applications, etc.) devraient être stockées sur un SSD.
|
||||
|
||||
### La carte réseau
|
||||
## La carte réseau
|
||||
|
||||
Une __carte réseau__ sert à faire communiquer votre machine avec votre réseau (dont internet). Elle est composée d'une puce de controle et d'un ou plusieurs port réseau. Ces ports peuvent dits _ports ethernet_ peuvent être dans plusieurs formats physique et dans plusieurs normes de débit :
|
||||
Une __carte réseau__ sert à faire communiquer votre machine avec votre réseau (dont internet). Elle est composée d'une puce de contrôle et d'un ou plusieurs port réseau. Ces ports, aussi appelés _ports ethernet_, existent dans plusieurs formats physiques et plusieurs normes de débit :
|
||||
|
||||
- RJ45 Gigabit ethernet 10/100/1000 : le format standard de prise RJ45 permettant de dialoguer à des débit allant de 10Mbps (soit 0,125Mo/s) à 1000Mbps (soit 125Mo/s)
|
||||
- RJ45 2.5G : Même prise, pouvant dialoguer jusqu'à 2,5Gpbs soit 2 500Mbps (donc 312,5Mo/s)
|
||||
- RJ45 5G : Même prise, pouvant dialoguer jusqu'à 5Gpbs (donc 625Mo/s)
|
||||
- RJ45 10G Base T : Même prise pouvant dialoguer jusqu'à 10Gbs (soit 1,25Go/s)
|
||||
- SFP 1G : Prise SFP, généralement utilisée pour la fibre optique, pouvant dialoguer jusqu'à 1Gpbs
|
||||
- SFP+ 10G : Prise SFP amélioriée, aussi utilisée pour la fibre optique, pouvant dialoguer jusqu'à 10Gbps.
|
||||
- RJ45 Gigabit ethernet 10/100/1000 : le format standard de prise RJ45 permettant de dialoguer à des débit allant de 10Mbps (soit 1,25Mo/s) à 1000Mbps (soit 125Mo/s)
|
||||
- RJ45 2.5G : Même prise, pouvant dialoguer jusqu'à 2,5Gbps soit 2 500Mbps (donc 312,5Mo/s)
|
||||
- RJ45 5G : Même prise, pouvant dialoguer jusqu'à 5Gbps (donc 625Mo/s)
|
||||
- RJ45 10G Base T : Même prise pouvant dialoguer jusqu'à 10Gbps (soit 1,25Go/s)
|
||||
- SFP 1G : Prise SFP, généralement utilisée pour la fibre optique, pouvant dialoguer jusqu'à 1Gbps
|
||||
- SFP+ 10G : Prise SFP améliorée, aussi utilisée pour la fibre optique, pouvant dialoguer jusqu'à 10Gbps.
|
||||
|
||||
::warning
|
||||
|
||||
__Attention :__ Pensez bien à dimensionner vos appareils réseaux (routeurs, switch, cables...) en fonction du débit que vous souhaitez entre vos appareils. D'autre part, il existe plusieurs normes de cables RJ45 selon la vitesse permise. On privilegiera dans la plupart des cas des cables RJ45 CAT5E, et au delà de 10Gbps, on privilégiera du CAT6A, bien que le CAT5E soit utilisable à ces vitesses à courte distance. Quant à la fibre, c'est tout un sujet (simplex, duplex, transceiver...).
|
||||
__Attention :__ Pensez bien à dimensionner vos appareils réseaux (routeurs, switch, câbles...) en fonction du débit que vous souhaitez entre vos appareils. D'autre part, il existe plusieurs normes de câbles RJ45 selon la vitesse permise. On privilégiera dans la plupart des cas des câbles RJ45 CAT5E, et au-delà de 10Gbps, on privilégiera du CAT6A, bien que le CAT5E soit utilisable à ces vitesses à courte distance. Quant à la fibre, c'est tout un sujet (simplex, duplex, transceiver...).
|
||||
::
|
||||
|
||||
La carte réseau est généralement directement intégrée à la carte mère, mais vous pouvez aussi utiliser des cartes réseau dédiées, par exemple en USB ou via un port d'extension PCIe.
|
||||
|
||||
De manière générale, sur un serveur, on appréciera d'avoir au moins deux ports ethernet afin d'avoir de la redondance en cas de panne.
|
||||
|
||||
### Entrées et sorties
|
||||
## Entrées et sorties
|
||||
|
||||
Les __ports d'entrées et sorties__ (I/O) permettent de communiquer avec des appareils externes (écrans, clavier, souris, réseau...). Sur une carte mère, on trouve généralement :
|
||||
|
||||
@@ -127,7 +127,7 @@ Les __ports d'entrées et sorties__ (I/O) permettent de communiquer avec des app
|
||||
|
||||
Choisissez votre carte mère et ses cartes d'extension en fonction de vos besoins en I/O.
|
||||
|
||||
### L'alimentation
|
||||
## L'alimentation
|
||||
|
||||
__L'alimentation__ est le composant qui fournit l'énergie électrique aux composants de votre machine. Elle se branche au secteur par un cordon et dispose de plusieurs câbles de sortie qui vont sur la carte mère et sur divers périphériques, comme les disques durs ou les cartes graphiques dédiées.
|
||||
|
||||
@@ -137,18 +137,18 @@ Une alimentation se caractérise par plusieurs éléments clés :
|
||||
- sa modularité (câbles fixes ou détachables),
|
||||
- son rendement (en pourcentage). Par exemple, une alimentation de 500W avec 80% de rendement tirera en réalité 625W au mur pour fournir 500W à la machine.
|
||||
|
||||
Un autre facteur important est le format. Il en existe plusieurs standard, comme ATX L pour les plus grandes jusqu'à SFX pour les plus petites. Il en existe aussi des spécifiques aux serveurs rackables, par définition assez plats.
|
||||
Un autre facteur important est le format. Il en existe plusieurs standards, comme ATX L pour les plus grandes jusqu'à SFX pour les plus petites. Il en existe aussi des spécifiques aux serveurs rackables, par définition assez plats.
|
||||
|
||||
Pour choisir votre alimentation, la convention est d'estimer la puissance electrique demandée par votre machine à usage et de multiplier par deux cette puissance. En effet, le rendement des alimentations se situe environ à 50% de sa charge totale.
|
||||
Pour choisir votre alimentation, la convention est d'estimer la puissance électrique demandée par votre machine à usage et de multiplier par deux cette puissance. En effet, le rendement des alimentations se situe environ à 50% de sa charge totale.
|
||||
|
||||
### Le boitier
|
||||
## Le boîtier
|
||||
|
||||
<div style="display: flex; align-items: center;">
|
||||
<img src="/img/global/case.svg" alt="Image" style="max-width: 25%; max-height:230px; margin-right: 20px;">
|
||||
<p>Le <strong>boitier</strong> est également un composant essentiel pour votre machine. Il joue un rôle clé dans le refroidissement, avec ses ventilateurs et sa conception des flux d'air, et il détermine la compatibilité de format de votre carte mère, de votre alimentation et de l'éventuel GPU dédié que vous installerez.
|
||||
<img src="/img/global/case.svg" alt="Icône de boîtier" style="max-width: 25%; max-height:230px; margin-right: 20px;">
|
||||
<p>Le <strong>boîtier</strong> est également un composant essentiel pour votre machine. Il joue un rôle clé dans le refroidissement, avec ses ventilateurs et sa conception des flux d'air, et il détermine la compatibilité de format de votre carte mère, de votre alimentation et de l'éventuel GPU dédié que vous installerez.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
Par ailleurs, le boitier détermine combien de HDD vous pouvez installer et quels formats ils acceptent. Certains boitiers sont rackables, c'est-à-dire qu'ils peuvent être installés dans des racks (baies serveurs).
|
||||
Par ailleurs, le boîtier détermine combien de HDD vous pouvez installer et quels formats ils acceptent. Certains boîtiers sont rackables, c'est-à-dire qu'ils peuvent être installés dans des racks (baies serveurs).
|
||||
|
||||
Choisissez votre boitier avec soin en fonction de vos besoins précis et du matériel que vous comptez utiliser.
|
||||
Choisissez votre boîtier avec soin en fonction de vos besoins précis et du matériel que vous comptez utiliser.
|
||||
|
||||
@@ -8,20 +8,20 @@ description: Aperçu du matériel réseau pour homelab. Switches, cartes réseau
|
||||
|
||||

|
||||
|
||||
Un réseau informatique est indissociable du matériel nécessaire à le mettre en place. Le matériel va conditionner les dimension du réseau, les vitesses de communication et les performances du réseau. Dans cet article, nous nous limiterons au réseau les plus simples, composant généralement ceux que l'on peut retrouver chez soi.
|
||||
Un réseau informatique est indissociable du matériel nécessaire à sa mise en place. Le matériel va conditionner les dimensions du réseau, les vitesses de communication et les performances du réseau. Dans cet article, nous nous limiterons aux réseaux les plus simples, ceux que l'on peut généralement retrouver chez soi.
|
||||
|
||||
## Le routeur
|
||||
Le __routeur__ est le point central de votre réseau. C'est lui qui dirige les __paquets__, c'est à dire les blocs d'informations qui transitent sur votre réseau, de l'émetteur vers le bon destinataire. Il permet à la fois de conditionner le routage de l'information au sein de votre réseau mais aussi vers ou depuis l'exterieur. Globalement, il fait communiquer les appareils entre eux et avec internet.
|
||||
Le __routeur__ est le point central de votre réseau. C'est lui qui dirige les __paquets__, c'est-à-dire les blocs d'informations qui transitent sur votre réseau, de l'émetteur vers le bon destinataire. Il permet à la fois de conditionner le routage de l'information au sein de votre réseau mais aussi vers ou depuis l'extérieur. Globalement, il fait communiquer les appareils entre eux et avec internet.
|
||||
|
||||
Vous avez tous un routeur chez vous, c'est la __box__ de votre _FAI_ (Fournisseur d'Accès à Internet).
|
||||
|
||||
Plus généralement, un routeur est composé :
|
||||
|
||||
- d'un port WAN (Wide Area Network) recevant les informations depuis l'internet (ou un réseau de hiérarchie supérieure). Par exemple un port recevant la fibre optique de votre opérateur, ou un port SFP+/RJ45 pour un routeur tiers.
|
||||
- d'un switch, c'est à dire d'un hub composé de plusieurs ports __LAN__ (Local Area Network) permettant de connecter plusieurs lignes et appareils à votre routeur. Ils peuvent etre RJ45 ou SFP/SFP+.
|
||||
- parfois d'un emetteur/recepteur WiFi
|
||||
- d'un switch, c'est-à-dire d'un hub composé de plusieurs ports __LAN__ (Local Area Network) permettant de connecter plusieurs lignes et appareils à votre routeur. Ils peuvent être RJ45 ou SFP/SFP+.
|
||||
- parfois d'un émetteur/récepteur WiFi
|
||||
|
||||
Le routeur peut posséder des capacité de _firewall_, c'est à dire de limiter le traffic d'appareils en particulier, et de _[NAT (Network Adress Translation)](/general/networking/nat)_, c'est à dire de redirection de port. Il possède aussi généralement un _[DHCP (Dynamic Host Configuration Protocol)](/general/networking/nat#le-dhcp)_, servant à attribuer dynamiquement des _adresses IP_ à votre matériel branché au réseau.
|
||||
Le routeur peut posséder des capacités de _firewall_, c'est-à-dire de limiter le trafic d'appareils en particulier, et de _[NAT (Network Address Translation)](/general/networking/nat)_, c'est-à-dire de redirection de port. Il possède aussi généralement un _[DHCP (Dynamic Host Configuration Protocol)](/general/networking/nat#le-dhcp)_, servant à attribuer dynamiquement des _adresses IP_ à votre matériel branché au réseau.
|
||||
|
||||
Le routeur conditionne directement la vitesse de communication entre vos appareils. En effet, le port WAN conditionne le débit qu'il peut recevoir de la part de votre FAI. Si vous avez un abonnement de 5 Gb/s, il vous faudra un port WAN d'au moins 5 Gb/s. Mais il conditionne également la vitesse de communication entre vos équipements. Si vous avez des appareils qui communiquent à 5 Gb/s, il faudra que la partie _switch_ du routeur disposent de ports 5 Gb/s. Enfin, si vous avez du matériel WiFi 7 et que vous souhaitez profiter de ces débits, il faudra également que votre routeur le supporte. Et dans le cas d'une borne Wifi tierce, n'oubliez pas que son port réseau doit disposer d'un débit au moins égale au WiFi qu'il diffuse, et le routeur également.
|
||||
|
||||
@@ -29,16 +29,16 @@ Débit internet, nombre d'équipements à brancher, débit WiFi, débit réseau,
|
||||
|
||||
::tip{icon=""}
|
||||
✨ __Astuce :__
|
||||
Vous pouvez utiliser sans difficulté un routeur tiers pour votre réseau qui remplacera la gestion de votre box internet si celle-ci surpporte le mode _Bridge_. En France seul l'opérateur Free le permet. C'est également possible avec les opérateurs ne disposant pas de ce mode, mais avec de grandes difficultés et sans toutes les fonctionnalités qu'un routeur tiers pourrait vous apporter.
|
||||
Vous pouvez utiliser sans difficulté un routeur tiers pour votre réseau qui remplacera la gestion de votre box internet si celle-ci supporte le mode _Bridge_. En France seul l'opérateur Free le permet. C'est également possible avec les opérateurs ne disposant pas de ce mode, mais avec de grandes difficultés et sans toutes les fonctionnalités qu'un routeur tiers pourrait vous apporter.
|
||||
::
|
||||
|
||||
## Le Switch
|
||||
|
||||
Le __switch__ ou commutateur, est un appareil qui permet de brancher plusieurs appareils au réseau. C'est littéralement un hub, qui se connecte directement au routeur ou à un autre switch, jusqu'au routeur. Il permet d'éviter de saturer toutes les prises switch du routeur, ou de délocaliser le matériel dans une autre pièce, sans tirer un cable par appareil vers le routeur. Un autre cas d'usage est de pouvoir séparer plusieurs réseaux gérés par un meme routeur.
|
||||
Le __switch__ ou commutateur, est un appareil qui permet de brancher plusieurs appareils au réseau. C'est littéralement un hub, qui se connecte directement au routeur ou à un autre switch, jusqu'au routeur. Il permet d'éviter de saturer toutes les prises switch du routeur, ou de délocaliser le matériel dans une autre pièce, sans tirer un câble par appareil vers le routeur. Un autre cas d'usage est de pouvoir séparer plusieurs réseaux gérés par un même routeur.
|
||||
|
||||
Il en existe globalement de deux types :
|
||||
|
||||
- Les switch non managés, les plus courants. Ils sont plug-n-play, c'est à dire que vous les branchez et tout est réglé tout seul.
|
||||
- Les switch non managés, les plus courants. Ils sont plug-n-play, c'est-à-dire que vous les branchez et tout est réglé tout seul.
|
||||
- Les switchs managés. Ils disposent d'une interface de configuration (en ligne de commande ou via une interface web), servant à affiner les règles de routages asservies au routeur. C'est très efficace pour séparer des réseaux virtuels entre vos appareils, mais généralement nécessite beaucoup de temps de configuration et sont moins pratiques à utiliser qu'un simple switch non managé.
|
||||
|
||||
::warning
|
||||
@@ -46,22 +46,22 @@ Il en existe globalement de deux types :
|
||||
__Attention :__ Veillez à bien utiliser un switch avec des ports disposant des débits cohérents avec le matériel de votre réseau
|
||||
::
|
||||
|
||||
## Les cables
|
||||
## Les câbles
|
||||
|
||||
Les cables sont des composants essentiels de votre réseau. Selon leur type et catégorie, ils limiteront le débit entre vos appareils et nécessitent donc d'etre dimensionnés de manière cohérente avec votre réseau. Ils doivent aussi être compatibles avec les ports de vos appareils.
|
||||
Les câbles sont des composants essentiels de votre réseau. Selon leur type et catégorie, ils limiteront le débit entre vos appareils et nécessitent donc d'être dimensionnés de manière cohérente avec votre réseau. Ils doivent aussi être compatibles avec les ports de vos appareils.
|
||||
|
||||
Voici un rappel des normes de cables et de ports les plus courantes :
|
||||
Voici un rappel des normes de câbles et de ports les plus courantes :
|
||||
|
||||
- **RJ45 Gigabit Ethernet 10/100/1000** : le format standard de prise RJ45 permettant de dialoguer à des débit allant de 10Mbps (soit 0,125Mo/s) à 1000Mbps (soit 125Mo/s)
|
||||
- **RJ45 2.5G** : Même prise, pouvant dialoguer jusqu'à 2,5Gpbs soit 2 500Mbps (donc 312,5Mo/s)
|
||||
- **RJ45 5G** : Même prise, pouvant dialoguer jusqu'à 5Gpbs (donc 625Mo/s)
|
||||
- **RJ45 Gigabit Ethernet 10/100/1000** : le format standard de prise RJ45 permettant de dialoguer à des débit allant de 10Mbps (soit 1,25Mo/s) à 1000Mbps (soit 125Mo/s)
|
||||
- **RJ45 2.5G** : Même prise, pouvant dialoguer jusqu'à 2,5Gbps soit 2 500Mbps (donc 312,5Mo/s)
|
||||
- **RJ45 5G** : Même prise, pouvant dialoguer jusqu'à 5Gbps (donc 625Mo/s)
|
||||
- **RJ45 10GBase-T** : Même prise pouvant dialoguer jusqu'à 10Gb/s (soit 1,25Go/s)
|
||||
- **SFP 1G** : Prise SFP, généralement utilisée pour la fibre optique, pouvant dialoguer jusqu'à 1Gpbs
|
||||
- **SFP+ 10G** : Prise SFP amélioriée, aussi utilisée pour la fibre optique, pouvant dialoguer jusqu'à 10Gb/s.
|
||||
- **SFP 1G** : Prise SFP, généralement utilisée pour la fibre optique, pouvant dialoguer jusqu'à 1Gbps
|
||||
- **SFP+ 10G** : Prise SFP améliorée, aussi utilisée pour la fibre optique, pouvant dialoguer jusqu'à 10Gb/s.
|
||||
|
||||
### Les cables Ethernet
|
||||
### Les câbles Ethernet
|
||||
|
||||
Ces cables en cuivre disposent généralement d'une prise dite `RJ45`. C'est la prise la plus standard du matériel réseau, que vous retrouvez sur vos routeurs et vos switch.
|
||||
Ces câbles en cuivre disposent généralement d'une prise dite `RJ45`. C'est la prise la plus standard du matériel réseau, que vous retrouvez sur vos routeurs et vos switch.
|
||||
|
||||
Ils sont définis en plusieurs catégorie, définissant le débit maximal selon la distance :
|
||||
|
||||
@@ -74,42 +74,42 @@ Ils sont définis en plusieurs catégorie, définissant le débit maximal selon
|
||||
| | CAT 5e | 30 m |
|
||||
| 2.5 Gb/s | CAT 5e | 100 m |
|
||||
| 1 Gb/s | CAT 5e | 100 m |
|
||||
| 100 Mbs | CAT 5 | 100 m |
|
||||
| 100 Mb/s | CAT 5 | 100 m |
|
||||
|
||||
Certains de ces cables sont plats, ronds, blindés (à relier à la terre), etc. Choisissez en fonction de votre installation. ce qu'il faut comprendre, c'est que pour relier un appareil qui dispose d'une prise RJ45 ethernet 2.5 Gb/s sur un routeur 2.5G b/s, il faut au moins un cable `CAT 5e`.
|
||||
Certains de ces câbles sont plats, ronds, blindés (à relier à la terre), etc. Choisissez en fonction de votre installation. ce qu'il faut comprendre, c'est que pour relier un appareil qui dispose d'une prise RJ45 ethernet 2.5 Gb/s sur un routeur 2.5G b/s, il faut au moins un câble `CAT 5e`.
|
||||
|
||||
En revanche, si votre appareil est limité à 100 Mb/s, vous n'avez besoin que d'un cable `CAT 5`.
|
||||
En revanche, si votre appareil est limité à 100 Mb/s, vous n'avez besoin que d'un câble `CAT 5`.
|
||||
|
||||
Aujourd'hui, dans les nouvelles construction, la norme est d'installer des cables `CAT 6A` dans les murs. Ainsi, les prises murales sont prêtes à accepter du 10 Gb/s sur 100 m
|
||||
Aujourd'hui, dans les nouvelles constructions, la norme est d'installer des câbles `CAT 6A` dans les murs. Ainsi, les prises murales sont prêtes à accepter du 10 Gb/s sur 100 m
|
||||
|
||||
|
||||
### Les cables optiques
|
||||
### Les câbles optiques
|
||||
|
||||
Très fins mais très fragile, on commence à les voir de plus en plus dans les installations chez soi. A commencer par le cable opérateur qui relie votre prise fibre à votre box/routeur. Ils ont plusieurs avantages :
|
||||
Très fins mais très fragiles, on commence à les voir de plus en plus dans les installations chez soi. À commencer par le câble opérateur qui relie votre prise fibre à votre box/routeur. Ils ont plusieurs avantages :
|
||||
|
||||
- Extrêmement compacts
|
||||
- Consommation électrique nulle (contrairement au cuivre, qui perd de l'énergie en chaleur)
|
||||
- Aucun rayonnement électromagnétique (pas besoin de blindage, pas de perturbation du signal)
|
||||
- Débits très élevés sur de longues distances
|
||||
|
||||
Pour du réseau local, il faut comprendre qu'il existe plusieurs types de cables fibres, conditionnant le débit selon la distance, et conditionnant le type de `transceiver` à utiliser. En effet, les cables fibres se branchent sur les ports SFP+ de vos appareils, via un petit objet qui traduit le signal lumineux en information électrique, et qui, dans le sens inverse, traduit les informations électrique en signal lumineux.
|
||||
Pour du réseau local, il faut comprendre qu'il existe plusieurs types de câbles fibres, conditionnant le débit selon la distance, et conditionnant le type de `transceiver` à utiliser. En effet, les câbles fibres se branchent sur les ports SFP+ de vos appareils, via un petit objet qui traduit le signal lumineux en information électrique, et qui, dans le sens inverse, traduit les informations électriques en signal lumineux.
|
||||
|
||||
Globalement, pour du réseau local, on évitera de choisir autre chose qu'un cable multimode OM3 avec prise LC, avec un transceiver LC SFP+ 10G. Cela permet de relier des appareils en 10 Gb/s et est compatible avec la plupart des appareils disposant d'un port SFP+.
|
||||
Globalement, pour du réseau local, on évitera de choisir autre chose qu'un câble multimode OM3 avec prise LC, avec un transceiver LC SFP+ 10G. Cela permet de relier des appareils en 10 Gb/s et est compatible avec la plupart des appareils disposant d'un port SFP+.
|
||||
|
||||
::warning
|
||||
|
||||
__Attention :__ Veillez à bien utiliser des `transceiver` compatibles avec vos materiels (routeur, switch ou appareil). Il n'existe pas encore de standard absolu, les constructeurs précisent généralement les marques compatibles.
|
||||
__Attention :__ Veillez à bien utiliser des `transceiver` compatibles avec vos matériels (routeur, switch ou appareil). Il n'existe pas encore de standard absolu, les constructeurs précisent généralement les marques compatibles.
|
||||
::
|
||||
|
||||
|
||||
### Les cables DAC
|
||||
### Les câbles DAC
|
||||
|
||||
Ce sont des cables en cuivre fichés dans des `transceiver`. Ils permettent à deux ports SFP/SFP+ de dialoguer, à courte distance, sans utiliser une fibre plus fragile ou d'adapteteur RJ45. Cependant, ils demandent plus d'énergie, la deperdition dans le cuivre etant non négligeable.
|
||||
Ce sont des câbles en cuivre fichés dans des `transceiver`. Ils permettent à deux ports SFP/SFP+ de dialoguer, à courte distance, sans utiliser une fibre plus fragile ou d'adaptateur RJ45. Cependant, ils demandent plus d'énergie, la déperdition dans le cuivre étant non négligeable.
|
||||
|
||||
|
||||
### Les transceiver SFP+
|
||||
|
||||
Ils permettent de connecter différents types de cables à vos ports SFP/SFP+. Il en existe pour :
|
||||
Ils permettent de connecter différents types de câbles à vos ports SFP/SFP+. Il en existe pour :
|
||||
|
||||
- la fibre optique
|
||||
- le DAC
|
||||
@@ -117,5 +117,5 @@ Ils permettent de connecter différents types de cables à vos ports SFP/SFP+. I
|
||||
|
||||
::warning
|
||||
|
||||
__Attention :__ Un transceiver RJ45 consommera beaucoup d'energie due à la deperdition naturelle dans le cuivre, et donc génerera beaucoup de chaleur. Il existe des transceiver basse consommation, consommant moins de 2W. De manière peu intuitive, ils sont généralement indiqués pour des cables plus long (80m au lieu de 30m). Ils sont conseillés plutot que ceux indiqués pour les cables plus court car ces derniers dégagent plus de chaleur et demandent plus d'energie, ce qui peut poser des problemes de compatibilité avec votre matériel, et dégrader votre réseau, voir le couper.
|
||||
__Attention :__ Un transceiver RJ45 consommera beaucoup d'énergie due à la déperdition naturelle dans le cuivre, et donc générera beaucoup de chaleur. Il existe des transceiver basse consommation, consommant moins de 2W. De manière peu intuitive, ils sont généralement indiqués pour des câbles plus longs (80m au lieu de 30m). Ils sont conseillés plutôt que ceux indiqués pour les câbles plus courts car ces derniers dégagent plus de chaleur et demandent plus d'énergie, ce qui peut poser des problèmes de compatibilité avec votre matériel, et dégrader votre réseau, voire le couper.
|
||||
::
|
||||
|
||||
@@ -12,7 +12,7 @@ Cet article a été écrit avant l'augmentation __massive__ des prix du matérie
|
||||
|
||||
Lorsque l'on se lance dans l'aventure de son serveur chez soi, on se pose souvent la question _« Avec quoi dois-je commencer ? »_, _« Cela coûte cher non ? »_, et on finit soit par ne pas le faire, soit par acheter un NAS propriétaire qu'on jettera à la poubelle au bout d'un an quand on aura compris que cela n'apporte rien à part des problèmes et de l'argent jeté par la fenêtre.
|
||||
|
||||
Un serveur, ce n'est pas une armoire. C'est n'importe quel ordinateur capable de faire tourner linux. C'est pour cela que les mini PC à base de processeurs N100 sont populaires. Pour 100-130€ sur des plateformes chinoises on a une machine sous linux capable de tourner H24 des années durant, et d'executer tout ce qu'on attend d'un serveur/cloud chez soi sans perdre en performances.
|
||||
Un serveur, ce n'est pas une armoire. C'est n'importe quel ordinateur capable de faire tourner Linux. C'est pour cela que les mini PC à base de processeurs N100 sont populaires. Pour 100-130€ sur des plateformes chinoises on a une machine sous linux capable de tourner H24 des années durant, et d'exécuter tout ce qu'on attend d'un serveur/cloud chez soi sans perdre en performances.
|
||||
|
||||
Ce n'est objectivement pas cher et n'importe qui s'intéressant au sujet peut se lancer dans l'aventure.
|
||||
|
||||
@@ -20,7 +20,7 @@ Un Mini PC à 100 balles + un dock USB à 50 balles accueillant des disques durs
|
||||
|
||||
C'est tout simplement ça le **ProloNAS, un NAS accessible pour les prolo**. Charge à vous ensuite de calibrer votre besoin en Disques Durs.
|
||||
|
||||

|
||||

|
||||
|
||||
## Exemple de matériel
|
||||
|
||||
@@ -32,11 +32,11 @@ C'est tout simplement ça le **ProloNAS, un NAS accessible pour les prolo**. Cha
|
||||
|
||||
## Pourquoi un NAS ?
|
||||
|
||||
Un NAS (Network Attached Storage), c'est une machine conçue autour d'un espace de stockage ayant vocation a être partagé sur un réseau. L'idée du NAS, c'est d'avoir un stockage fiable et sécurisé sur lequel s'appuie nos usages et nos applicatifs comme des données cloud par exemple (un drive comme [Nextcloud](/serveex/cloud/nextcloud), une synchro photo comme [Immich](/serveex/cloud/immich). Mais aussi vos media comme vos films (par exemple avec [Jellyfin](/serveex/media/jellyfin)) ou les videos de vos caméra de surveillance.
|
||||
Un NAS (Network Attached Storage), c'est une machine conçue autour d'un espace de stockage ayant vocation à être partagé sur un réseau. L'idée du NAS, c'est d'avoir un stockage fiable et sécurisé sur lequel s'appuie nos usages et nos applicatifs comme des données cloud par exemple (un drive comme [Nextcloud](/serveex/cloud/nextcloud), une synchro photo comme [Immich](/serveex/cloud/immich)). Mais aussi vos media comme vos films (par exemple avec [Jellyfin](/serveex/media/jellyfin)) ou les vidéos de vos caméras de surveillance.
|
||||
|
||||
### Mais pourquoi un Mini PC avec un disque dur externe ne suffirait-il pas ?
|
||||
|
||||
Bien sûr, un simple mini PC avec ses 1 à 2To de stockage devraient suffire pour la plupart des gens. Et les films pourraient tenir dans un disque dur externe de quelques TB supplémentaire. En revanche ce n'est pas une solution fiable ni extensible de faire tourner ses applications et usages sur du stockage qui au moindre choc, au moindre probleme, fait perdre vos données définitivement.
|
||||
Bien sûr, un simple mini PC avec ses 1 à 2To de stockage devrait suffire pour la plupart des gens. Et les films pourraient tenir dans un disque dur externe de quelques TB supplémentaires. En revanche ce n'est pas une solution fiable ni extensible de faire tourner ses applications et usages sur du stockage qui au moindre choc, au moindre problème, fait perdre vos données définitivement.
|
||||
|
||||
Le vrai NAS est construit autour de la fiabilité du support qui contient vos données. Il nécessite de mettre en place des stratégies de stockages type [RAID](/general/storage/raid) afin de préserver vos données en cas de panne et de la sauvegarde en cas de corruption (comme les snapshot [ZFS](/general/storage/zfs)).
|
||||
|
||||
@@ -50,25 +50,25 @@ De nombreuses marques proposent des plateformes prêtes à accueillir vos disque
|
||||
|
||||
350€, c'est le prix de départ d'un NAS 2 baies (sans les disques) chez Syno, avec un processeur qui date de 2019, pas de logement pour un SSD pour l'OS, et 2 pauvres giga-octets de RAM.
|
||||
|
||||
Rappelez vous le **ProloNAS** : un N100 4 coeurs, 16Go de RAM, un SSD de 512Go, pour 100-130€ et un DAS 4 baies à 55€. Soit deux fois moins que le Syno 2 baies, 4 fois moins que le Syno 4 baies.
|
||||
Rappelez vous le **ProloNAS** : un N100 4 cœurs, 16Go de RAM, un SSD de 512Go, pour 100-130€ et un DAS 4 baies à 55€. Soit deux fois moins que le Syno 2 baies, 4 fois moins que le Syno 4 baies.
|
||||
|
||||
### OS limités
|
||||
|
||||
« Oui mais ok l'argument du prix, mais au moins tu lances le truc et c'est bon, t'as de jolies applications qui tournent toute seule sans maintenance ».
|
||||
|
||||
Une année.
|
||||
Une année c'est le temps qu'il m'a fallu pour jeter à la poubelle mon Syno en me disant que j'aurais du dès le départ partir sur mon **ProloNAS** (devenu un vrai serveur, depuis).
|
||||
Une année c'est le temps qu'il m'a fallu pour jeter à la poubelle mon Syno en me disant que j'aurais dû dès le départ partir sur mon **ProloNAS** (devenu un vrai serveur, depuis).
|
||||
|
||||
Les constructeurs vous mettent à disposition des OS linux customisés à leur sauce, ne partageant pas les catalogues d'applications linux des distributions majeures, avec des noyaux linux datant souvent de l'antiquité, et surtout des OS tres fermés ne vous permettant pas de développer votre NAS exactement selon vos besoins. En gros, soit vous utilisez leurs applications, soit vous rentrer dans un monde de souffrance. Pour donner un exemple, de nombreux conteneurs docker ne fonctionnent pas sur ces NAS constructeurs car le kernel est tellement vieux qu'il ne peut supporter les versions pourtant pas toujours récentes de docker.
|
||||
Les constructeurs vous mettent à disposition des OS Linux customisés à leur sauce, ne partageant pas les catalogues d'applications Linux des distributions majeures, avec des noyaux linux datant souvent de l'antiquité, et surtout des OS très fermés ne vous permettant pas de développer votre NAS exactement selon vos besoins. En gros, soit vous utilisez leurs applications, soit vous rentrez dans un monde de souffrance. Pour donner un exemple, de nombreux conteneurs docker ne fonctionnent pas sur ces NAS constructeurs car le kernel est tellement vieux qu'il ne peut supporter les versions pourtant pas toujours récentes de docker.
|
||||
|
||||
### Dépendance des mises à jours propriétaires
|
||||
### Dépendance des mises à jour propriétaires
|
||||
|
||||
« Oui mais moi j'ai pas d'autre usages que ce que leurs applicatifs natifs proposent ».
|
||||
Oui oui, moi aussi j'ai cru ça. Mais 1 an après mon Syno, mes usages ont explosés. Media center, gestion de mot de passe, plateforme git, plateforme de développement, Authentification forte et SSO hébergement web... Pourquoi etre bloqués par les solutions constructeurs jamais excellentes, souvent baclées et compatibles avec rien ?
|
||||
Oui oui, moi aussi j'ai cru ça. Mais 1 an après mon Syno, mes usages ont explosé. Media center, gestion de mot de passe, plateforme git, plateforme de développement, Authentification forte et SSO hébergement web... Pourquoi être bloqués par les solutions constructeurs jamais excellentes, souvent bâclées et compatibles avec rien ?
|
||||
|
||||
D'autre part, ces applicatifs, vous devenez dépendant de la bonne volonté du constructeur, en terme de sécurité, de mises à jour, et de disponibilités. Je préfère confier cette dépendance à des projets open-source, mis à jour plus régulièrement et ne dépendant pas de la bonne volonté d'un board commercial.
|
||||
D'autre part, avec ces applicatifs propriétaires, vous devenez dépendant de la bonne volonté du constructeur, en terme de sécurité, de mises à jour, et de disponibilité. Je préfère confier cette dépendance à des projets open-source, mis à jour plus régulièrement et ne dépendant pas de la bonne volonté d'un board commercial.
|
||||
|
||||
Et cela ne s'arrête pas là, qui vous dit que les disques dur que vous avez inséré dans ces NAS proproietaires vont etre supportés ? Synology a rendu incompatible son matériel avec les marques n'ayant pas un partenariat avec eux, afin de booster la vente de leurs propres disques. Qui vous dit que votre media center pourra profiter des performances de l'iGPU de votre processeur pour streamer vos media vers vos appareils ? [Synology a désactivé le transcodage matériel de ses NAS](https://www.cachem.fr/synology-desactive-transcodage-materiel-nas/).
|
||||
Et cela ne s'arrête pas là, qui vous dit que les disques dur que vous avez inséré dans ces NAS propriétaires vont être supportés ? Synology a rendu incompatible son matériel avec les marques n'ayant pas un partenariat avec eux, afin de booster la vente de leurs propres disques. Qui vous dit que votre media center pourra profiter des performances de l'iGPU de votre processeur pour streamer vos media vers vos appareils ? [Synology a désactivé le transcodage matériel de ses NAS](https://www.cachem.fr/synology-desactive-transcodage-materiel-nas/).
|
||||
|
||||
Bref, vous n'avez aucun pouvoir sur un produit qui n'est pas réellement ni ouvert ni à vous.
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ description: Comprendre comment une commande Linux est construite, apprendre les
|
||||
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||
Un serveur n'a pas de bureau, pas d'icônes et pas de souris. Tout se passe dans un terminal, et cette fenêtre noire avec un curseur clignotant est principalement ce qui décourage les gens de se lancer de le self-hosting. À tort : le terminal n'est qu'un chat. Vous posez une question ou écrivez un ordre, la machine répond. Rien de plus complexe qu'une barre de recherche, sauf qu'il en fait bien plus et ne cache jamais une option derrière trois menus.
|
||||
Un serveur n'a pas de bureau, pas d'icônes et pas de souris. Tout se passe dans un terminal, et cette fenêtre noire avec un curseur clignotant est principalement ce qui décourage les gens de se lancer dans le self-hosting. À tort : le terminal n'est qu'un chat. Vous posez une question ou écrivez un ordre, la machine répond. Rien de plus complexe qu'une barre de recherche, sauf qu'il en fait bien plus et ne cache jamais une option derrière trois menus.
|
||||
|
||||
La bonne nouvelle, c'est que vous n'avez pas besoin de connaître des centaines de commandes. Une dizaine d'entre elles couvrent presque tout vos besoins sur un serveur maison, et elles suivent toutes le même schéma. Apprenez à lire ce schéma et chaque commande que vous croiserez par la suite deviendra lisible, même celles que vous n'avez jamais vues.
|
||||
La bonne nouvelle, c'est que vous n'avez pas besoin de connaître des centaines de commandes. Une dizaine d'entre elles couvrent presque tous vos besoins sur un serveur maison, et elles suivent toutes le même schéma. Apprenez à lire ce schéma et chaque commande que vous croiserez par la suite deviendra lisible, même celles que vous n'avez jamais vues.
|
||||
|
||||
## Comment une commande est construite
|
||||
|
||||
@@ -49,8 +49,8 @@ Quand la cible est un endroit sur le disque, vous l'écrivez sous forme de chemi
|
||||
| `/var/log` | un chemin **absolu**, même résultat depuis n'importe où |
|
||||
| `logs/aujourdhui` | un chemin **relatif**, compris depuis là où vous êtes |
|
||||
|
||||
::info
|
||||
L'usage des dossiers par l'OS est un sujet à part entière, traité dans [dossiers et partitions](/general/linux/filesystem).
|
||||
::note{to="/general/linux/filesystem"}
|
||||
L'usage des dossiers par l'OS est un sujet à part entière, traité dans **dossiers et partitions**.
|
||||
::
|
||||
|
||||
L'invite de commande indique elle-même où vous êtes : dans `utilisateur@serveex:~/docker$`, vous êtes connecté en tant qu'`utilisateur` sur la machine nommée `serveex`, dans le dossier `docker` de votre home. Ce `$` final signifie que vous êtes loggé avec un utilisateur normal. Si vous voyez `#` à la place, c'est que vous êtes connecté avec l'utilisateur root et chaque faute de frappe compte double.
|
||||
@@ -83,7 +83,7 @@ Vous dit où vous êtes. Elle ne change rien, elle répond juste à la question.
|
||||
pwd
|
||||
```
|
||||
|
||||
```console [Sortie]
|
||||
```console [Output]
|
||||
/home/utilisateur/docker
|
||||
```
|
||||
|
||||
@@ -95,7 +95,7 @@ Liste ce qu'il y a dans le dossier courant. Seule, elle n'affiche que les noms,
|
||||
ls -lah
|
||||
```
|
||||
|
||||
```console [Sortie]
|
||||
```console [Output]
|
||||
total 20K
|
||||
drwxr-xr-x 4 utilisateur utilisateur 4.0K Sep 5 10:12 .
|
||||
drwxr-xr-x 18 utilisateur utilisateur 4.0K Sep 4 21:03 ..
|
||||
@@ -108,7 +108,7 @@ La première colonne, ce sont les permissions, le `d` tout au début signifiant
|
||||
|
||||
### `cd`, change directory
|
||||
|
||||
Permet de changer de repertoire. Lorsque vous indiquez un chemin, elle vous y rend. Avec `..` elle remonte d'un niveau, et sans rien du tout elle vous ramène dans votre dossier utilisateur.
|
||||
Permet de changer de répertoire. Lorsque vous indiquez un chemin, elle vous y emmène. Avec `..` elle remonte d'un niveau, et sans rien du tout elle vous ramène dans votre dossier utilisateur.
|
||||
|
||||
```console [Terminal]
|
||||
utilisateur@serveex:~/docker$ cd /var/log
|
||||
@@ -128,7 +128,7 @@ mkdir sauvegardes
|
||||
mkdir -p docker/immich/config
|
||||
```
|
||||
|
||||
```console [Sortie]
|
||||
```console [Output]
|
||||
|
||||
```
|
||||
|
||||
@@ -145,11 +145,11 @@ mv ancien-nom.txt nouveau-nom.txt
|
||||
ls
|
||||
```
|
||||
|
||||
```console [Sortie]
|
||||
```console [Output]
|
||||
compose.yaml compose.yaml.bak config config-backup nouveau-nom.txt
|
||||
```
|
||||
|
||||
Trois commandes silencieuses, et `ls` qui montre le résultat : la copie est à côté de l'original, le dossier a été dupliqué, et `ancien-nom.txt` a disparu parce que le déplacer vers un autre nom équivaut à le renommer/
|
||||
Trois commandes silencieuses, et `ls` qui montre le résultat : la copie est à côté de l'original, le dossier a été dupliqué, et `ancien-nom.txt` a disparu parce que le déplacer vers un autre nom équivaut à le renommer.
|
||||
|
||||
### `rm`, remove
|
||||
|
||||
@@ -169,7 +169,7 @@ Pour éditer un fichier, `nano` ouvre un éditeur simple : les flèches pour se
|
||||
cat .env
|
||||
```
|
||||
|
||||
```properties [Sortie]
|
||||
```properties [Output]
|
||||
PUID=1000
|
||||
PGID=1000
|
||||
TZ=Europe/Paris
|
||||
@@ -183,14 +183,14 @@ TZ=Europe/Paris
|
||||
grep -rin "password" /home/utilisateur/docker
|
||||
```
|
||||
|
||||
```console [Sortie]
|
||||
```console [Output]
|
||||
/home/utilisateur/docker/immich/.env:6:DB_PASSWORD=changeme
|
||||
/home/utilisateur/docker/vaultwarden/compose.yaml:14: ADMIN_PASSWORD=hunter2
|
||||
```
|
||||
|
||||
Chaque ligne indique le fichier, puis le numéro de ligne à l'intérieur, puis la ligne correspondante elle-même. Très pratique le jour où vous ne vous souvenez plus dans quelle stack se trouve un réglage.
|
||||
|
||||
### `sudo`, lancer en privilèges administrateur
|
||||
### `sudo`, lancer en tant qu'administrateur
|
||||
|
||||
*Substitute user do*. Afin d'éviter de casser votre serveur par accident, un utilisateur normal ne peut pas toucher aux fichiers du système. Préfixer une commande par `sudo` lance cette seule commande avec les droits administrateur. Cette commande vous demandera votre mot de passe au moins une fois par session, et parfois plusieurs fois selon le temps qui se sera écoulé depuis sa dernière utilisation.
|
||||
|
||||
@@ -198,7 +198,7 @@ Chaque ligne indique le fichier, puis le numéro de ligne à l'intérieur, puis
|
||||
nano /etc/ssh/sshd_config
|
||||
```
|
||||
|
||||
```console [Sortie]
|
||||
```console [Output]
|
||||
Error writing /etc/ssh/sshd_config: Permission denied
|
||||
```
|
||||
|
||||
@@ -206,12 +206,12 @@ Error writing /etc/ssh/sshd_config: Permission denied
|
||||
sudo nano /etc/ssh/sshd_config
|
||||
```
|
||||
|
||||
```console [Sortie]
|
||||
```console [Output]
|
||||
[sudo] password for utilisateur:
|
||||
```
|
||||
|
||||
::note
|
||||
Lordsqu'une commande répond `Permission denied`, c'est quasiment certain que c'est parce qu'elle a besoin des privilèges administrateurs : il lui fallait `sudo`. Cependant, résistez tout de même au réflexe de mettre `sudo` partout, un fichier créé avec les privilèges root continuera de vous embêter par la suite parce que votre utilisateur normal n'en sera plus propriétaire.
|
||||
Lorsqu'une commande répond `Permission denied`, c'est quasiment certain que c'est parce qu'elle a besoin des privilèges administrateurs : il lui fallait `sudo`. Cependant, résistez tout de même au réflexe de mettre `sudo` partout, un fichier créé avec les privilèges root continuera de vous embêter par la suite parce que votre utilisateur normal n'en sera plus propriétaire.
|
||||
::
|
||||
|
||||
## Aide-mémoire
|
||||
@@ -243,7 +243,7 @@ Les commandes qui valent la peine d'être gardées sous la main, et d'où vienne
|
||||
| `chmod` | change mode | Change les permissions d'un fichier |
|
||||
| `chown` | change owner | Change le propriétaire d'un fichier |
|
||||
| `sudo` | substitute user do | Lance une commande en administrateur |
|
||||
| `apt` | advanced package tool | Installe, met à jour et supprime des paquets |
|
||||
| `apt` | Advanced Package Tool | Installe, met à jour et supprime des paquets |
|
||||
| `systemctl` | control systemd | Démarre, arrête et active des services |
|
||||
| `ssh` | secure shell | Ouvre une session sur une machine distante |
|
||||
| `scp` | secure copy | Copie des fichiers via SSH |
|
||||
|
||||
@@ -6,11 +6,11 @@ description: Comment le système de fichiers de Debian est organisé, ce que con
|
||||
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||
Windows donne à chaque disque sa propre lettre. Linux non : il y a un arbre, il commence à `/`, la racine (root), et tout le reste s'y accroche, y compris vos autres disques. Un deuxième disque n'est pas `D:`, il est *monté* sur un dossier de l'arbre, `/mnt/data` par exemple, et à partir de là il ressemble à n'importe quel autre dossier. Cela peut paraître éroutant au début, mais très pratique ensuite, puisqu'un programme n'a jamais à savoir sur quel disque physique il écrit.
|
||||
Windows donne à chaque disque sa propre lettre. Linux non : il y a un arbre, il commence à `/`, la racine (root), et tout le reste s'y accroche, y compris vos autres disques. Un deuxième disque n'est pas `D:`, il est *monté* sur un dossier de l'arbre, `/mnt/data` par exemple, et à partir de là il ressemble à n'importe quel autre dossier. Cela peut paraître déroutant au début, mais très pratique ensuite, puisqu'un programme n'a jamais à savoir sur quel disque physique il écrit.
|
||||
|
||||
## L'arborescence
|
||||
|
||||
Cet arborescence n'a rien d'arbitraire. Toutes les installations de Debian sont organisées de la même manière, et c'est pour ça qu'un tutoriel écrit pour le serveur de quelqu'un d'autre s'applique également au vôtre.
|
||||
Cette arborescence n'a rien d'arbitraire. Toutes les installations de Debian sont organisées de la même manière, et c'est pour ça qu'un tutoriel écrit pour le serveur de quelqu'un d'autre s'applique également au vôtre.
|
||||
|
||||
| Dossier | Ce qu'il contient |
|
||||
| --- | --- |
|
||||
@@ -22,13 +22,13 @@ Cet arborescence n'a rien d'arbitraire. Toutes les installations de Debian sont
|
||||
| `/usr` | Les programmes installés eux-mêmes, gérés par `apt` |
|
||||
| `/opt` | Les logiciels installés en dehors du gestionnaire de paquets |
|
||||
| `/mnt` et `/media` | Là où sont montés les disques supplémentaires, `/media` pour les amovibles |
|
||||
| `/boot` | Le noyau et le chargeur de démarrage, sur une petite partition à part |
|
||||
| `/boot` | Le noyau et le chargeur de démarrage. Sur une install Debian UEFI par défaut, il vit sur `/` ; seule `/boot/efi` (la partition système EFI) est à part |
|
||||
| `/dev` | Votre matériel, exposé sous forme de fichiers (`/dev/sda` est un disque) |
|
||||
| `/proc` et `/sys` | L'état vivant du noyau, changeant à la volée, pas de vrais fichiers |
|
||||
|
||||
## Un dossier n'est pas une partition
|
||||
|
||||
Les partitions sont une question distincte des dossiers. Une installation minimale de Debian en crée typiquement deux, une pour `/` et une pour le swap, si bien que tous les dossiers ci-dessus sauf `/boot` vivent sur la même partition et se partagent le même espace libre. Deux commandes pour en voir la réalité : `lsblk` dessine l'arbre des disques et des partitions, `df -h` montre le taux de remplissage de chacune.
|
||||
Les partitions sont une question distincte des dossiers. Une installation minimale de Debian en crée typiquement deux, une pour `/` et une pour le swap, si bien que tous les dossiers ci-dessus sauf `/boot/efi` vivent sur la même partition et se partagent le même espace libre. Deux commandes pour en voir la réalité : `lsblk` dessine l'arbre des disques et des partitions, `df -h` montre le taux de remplissage de chacune.
|
||||
|
||||
```bash [Terminal]
|
||||
lsblk
|
||||
@@ -46,13 +46,13 @@ sdb 8:16 0 3.6T 0 disk
|
||||
|
||||
## Quelques habitudes à prendre
|
||||
|
||||
- **Ne travaillez que dans un seul dossier pour l'usage de votre serveur.** `/srv` est le dossier que la norme réserve aux données servies par la machine, ce qui en fait l'endroit le plus propre pour mettre les sous dossiers et fichiers dont vous avez besoin de stocker sur votre serveur. Par exemple pour Docker, [Serveex](/serveex/introduction) met tout dans `/srv/docker`, un dossier par stack. Ce qui compte, c'est de choisir un endroit et de s'y tenir, plutôt que d'en éparpiller la moitié dans votre dossier personnel ou pire, dans les dossiers de Debian et directement à la racine.
|
||||
- **Ne travaillez que dans un seul dossier pour l'usage de votre serveur.** `/srv` est le dossier que la norme réserve aux données servies par la machine, ce qui en fait l'endroit le plus propre pour mettre les sous dossiers et fichiers que vous avez besoin de stocker sur votre serveur. Par exemple pour Docker, [Serveex](/serveex/introduction) met tout dans `/srv/docker`, un dossier par stack. Ce qui compte, c'est de choisir un endroit et de s'y tenir, plutôt que d'en éparpiller la moitié dans votre dossier personnel ou pire, dans les dossiers de Debian et directement à la racine.
|
||||
- **Vos fichiers à vous, propre à un utilisateur, vont dans votre home.** Les scripts dans `~/bin`, les notes, les téléchargements, tout ce qui est personnel. `/root` est le dossier du compte root, pas un endroit commode où déposer des choses.
|
||||
- **Ne modifiez jamais quoi que ce soit sous `/usr` ou `/bin` à la main.** `apt` en est propriétaire, et vos changements disparaîtront à la prochaine mise à jour. Ce que vous avez le droit de configurer vit dans `/etc`.
|
||||
- **Dans `/etc`, préférez créer un fichier additionnel plutôt que de modifier le principal.** Beaucoup de services lisent tous les `.conf` d'un dossier `quelquechose.d/` posé à côté de leur config principale, `/etc/ssh/sshd_config.d/` par exemple. Votre fichier survit alors à une mise à jour de paquet qui réécrirait l'original.
|
||||
- **Montez les disques de données par UUID, pas par `/dev/sdb`.** Les lettres de périphérique sont attribuées dans l'ordre où le noyau trouve les disques, elles peuvent donc s'échanger après un redémarrage ou l'ajout d'un disque. `lsblk -f` vous donne l'UUID à mettre dans `/etc/fstab`.
|
||||
- **Gardez un œil sur `/var`.** Les images Docker, les logs des conteneurs et ceux du système s'y accumulent tous, sur la même partition que le reste. `du -sh /var/lib/docker` vous dit ce que pèsent les conteneurs, `df -h` s'il faut s'inquiéter.
|
||||
- **Ne créez pas vos fichiers avec `sudo` lorque ce n'est pas nécessaire.** Un fichier créé en root dans votre home reste la propriété de root, et vous vous battrez avec des erreurs de permissions dessus pendant des semaines.
|
||||
- **Ne créez pas vos fichiers avec `sudo` lorsque ce n'est pas nécessaire.** Un fichier créé en root dans votre home reste la propriété de root, et vous vous battrez avec des erreurs de permissions dessus pendant des semaines.
|
||||
|
||||
::note{to="/general/linux/cli-basics"}
|
||||
Tout ce qui précède suppose que vous savez déjà vous déplacer dans un terminal. Si `cd`, `ls` et `sudo` ne vous parlent pas encore, commencez par les **bases de la ligne de commande**.
|
||||
|
||||
@@ -37,7 +37,7 @@ sudo apt install btop duf ncdu tealdeer ufw
|
||||
|
||||
## `btop`, surveiller ce que fait la machine
|
||||
|
||||
Le remplaçant moderne de `top` et `htop` : CPU, RAM, disques, réseau et processus sur un seul écran, avec des graphiques, des couleurs et une souris qui marche. C'est ce que vous ouvrez quand quelque chose semble lent, l'équivalent du gestionnaire de tache sur Windows ou du moniteur d'activité sur Mac.
|
||||
Le remplaçant moderne de `top` et `htop` : CPU, RAM, disques, réseau et processus sur un seul écran, avec des graphiques, des couleurs et une souris qui marche. C'est ce que vous ouvrez quand quelque chose semble lent, l'équivalent du gestionnaire de tâches sur Windows ou du moniteur d'activité sur Mac.
|
||||
|
||||
::steps{level="4"}
|
||||
#### L'installer
|
||||
@@ -61,7 +61,7 @@ Cliquez sur un processus pour le sélectionner, :kbd{value="Esc"} ouvre le menu,
|
||||
|
||||
## `duf`, l'espace disque qui se lit comme un tableau
|
||||
|
||||
`df -h` affiche tous tous vos dossiers/fichiers et vous laisse vous exploser les yeux sur les colonnes, les chiffres, les tailles. `duf` montre les mêmes informations groupées, alignées et colorées, avec une barre d'utilisation par système de fichiers.
|
||||
`df -h` affiche jusqu'au moindre loop device créé par Docker et vous laisse vous exploser les yeux sur les colonnes, les chiffres, les tailles. `duf` montre les mêmes informations groupées, alignées et colorées, avec une barre d'utilisation par système de fichiers.
|
||||
|
||||
::steps{level="4"}
|
||||
#### L'installer
|
||||
@@ -145,10 +145,11 @@ La seule exception : il n'est pas empaqueté par Debian. C'est une interface tex
|
||||
#### Télécharger la dernière version
|
||||
|
||||
```bash [Terminal]
|
||||
curl -Lo /tmp/lazydocker.tar.gz "https://github.com/jesseduffield/lazydocker/releases/latest/download/lazydocker_0.25.2_Linux_x86_64.tar.gz"
|
||||
LAZYDOCKER_VERSION=$(curl -s https://api.github.com/repos/jesseduffield/lazydocker/releases/latest | grep -Po '"tag_name": "v\K[^"]*')
|
||||
curl -Lo /tmp/lazydocker.tar.gz "https://github.com/jesseduffield/lazydocker/releases/latest/download/lazydocker_${LAZYDOCKER_VERSION}_Linux_x86_64.tar.gz"
|
||||
```
|
||||
|
||||
Vérifiez le numéro de version actuel sur la [page des releases](https://github.com/jesseduffield/lazydocker/releases), et prenez `arm64` au lieu de `x86_64` si le serveur est un Raspberry Pi ou équivalent.
|
||||
Le nom du fichier de la release intègre le numéro de version, donc il ne peut pas être récupéré avec un simple lien `latest` ; la première commande lit la version actuelle depuis l'API GitHub plutôt que d'en coder une en dur qui finirait par devenir obsolète. Prenez `arm64` au lieu de `x86_64` si le serveur est un Raspberry Pi ou équivalent.
|
||||
|
||||
#### Installer le binaire
|
||||
|
||||
@@ -178,8 +179,8 @@ Il a besoin d'accéder au socket Docker, d'où le `sudo` à moins que votre util
|
||||
| Touche | Ce qu'elle fait |
|
||||
| --- | --- |
|
||||
| `1` à `6` | Aller à un onglet : projets, services, conteneurs, images, volumes, réseaux |
|
||||
| Flèches | Se déplacer dans le onglet, la partie droite suit la sélection |
|
||||
| :kbd{value="Enter"} | Passer sur le onglet principal à droite, :kbd{value="Esc"} revient |
|
||||
| Flèches | Se déplacer dans l'onglet, la partie droite suit la sélection |
|
||||
| :kbd{value="Enter"} | Passer sur l'onglet principal à droite, :kbd{value="Esc"} revient |
|
||||
| `x` | Ouvrir le menu de tout ce que vous pouvez faire avec la sélection |
|
||||
| `m` | Suivre les logs |
|
||||
| `s` / `r` / `p` | Arrêter, redémarrer, mettre en pause le conteneur sélectionné |
|
||||
@@ -195,7 +196,7 @@ La casse compte : `E` ouvre un shell dans le conteneur, `e` masque ceux qui sont
|
||||
La [liste complète](https://github.com/jesseduffield/lazydocker/blob/master/docs/keybindings/Keybindings_en.md) se trouve dans la documentation du projet.
|
||||
|
||||
::note
|
||||
N'etant pas un package de Debian signifie qu'il ne sera pas mis à jour par `apt full-upgrade`. Ré-éxecutez ces étapes lorsque vous voudrez une version plus récente.
|
||||
Ne pas être un paquet Debian signifie qu'il ne sera pas mis à jour par `apt full-upgrade`. Réexécutez ces étapes lorsque vous voudrez une version plus récente.
|
||||
::
|
||||
|
||||
#### Terminé !
|
||||
@@ -246,7 +247,7 @@ sudo ufw enable
|
||||
sudo ufw status verbose
|
||||
```
|
||||
|
||||
```console [Sortie]
|
||||
```console [Output]
|
||||
Status: active
|
||||
Logging: on (low)
|
||||
Default: deny (incoming), allow (outgoing), disabled (routed)
|
||||
|
||||
@@ -9,7 +9,7 @@ navigation:
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
## Un homelab de débutant, pour les débutants
|
||||
|
||||

|
||||

|
||||
|
||||
**Serveex** est avant tout un projet personnel visant à héberger chez soi le plus de services du quotidien possible, sans dépendre de plateformes propriétaires (Google, Apple, Netflix, etc.). L'objectif était d'expérimenter, d'apprendre, et de documenter chaque étape du chemin. C'est un projet purement scientifique, pas destiné à un usage en production.
|
||||
|
||||
@@ -62,7 +62,7 @@ to: /serveex/core/wireguard
|
||||
ui:
|
||||
icon: text-[#88171A]
|
||||
---
|
||||
Installer et déployer Wireguard
|
||||
Installer et déployer WireGuard
|
||||
::
|
||||
|
||||
::card{icon="i-noto-globe-showing-americas" title="Reverse Proxy" to="/serveex/core/swag"}
|
||||
@@ -174,7 +174,7 @@ to: /serveex/media/qbittorrent
|
||||
ui:
|
||||
icon: text-[#2F67BA]
|
||||
---
|
||||
Installer et déployer Qbittorrent
|
||||
Installer et déployer qBittorrent
|
||||
::
|
||||
|
||||
::card
|
||||
@@ -189,7 +189,7 @@ Installer et déployer la stack Servarr
|
||||
::
|
||||
::
|
||||
|
||||
### Cloud & Photos
|
||||
### Cloud Drive & Photos
|
||||
|
||||
:::div{class="relative"}
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px}
|
||||
@@ -284,7 +284,7 @@ to: /serveex/apps/adguard
|
||||
ui:
|
||||
icon: text-[#68BC71]
|
||||
---
|
||||
Installer et déployer Adguard Home
|
||||
Installer et déployer AdGuard Home
|
||||
::
|
||||
|
||||
::card
|
||||
@@ -296,6 +296,8 @@ ui:
|
||||
icon: text-[#175DDC]
|
||||
---
|
||||
Installer et déployer Vaultwarden
|
||||
::
|
||||
|
||||
::
|
||||
::
|
||||
|
||||
@@ -313,6 +315,14 @@ Installer et déployer Authentik
|
||||
::card{icon="i-noto-crystal-ball" title="Gestionnaire Docker multi-hôtes" to="/serveex/advanced/arcane"}
|
||||
Installer et déployer Arcane
|
||||
::
|
||||
|
||||
::card{icon="i-lucide-database-backup" title="Sauvegardes en 3-2-1" to="/serveex/advanced/backrest"}
|
||||
Installer et déployer Backrest
|
||||
::
|
||||
|
||||
::card{icon="i-lucide-rotate-ccw" title="Retour en arrière instantané" to="/serveex/advanced/btrfs-snapshots"}
|
||||
Mettre en place les snapshots BTRFS
|
||||
::
|
||||
::
|
||||
|
||||
## Bientôt
|
||||
|
||||
@@ -10,7 +10,7 @@ description: Guide pas à pas pour installer Debian 13 sur un serveur maison et
|
||||
|
||||
L'autre raison, c'est qu'il ne vous donnera aucune limite, il ne vous enfermera jamais. Les systèmes clés en main comme Unraid, TrueNAS ou le DSM de Synology posent leur propre couche par-dessus, et le jour où vous avez besoin de quelque chose que leur interface n'expose pas, vous serez coincé ou devrez bricoler autour. Debian n'est qu'un serveur : vous installez ce que vous voulez, où vous voulez, et rien n'est caché derrière l'interface de quelqu'un d'autre. C'est exactement ce que la plupart des projets auto-hébergés visent en premier, leurs docs vous donnent donc des commandes `apt` qui fonctionnent telles quelles, et n'importe quel message d'erreur collé dans un moteur de recherche a déjà des années de réponses derrière lui. Une installation minimale est assez légère pour laisser la quasi intégralité de la RAM et du CPU à tous les délires que vous installerez dessus.
|
||||
|
||||

|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
@@ -20,7 +20,7 @@ L'autre raison, c'est qu'il ne vous donnera aucune limite, il ne vous enfermera
|
||||
|
||||
### Réglages du BIOS
|
||||
|
||||
Appuyez sur :kbd{value="Del"} ou :kbd{value="F2"} juste après l'allumage de votre machine afin d'ouvrir le setup du BIOS (l'écran de démarrage indique généralement quelle touche c'est). La plupart des machines ont aussi un menu de démarrage ponctuel, souvent :kbd{value="F12"}, :kbd{value="F11"} ou :kbd{value="F8"}, qui permet de démarrer sur la clé USB une seule fois sans toucher à l'ordre de démarrage permanent. Debian documente la procédure générale dans son [manuel d'installation](https://www.debian.org/releases/forky/amd64/ch03s06.fr.html), et voici ce qui compte avant d'installer :
|
||||
Appuyez sur :kbd{value="Del"} ou :kbd{value="F2"} juste après l'allumage de votre machine afin d'ouvrir le setup du BIOS (l'écran de démarrage indique généralement quelle touche c'est). La plupart des machines ont aussi un menu de démarrage ponctuel, souvent :kbd{value="F12"}, :kbd{value="F11"} ou :kbd{value="F8"}, qui permet de démarrer sur la clé USB une seule fois sans toucher à l'ordre de démarrage permanent. Debian documente la procédure générale dans son [manuel d'installation](https://www.debian.org/releases/trixie/amd64/ch03s06.fr.html), et voici ce qui compte avant d'installer :
|
||||
|
||||
- **Mode de démarrage.** Préférez l'UEFI natif. Il est nécessaire que l'installateur démarre dans le *même* mode que celui dans lequel vous comptez faire tourner le serveur, parce que l'UEFI utilise un partitionnement GPT alors que le BIOS legacy (et l'UEFI en mode CSM) utilise une table de partitions DOS. Une incohérence installe le bootloader au mauvais endroit. Attention sur les machines multiboot : le mode de démarrage par défaut des périphériques amovibles n'est souvent pas celui utilisé pour les disques internes.
|
||||
- **Le Secure Boot** peut rester activé. Debian fournit un chargeur shim signé par Microsoft, il démarre donc très bien tel quel.
|
||||
@@ -40,11 +40,11 @@ Si vous êtes en dual boot avec Windows, désactivez son *démarrage rapide* : i
|
||||
|
||||
Récupérez l'image **netinst** `amd64` sur [debian.org](https://www.debian.org/download.fr.html). Elle fait environ 700 Mo et récupère le reste des paquets sur le réseau pendant l'installation, ce qui est exactement ce qu'on veut sur un serveur branché en ethernet : vous obtenez des paquets à jour au lieu d'installer depuis un instantané vieux de plusieurs mois puis de tout mettre à jour derrière. Les images DVD complètes n'ont de sens que si la machine n'a pas de réseau pendant l'installation.
|
||||
|
||||
#### Créer une clée bootable avec Rufus
|
||||
#### Créer une clé bootable avec Rufus
|
||||
|
||||
Sous Windows, utilisez [Rufus](https://rufus.ie/) (portable, aucune installation nécessaire). Branchez une clé USB de 2 Go ou plus, en gardant en tête qu'**elle sera entièrement effacée**, puis :
|
||||
|
||||
- **Périphérique** : votre clé USB. Vérifiez la capacité deux fois, Sinon Rufus écrira sans rechigner sur le mauvais disque si vous le laissez faire.
|
||||
- **Périphérique** : votre clé USB. Vérifiez la capacité deux fois : sinon, Rufus écrira sans rechigner sur le mauvais disque si vous le laissez faire.
|
||||
- **Type de démarrage** : `SÉLECTION`, puis choisissez l'ISO Debian que vous venez de télécharger.
|
||||
- **Schéma de partition** : il doit correspondre au mode de démarrage réglé dans le BIOS plus haut. `GPT` pour l'UEFI, `MBR` uniquement si vous restez en legacy/CSM. Le champ système de destination suit automatiquement.
|
||||
- Laissez les options de formatage par défaut, puis cliquez sur `DÉMARRER`. Si Rufus demande comment écrire l'image, gardez le *mode image ISO* recommandé.
|
||||
@@ -89,6 +89,10 @@ Confirmez le fuseau horaire deviné à partir de votre pays.
|
||||
|
||||
*Assisté, utiliser un disque entier* sur le disque système, puis *Tout dans une seule partition*, ce qui vous donne un gros `/` plus une partition de swap. Des partitions `/home` ou `/var` séparées n'apportent pas grand-chose ici et garantissent surtout que l'une se remplit pendant que les autres restent à moitié vides. Ne prenez LVM que si vous savez déjà que vous voulez des snapshots ou agrandir des volumes plus tard. Vos disques de données ne sont pas touchés à ce stade, vous les monterez ensuite.
|
||||
|
||||
::warning{to="/serveex/advanced/btrfs-snapshots"}
|
||||
__Pour les utilisateurs avancés :__ c'est maintenant qu'il faut décider, pas plus tard. Choisir *Manuel* ici plutôt qu'*Assisté* permet de formater la partition racine en Btrfs plutôt qu'en ext4, ce qui débloque des snapshots instantanés et quasi gratuits vers lesquels revenir avant une mise à jour risquée ou un changement de config. Une fois cette étape passée et Debian installé en ext4, passer à Btrfs n'est plus possible sans effacer le disque et tout recommencer. Voir **Snapshots BTRFS** pour la mise en place, ça ne remplace pas non plus de vraies sauvegardes, un snapshot vit sur le même disque.
|
||||
::
|
||||
|
||||
Terminez avec *Terminer le partitionnement et appliquer les changements*, puis confirmez avec *Oui* : c'est le point de non-retour pour ce disque.
|
||||
|
||||

|
||||
@@ -160,7 +164,7 @@ Toujours sur l'autre machine, générez une clé.
|
||||
ssh-keygen -t ed25519
|
||||
```
|
||||
|
||||
Appuyez sur :kbd{value="Enter"} pour accepter le chemin par défaut, et mettez une passphrase (elle protège le fichier de clé lui-même, votre système la retiendra après le premier déverrouillage). Il s'agit ensuite de transmettre la clée publique à votre serveur. A noter que Windows n'a pas de `ssh-copy-id`, nous pousserons donc la clé manuellement dans ce cas :
|
||||
Appuyez sur :kbd{value="Enter"} pour accepter le chemin par défaut, et mettez une passphrase (elle protège le fichier de clé lui-même, votre système la retiendra après le premier déverrouillage). Il s'agit ensuite de transmettre la clé publique à votre serveur. À noter que Windows n'a pas de `ssh-copy-id`, nous pousserons donc la clé manuellement dans ce cas :
|
||||
|
||||
::code-group
|
||||
```bash [macOS]
|
||||
@@ -203,7 +207,7 @@ sudo systemctl restart ssh
|
||||
```
|
||||
|
||||
::warning
|
||||
Gardez votre session SSH actuelle ouverte pendant le test. Ouvrez un **second** terminal et reconnectez-vous : si la clé ne fonctionne plus, la session restée ouverte est votre porte de secours pour corriger la configuration. Si vous la fermez avant d'avoir vérifié et une faute de frappe vous enferme en dehors de votre propre serveur, avec l'écran et le clavier comme seul recours.
|
||||
Gardez votre session SSH actuelle ouverte pendant le test. Ouvrez un **second** terminal et reconnectez-vous : si la clé ne fonctionne plus, la session restée ouverte est votre porte de secours pour corriger la configuration. Si vous la fermez avant d'avoir vérifié et qu'une faute de frappe vous enferme en dehors de votre propre serveur, l'écran et le clavier deviennent votre seul recours.
|
||||
::
|
||||
|
||||
::note
|
||||
@@ -254,6 +258,7 @@ sudo nano /etc/systemd/system/wol.service
|
||||
```ini [wol.service]
|
||||
[Unit]
|
||||
Description=Enable Wake on LAN
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
@@ -312,7 +317,7 @@ sudo apt full-upgrade
|
||||
sudo apt autoremove --purge
|
||||
```
|
||||
|
||||
Chaque mise à jour de noyau laisse le précédent installé, et `/boot` est une petite partition qui finit par se remplir et casser la mise à jour suivante. Faites-le à chaque fois, pas de temps en temps. `--purge` supprime aussi les fichiers de configuration des paquets retirés.
|
||||
Chaque mise à jour de noyau laisse le précédent installé, et ça s'accumule si personne ne fait le ménage. Faites-le à chaque fois, pas de temps en temps. `--purge` supprime aussi les fichiers de configuration des paquets retirés.
|
||||
|
||||
#### Redémarrer si le noyau a bougé
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ Un **conteneur** contourne le problème : il empaquette une application avec tou
|
||||
|
||||
**Docker** est l'outil qui construit, démarre et gère ces conteneurs. Pointez-le sur une *image*, un instantané prêt à l'emploi d'une application maintenu par ses développeurs, et il la télécharge et la lance en une commande. Tout le reste de Serveex est bâti dessus : chaque application à partir d'ici est un conteneur Docker, ou une poignée de conteneurs qui travaillent ensemble.
|
||||
|
||||

|
||||

|
||||
|
||||
## Installer Docker
|
||||
::steps{level="3"}
|
||||
@@ -53,7 +53,7 @@ sudo mkdir /srv/docker
|
||||
## Installer [Dockge](https://github.com/louislam/dockge) pour gérer et déployer les conteneurs
|
||||
[Dockge](https://github.com/louislam/dockge) est un outil web permettant de créer, configurer, lancer et gérer des conteneurs pour Docker. C'est une interface simple, intuitive, qui est plus légère et plus facile pour les débutants que d'utiliser docker en CLI ou Portainer.
|
||||
|
||||

|
||||

|
||||
|
||||
### Configuration
|
||||
|
||||
@@ -65,7 +65,7 @@ tree:
|
||||
- srv:
|
||||
- docker:
|
||||
- dockge:
|
||||
- compose.yml
|
||||
- compose.yaml
|
||||
---
|
||||
::
|
||||
|
||||
@@ -81,7 +81,7 @@ sudo mkdir dockge
|
||||
|
||||
```bash [Terminal]
|
||||
cd /srv/docker/dockge
|
||||
sudo nano compose.yml
|
||||
sudo nano compose.yaml
|
||||
```
|
||||
Collez ce qui suit :
|
||||
|
||||
@@ -94,15 +94,52 @@ services:
|
||||
container_name: dockge
|
||||
ports:
|
||||
- 3555:5001 # le port accessible sur le réseau local sera 3555
|
||||
|
||||
environment:
|
||||
- DOCKER_HOST=tcp://docker-socket-proxy:2375
|
||||
- DOCKGE_STACKS_DIR=/srv/docker
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /srv/docker/dockge/data:/app/data
|
||||
- /srv/docker:/srv/docker
|
||||
networks:
|
||||
- dockge-internal
|
||||
depends_on:
|
||||
- docker-socket-proxy
|
||||
|
||||
docker-socket-proxy:
|
||||
image: lscr.io/linuxserver/socket-proxy:latest
|
||||
container_name: docker-socket-proxy-dockge
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
networks:
|
||||
- dockge-internal
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
environment:
|
||||
- DOCKGE_STACKS_DIR=/srv/docker
|
||||
- CONTAINERS=1
|
||||
- IMAGES=1
|
||||
- NETWORKS=1
|
||||
- VOLUMES=1
|
||||
- EXEC=1
|
||||
- INFO=1
|
||||
- SYSTEM=1
|
||||
- POST=1
|
||||
- ALLOW_START=1
|
||||
- ALLOW_STOP=1
|
||||
- ALLOW_RESTARTS=1
|
||||
restart: unless-stopped
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /run
|
||||
|
||||
networks:
|
||||
dockge-internal:
|
||||
name: dockge-internal
|
||||
```
|
||||
|
||||
::warning
|
||||
Dockge a besoin d'accéder à l'API Docker pour gérer toutes les autres stacks de ce serveur, ce qui équivaut à un accès root sur l'hôte. Plutôt que de monter directement `/var/run/docker.sock`, cette config place **Docker Socket Proxy** devant, qui n'autorise que les permissions dont Dockge a réellement besoin (conteneurs, images, réseaux, volumes, exec, actions de cycle de vie), sur leur propre réseau interne. Dockge n'a pas d'authentification intégrée par défaut, n'exposez donc jamais le port `3555` au-delà de votre réseau local sans le placer derrière [TinyAuth](/serveex/security/tinyauth) ou [Authentik](/serveex/advanced/authentik).
|
||||
::
|
||||
|
||||
Appuyez sur :kbd{value="Ctrl+O"}, puis :kbd{value="Enter"} pour enregistrer, et :kbd{value="Ctrl+X"} pour quitter.
|
||||
|
||||
#### Lancer le conteneur
|
||||
@@ -122,7 +159,7 @@ Plus d'infos sur [Dockge et son utilisation](https://github.com/louislam/dockge)
|
||||
Et voilà ! Docker et un outil pour gérer facilement vos conteneurs sont prêts !
|
||||
|
||||
## [Watchtower](https://watchtower.nickfedor.com/), pour mettre à jour les conteneurs automatiquement
|
||||
Watchtower est un conteneur qui permet de vérifier les mise à jour et d'installer les nouvelles images sans effort, en ajoutant un simple label dans les fichiers `compose.yml` de vos conteneurs.
|
||||
Watchtower est un conteneur qui permet de vérifier les mise à jour et d'installer les nouvelles images sans effort, en ajoutant un simple label dans les fichiers `compose.yaml` de vos conteneurs.
|
||||
|
||||
### Configuration
|
||||
|
||||
@@ -149,14 +186,55 @@ services:
|
||||
- WATCHTOWER_LABEL_ENABLE=true
|
||||
- WATCHTOWER_CLEANUP=true
|
||||
- WATCHTOWER_REMOVE_VOLUMES=true
|
||||
- DOCKER_HOST=tcp://docker-socket-proxy:2375
|
||||
# Notifications Discord - décommentez si utilisées
|
||||
#- WATCHTOWER_NOTIFICATIONS=slack
|
||||
#- WATCHTOWER_NOTIFICATION_SLACK_IDENTIFIER=Watchtower
|
||||
#- WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL=${WH_URL}
|
||||
networks:
|
||||
- watchtower-internal
|
||||
depends_on:
|
||||
- docker-socket-proxy
|
||||
|
||||
docker-socket-proxy:
|
||||
image: lscr.io/linuxserver/socket-proxy:latest
|
||||
container_name: docker-socket-proxy-watchtower
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
networks:
|
||||
- watchtower-internal
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
environment:
|
||||
- CONTAINERS=1
|
||||
- IMAGES=1
|
||||
- NETWORKS=1
|
||||
- VOLUMES=1
|
||||
- INFO=1
|
||||
- SYSTEM=1
|
||||
- POST=1
|
||||
- ALLOW_START=1
|
||||
- ALLOW_STOP=1
|
||||
- ALLOW_RESTARTS=1
|
||||
restart: unless-stopped
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /run
|
||||
|
||||
networks:
|
||||
watchtower-internal:
|
||||
name: watchtower-internal
|
||||
```
|
||||
|
||||
::warning
|
||||
|
||||
`WATCHTOWER_REMOVE_VOLUMES=true` supprime les volumes anonymes d'un conteneur dès qu'il est mis à jour. Combiné à un tag `latest`, une mise à jour automatique peut silencieusement effacer les données de toute app qui stocke encore quelque chose dans un volume anonyme (sans nom) plutôt qu'un bind mount.
|
||||
::
|
||||
|
||||
::note
|
||||
Cette config place **Docker Socket Proxy** devant l'API Docker plutôt que de monter directement `/var/run/docker.sock`, afin que Watchtower n'obtienne que les permissions dont il a réellement besoin (lister/tirer les images, recréer les conteneurs) plutôt qu'un accès root complet à l'hôte.
|
||||
::
|
||||
|
||||
#### Renseigner vos variables d'environnement
|
||||
|
||||
Remplissez la section `.env` dans Dockge avec ce qui suit :
|
||||
@@ -173,12 +251,15 @@ WH_URL=
|
||||
|
||||
#### Activer Watchtower sur les autres conteneurs
|
||||
|
||||
Pour que Watchtower surveille vos autres conteneurs, ajoutez ceci à leur `compose.yml` :
|
||||
Pour que Watchtower surveille vos autres conteneurs, ajoutez ceci à leur `compose.yaml` :
|
||||
|
||||
```yaml [compose.yaml]
|
||||
---
|
||||
labels:
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
services:
|
||||
votreapp:
|
||||
# ...
|
||||
labels:
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
```
|
||||
|
||||
Redémarrez ensuite les stacks modifiées.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: Wireguard
|
||||
title: WireGuard
|
||||
description: Installer et configurer WireGuard VPN pour accéder à votre homelab de n'importe où et connecter tous vos appareils à votre réseau privé.
|
||||
---
|
||||
|
||||
@@ -7,36 +7,36 @@ description: Installer et configurer WireGuard VPN pour accéder à votre homela
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||
## Introduction
|
||||
L'utilisation d'un VPN permet d'accéder à distance aux ressources locales du serveur sans les exposer sur internet. C'est notamment une manière propre de sécuriser l'accès à la console SSH, plutot que d'exposer le port sur internet. C'est pouvoir se connecter à son réseau où que l'on soit, de maniere sécurisée, et de faire dialoguer des machines qui sont sur des réseaux différents.
|
||||
L'utilisation d'un VPN permet d'accéder à distance aux ressources locales du serveur sans les exposer sur internet. C'est notamment une manière propre de sécuriser l'accès à la console SSH, plutôt que d'exposer le port sur internet. C'est pouvoir se connecter à son réseau où que l'on soit, de manière sécurisée, et de faire dialoguer des machines qui sont sur des réseaux différents.
|
||||
|
||||
Ici nous utiliserons [Wireguard](https://www.wireguard.com/), un serveur VPN sécurisé et très performant, à l'aide des conteneurs :
|
||||
Ici nous utiliserons [WireGuard](https://www.wireguard.com/), un serveur VPN sécurisé et très performant, à l'aide des conteneurs :
|
||||
|
||||
- [wg-easy](https://github.com/wg-easy/wg-easy) pour le serveur, qui propose une interface web très simple pour controler les connexions et télécharger les fichiers de conf (notamment par QR code pour les téléphones)
|
||||
- [Wireguard](https://docs.linuxserver.io/images/docker-wireguard/?h=wireguard) pour les clients linux
|
||||
- [wg-easy](https://github.com/wg-easy/wg-easy) pour le serveur, qui propose une interface web très simple pour contrôler les connexions et télécharger les fichiers de conf (notamment par QR code pour les téléphones)
|
||||
- [WireGuard](https://docs.linuxserver.io/images/docker-wireguard/?h=wireguard) pour les clients Linux
|
||||
|
||||
Il existe aussi des clients Windows, MacOS, iOS et Android.
|
||||
Il existe aussi des clients Windows, macOS, iOS et Android.
|
||||
|
||||
Le principe est le suivant :
|
||||
|
||||
- Sur internet, n'importe qui peut contacter n'importe quel box internet et donc essayer de contacter n'importe quel serveur exposé.
|
||||
- Votre serveur est sur votre réseau local. Il est accessible depuis le réseau local mais pas depuis internet, mis à part les services exposés (comme nous l'avons fait avec Dockge). Pour accéder aux ressources non exposées, vous devez être connecté sur le meme réseau que votre serveur et donc etre chez vous. De plus, vous devez laisser ouvert les ports utilisés par vos services à travers le pare feu de votre serveur.
|
||||
- Nous souhaitons ici au contraire, depuis n'importe où, pouvoir accéder de maniere securisée aux services non exposés sur internet du serveur, comme la console SSH qui permet de se connecter à la machine par exemple.
|
||||
- Nous souhaitons aussi accéder aux services d'autres serveurs, et par exemple relier de maniere sécurisée deux instances de Dockge pour tout controler depuis la meme interface.
|
||||
- Votre serveur est sur votre réseau local. Il est accessible depuis le réseau local mais pas depuis internet, mis à part les services exposés (comme nous l'avons fait avec Dockge). Pour accéder aux ressources non exposées, vous devez être connecté sur le même réseau que votre serveur et donc être chez vous. De plus, vous devez laisser ouverts les ports utilisés par vos services à travers le pare-feu de votre serveur.
|
||||
- Nous souhaitons ici au contraire, depuis n'importe où, pouvoir accéder de manière sécurisée aux services non exposés sur internet du serveur, comme la console SSH qui permet de se connecter à la machine par exemple.
|
||||
- Nous souhaitons aussi accéder aux services d'autres serveurs, et par exemple relier de manière sécurisée deux instances de Dockge pour tout contrôler depuis la même interface.
|
||||
|
||||
Pour cela nous allons créer un **réseau privé virtuel**, ou VPN, c'est à dire un tunnel sécurisé auquel personne n'a accès à part les machines que vous relierez entre elles. Elles feront partie d'un nouveau réseau et pourront dialoguer entre elle comme dans un réseau local.
|
||||
Pour cela nous allons créer un **réseau privé virtuel**, ou VPN, c'est-à-dire un tunnel sécurisé auquel personne n'a accès à part les machines que vous relierez entre elles. Elles feront partie d'un nouveau réseau et pourront dialoguer entre elles comme dans un réseau local.
|
||||
|
||||
D'autre part, vous pourrez ajouter votre téléphone, un ordinateur portable ou n'importe quel appareil au réseau pour pouvoir utiliser vos ressources depuis vos appareils quotidiens, où que vous soyiez.
|
||||
D'autre part, vous pourrez ajouter votre téléphone, un ordinateur portable ou n'importe quel appareil au réseau pour pouvoir utiliser vos ressources depuis vos appareils quotidiens, où que vous soyez.
|
||||
|
||||

|
||||

|
||||
|
||||
Dans cette illustration, la machine 1 est sur deux réseaux :
|
||||
|
||||
- son réseau local (tous les appareils liés à la box, avec une adresse IP du type `192.168.x.x ` donc ici la machine 1 et la machine 2)
|
||||
- le réseau du VPN (tous les appareils reliés au VPN, avec une seconde adresse IP du type `10.8.x.x` donc ici la machine 1 et 4)
|
||||
|
||||
On peut aussi faire en sorte que les machines reliées au réseau virtuel partagent les acces à leur réseau local. Ici nous ne le ferons pas, pour des raisons de sécurité, et de complexité en terme de sous-réseau (si les deux machines distantes ont des machines locales qui utilisent la meme adresse IP locale, par exemple `192.168.1.1`, cela posera des conflits).
|
||||
On peut aussi faire en sorte que les machines reliées au réseau virtuel partagent les accès à leur réseau local. Ici nous ne le ferons pas, pour des raisons de sécurité, et de complexité en termes de sous-réseau (si les deux machines distantes ont des machines locales qui utilisent la même adresse IP locale, par exemple `192.168.1.1`, cela posera des conflits).
|
||||
|
||||
Ainsi, sur le réseau virtuel, seules les machines directement reliées pourront dialoguer entre elle depuis ce réseau. Elles ne pourront pas dialoguer avec une machine situées sur un autre réseau local et non reliée au VPN.
|
||||
Ainsi, sur le réseau virtuel, seules les machines directement reliées pourront dialoguer entre elles depuis ce réseau. Elles ne pourront pas dialoguer avec une machine située sur un autre réseau local et non reliée au VPN.
|
||||
|
||||
## Côté serveur
|
||||
::note{icon=""}
|
||||
@@ -60,8 +60,7 @@ tree:
|
||||
- srv:
|
||||
- docker:
|
||||
- wg-easy:
|
||||
- config:
|
||||
- etc_wireguard/
|
||||
- etc_wireguard/
|
||||
- compose.yaml
|
||||
- .env
|
||||
---
|
||||
@@ -70,7 +69,7 @@ tree:
|
||||
::steps{level="3"}
|
||||
### Déployer la stack
|
||||
|
||||
Ouvrez Dockge, cliquez sur **Compose**, et nommez la stack `wg_easy`.
|
||||
Ouvrez Dockge, cliquez sur **Compose**, et nommez la stack `wg-easy`.
|
||||
|
||||
Copiez la configuration suivante :
|
||||
|
||||
@@ -79,7 +78,7 @@ Copiez la configuration suivante :
|
||||
services:
|
||||
wg-easy:
|
||||
environment:
|
||||
- INSECURE=true
|
||||
- INSECURE=true # désactive le HTTPS propre à l'interface web ; sans risque en LAN seul ou derrière SWAG, à retirer sinon
|
||||
image: ghcr.io/wg-easy/wg-easy:15
|
||||
container_name: wg-easy
|
||||
networks:
|
||||
@@ -148,8 +147,8 @@ Une fois connecté, suivez les instructions de l'interface web pour :
|
||||
|
||||
Allez ensuite dans *Administrator → Admin Panel → Config* :
|
||||
|
||||
- Remplacez `Allowed IPs` `0.0.0.0/24` par `10.8.0.0/24` pour du **split tunneling**.
|
||||
- Supprimez l'IPv6 (il cause souvent des problèmes inutiles).
|
||||
- Remplacez `Allowed IPs`, `0.0.0.0/0` par défaut (tunnel complet), par `10.8.0.0/24` pour du **split tunneling**.
|
||||
- Retirez éventuellement l'entrée IPv6 de `Allowed IPs` si vous ne voulez pas router le trafic IPv6 des clients dans le tunnel. Cela ne change rien à la configuration IPv6 du conteneur ci-dessus, juste à ce que les clients y font transiter.
|
||||
|
||||
### Terminé !
|
||||
::
|
||||
@@ -277,4 +276,4 @@ Répétez cette installation pour chaque client.
|
||||
|
||||
Et voici le schéma final de l'installation :
|
||||
|
||||

|
||||

|
||||
|
||||
@@ -6,18 +6,18 @@ description: Configurer SWAG comme reverse proxy avec SSL automatique, exposer v
|
||||
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||
[Swag](https://docs.linuxserver.io/general/swag/) est le noyau de ce homelab. C'est un reverse proxy puissant qui permet d'exposer des services sur internet via des noms de domaine, en se chargeant de l'émission des certificats SSL (pour garder des connexions chiffrées), du routage des requêtes et de la sécurisation des accès (par authentification HTTP ou par SSO comme Authelia ou Authentik). Toute la documentation nécessaire est [disponible ici](https://docs.linuxserver.io/general/swag).
|
||||
[SWAG](https://docs.linuxserver.io/general/swag/) est le noyau de ce homelab. C'est un reverse proxy puissant qui permet d'exposer des services sur internet via des noms de domaine, en se chargeant de l'émission des certificats SSL (pour garder des connexions chiffrées), du routage des requêtes et de la sécurisation des accès (par authentification HTTP ou par SSO comme Authelia ou Authentik). Toute la documentation nécessaire est [disponible ici](https://docs.linuxserver.io/general/swag).
|
||||
|
||||
::warning{to="/serveex/core/wireguard"}
|
||||
|
||||
SWAG n'a d'utilité que pour exposer vos services sur internet, c'est-à-dire y accéder via une URL publique du type `https://service.mondomaine.fr`. Si vous ne souhaitez pas exposer vos services et préférez systématiquement passer par un VPN pour vous connecter à distance, allez plutôt **par ici**.
|
||||
::
|
||||
|
||||
Ci-dessous, un exemple exposant Dockge. Nous installerons SWAG ainsi que le mod dbip servant à bloquer les connexions selon la géolocalisation, et le mod dashboard qui permet de piloter swag, fail2ban et la géolocalisation.
|
||||
Ci-dessous, un exemple exposant Dockge. Nous installerons SWAG ainsi que le mod dbip servant à bloquer les connexions selon la géolocalisation, le mod dashboard qui permet de piloter swag, fail2ban et la géolocalisation, et le mod auto-reload qui recharge automatiquement nginx dès qu'un fichier de configuration change, sans avoir à redémarrer le conteneur.
|
||||
|
||||
**Principe d'un reverse proxy et application dans notre cas :**
|
||||
|
||||

|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
@@ -42,7 +42,7 @@ tree:
|
||||
- nginx.conf
|
||||
- proxy-confs:
|
||||
- dockge.subdomain.conf
|
||||
- compose.yml
|
||||
- compose.yaml
|
||||
- .env
|
||||
---
|
||||
::
|
||||
@@ -155,13 +155,13 @@ Donnez-lui les permissions suivantes :
|
||||
* `POST /domain/zone/*`
|
||||
* `DELETE /domain/zone/*`
|
||||
|
||||
Notez temporairement les 3 clés et saisissez-les dans `ovh.ini`. (Dans nano, tapez directement, puis :kbd{value="Ctrl+O"}, :kbd{value="Enter"}, :kbd{value="Ctrl+X"} pour enregistrer et quitter)
|
||||
Notez temporairement les 3 clés et saisissez-les dans `ovh.ini`.
|
||||
|
||||
Enregistrez avec :kbd{value="Ctrl+O"}, puis :kbd{value="Enter"}, et quittez avec :kbd{value="Ctrl+X"}.
|
||||
|
||||
### Activer DBIP dans nginx.conf
|
||||
|
||||
Configurons maintenant swag pour accéder à DBIP, le module de contrôle d'accès par géolocalisation. Ouvrez le fichier `nginx.conf` :
|
||||
Configurons maintenant SWAG pour accéder à DBIP, le module de contrôle d'accès par géolocalisation. Ouvrez le fichier `nginx.conf` :
|
||||
|
||||
```bash [Terminal]
|
||||
sudo nano /srv/docker/swag/config/nginx/nginx.conf
|
||||
@@ -182,7 +182,7 @@ Redémarrez la stack dans Dockge. Cette fois, le certificat SSL devrait être g
|
||||
Accédez au tableau de bord en local sur `http://ipdevotreserveur:81`
|
||||
Sur la gauche, vous verrez la liste des services actuellement « proxifiés » (aucun pour l'instant). Sur la droite, la liste des IP bannies. En dessous, différents indicateurs. Pour plus de détails, [cliquez ici](https://www.linuxserver.io/blog/introducing-swag-dashboard).
|
||||
|
||||

|
||||

|
||||
|
||||
## DBIP
|
||||
DBIP permet de bloquer les connexions selon les pays. Il s'appuie sur le fichier de configuration nommé `dbip.conf` situé dans `/srv/docker/swag/config/nginx`. [Plus d'infos ici](https://virtualize.link/secure/).
|
||||
@@ -290,7 +290,7 @@ Il est temps d'exposer Dockge sur internet pour accéder à vos conteneurs et le
|
||||
|
||||
::warning
|
||||
|
||||
Dockge ne gère pas l'authentification multifacteur. L'exposer en ligne pourrait compromettre toutes les machines reliées. Ne le faites que si vous utilisez une solution MFA comme [TinyAuth](/serveex/security/tinyauth) ou [Authentik](/serveex/advanced/authentik/). Sinon, ne l'exposez pas avec SWAG. Utilisez plutôt un VPN comme [Wireguard](/serveex/core/wireguard).
|
||||
Dockge ne gère pas l'authentification multifacteur. L'exposer en ligne pourrait compromettre toutes les machines reliées. Ne le faites que si vous utilisez une solution MFA comme [TinyAuth](/serveex/security/tinyauth) ou [Authentik](/serveex/advanced/authentik/). Sinon, ne l'exposez pas avec SWAG. Utilisez plutôt un VPN comme [WireGuard](/serveex/core/wireguard).
|
||||
::
|
||||
|
||||
::steps{level="3"}
|
||||
@@ -348,7 +348,7 @@ Enregistrez et quittez. La configuration se met à jour en quelques secondes.
|
||||
|
||||
::note
|
||||
|
||||
Par défaut, SWAG ne connaît pas le nom « dockge ». Vous devrez ajouter le réseau de Dockge au `compose.yml` de SWAG.
|
||||
Par défaut, SWAG ne connaît pas le nom « dockge ». Vous devrez ajouter le réseau de Dockge au `compose.yaml` de SWAG.
|
||||
::
|
||||
|
||||
### Ajouter le réseau de Dockge à SWAG
|
||||
@@ -390,7 +390,7 @@ Patientez un instant, puis visitez `https://dockge.mondomaine.fr` dans votre nav
|
||||
SWAG inclut des modèles pour la plupart des services connus, nommés `nomduservice.subdomain.conf.sample`. Il suffit de créer le sous-domaine dans la zone DNS de votre registrar (comme OVH), de le faire pointer vers votre domaine principal via un CNAME, puis de copier et renommer le fichier d'exemple :
|
||||
|
||||
```bash [Terminal]
|
||||
cd /srv/docker/swag/config/proxy-confs
|
||||
cd /srv/docker/swag/config/nginx/proxy-confs
|
||||
sudo cp nomduservice.subdomain.conf.sample nomduservice.subdomain.conf
|
||||
```
|
||||
|
||||
@@ -398,7 +398,7 @@ sudo cp nomduservice.subdomain.conf.sample nomduservice.subdomain.conf
|
||||
|
||||
__Si le sous-domaine n'est pas redirigé correctement__
|
||||
- Ouvrez le fichier et vérifiez le nom du conteneur dans `set $upstream_app nomduconteneur;`{lang=nginx}
|
||||
- Assurez-vous d'avoir ajouté le réseau du conteneur dans le `compose.yml` de SWAG
|
||||
- Assurez-vous d'avoir ajouté le réseau du conteneur dans le `compose.yaml` de SWAG
|
||||
::
|
||||
|
||||
Vous pouvez aussi personnaliser le sous-domaine en modifiant `server_name votresousdomaine.*;`{lang=nginx} et en renommant le fichier en `votresousdomaine.subdomain.conf`.
|
||||
|
||||
@@ -8,16 +8,16 @@ description: Utiliser les tunnels Cloudflare et Zero Trust pour exposer des serv
|
||||

|
||||
|
||||
## Introduction
|
||||
L'architecture _Zero Trust_ est la pratique consistant à concevoir des systèmes fondés sur le principe de __« ne jamais faire confiance__, __toujours vérifier »__, par opposition au principe traditionnel de __« confiance, mais vérifier »__. Ce concept est devenu très populaires récemment, à la suite des attaques toujours plus nombreuses concernant les données des utilisateurs. C'est un concept très large, nous nous concentrerons sur l’application du _Zero Trust_ aux services Web que nous hébergeons.
|
||||
L'architecture _Zero Trust_ est la pratique consistant à concevoir des systèmes fondés sur le principe de __« ne jamais faire confiance__, __toujours vérifier »__, par opposition au principe traditionnel de __« confiance, mais vérifier »__. Ce concept est devenu très populaire récemment, à la suite des attaques toujours plus nombreuses concernant les données des utilisateurs. C'est un concept très large, nous nous concentrerons sur l’application du _Zero Trust_ aux services Web que nous hébergeons.
|
||||
|
||||
Les _tunnels Cloudflare_ offrent un moyen simple d'arriver au _Zero Trust_, en s'appuyant sur [SWAG](/serveex/core/swag) et [Authentik](/serveex/advanced/authentik).
|
||||
|
||||
Pour le dire simplement, les Tunnels Cloudflare permettent notamment de :
|
||||
|
||||
- Masquer l'IP de votre serveur (et donc de votre box s'il est hébergé chez vous).
|
||||
- D'authentifier le traffic.
|
||||
- De bénéficier des protection de Cloudflare (attaques DDOS, etc, blacklist, requêtes malveillantes, etc...).
|
||||
- De bénéficier du CDN, c'est à dire du serveur de cache de Cloudlfare, qui permet d'augmenter les performances de vos sites web.
|
||||
- D'authentifier le trafic.
|
||||
- De bénéficier des protections de Cloudflare (attaques DDOS, etc, blacklist, requêtes malveillantes, etc.).
|
||||
- De bénéficier du CDN, c'est-à-dire du serveur de cache de Cloudflare, qui permet d'augmenter les performances de vos sites web.
|
||||
- De ne plus avoir besoin de l'ouverture de ports de votre routeur pour les services exposés par SWAG.
|
||||
|
||||
Ici, nous expliquerons comment associer SWAG aux tunnels Cloudflare.
|
||||
@@ -34,33 +34,33 @@ __Attention :__
|
||||
|
||||
Avant toute chose, vous devez définir Cloudflare comme gestionnaire de votre [zone DNS](/general/networking/dns). Si vous avez réservé votre nom de domaine chez Cloudflare, c'est déjà le cas. Sinon, renseignez vous auprès de votre registrar sur comment ajouter des DNS externes. Cloudflare dispose d'[une documentation expliquant pas à pas comment paramétrer une Zone DNS](https://developers.cloudflare.com/dns/zone-setups/full-setup/setup/), que vous ayez un domaine externe ou reservé chez Cloudflare.
|
||||
|
||||
Si vous avez qu'un seul serveur à protéger derrière Cloudflare, vous pouvez supprimer l'ensemble des enregistrement DNS existant, par défaut le domaine et tout ses sous-domaines seront directement redirigés vers le tunnel.
|
||||
Si vous n'avez qu'un seul serveur à protéger derrière Cloudflare, vous pouvez supprimer l'ensemble des enregistrements DNS existants, par défaut le domaine et tous ses sous-domaines seront directement redirigés vers le tunnel.
|
||||
|
||||
Si vous avez des sous-domaines à rediriger vers d'autres serveurs, vous pourrez toujours les déclarer dans la zone DNS à l'aide d'un enregistrement A.
|
||||
|
||||
Si vous avez plusieurs serveurs et donc plusieurs tunnels pour un meme domaine principal, [voyez ici](#gérer-plusieurs-tunnels-pour-plusieurs-serveurs).
|
||||
Si vous avez plusieurs serveurs et donc plusieurs tunnels pour un même domaine principal, [voyez ici](#gérer-plusieurs-tunnels-pour-plusieurs-serveurs).
|
||||
|
||||
### Clé API
|
||||
|
||||
Pour commencer, nous devons créer un nouveau jeton API pour Cloudflare et récupérer nos identifiants de zone et de compte.
|
||||
Pour commencer, vous devez créer un nouveau jeton API pour Cloudflare et récupérer vos identifiants de zone et de compte.
|
||||
|
||||
Sur le tableau de bord de Cloudflare, dans la page de présentation de votre domaine, vous pouvez voir les identifiants de `zone` et de `compte` en bas à droite de l'écran. Copiez précieusement ces deux identifiants.
|
||||
|
||||

|
||||
|
||||
Juste en dessous d'eux, il y a un lien intitulé _Obtenez votre jeton API_. Cliquez dessus. Le périmètre dont nous avons besoin pour le jeton doit inclure `Zone:DNS:Edit` et `Account:Cloudflare Tunnel:Edit`. Assurez-vous que votre page de création de token ressemble à celle illustrée dans la capture d'écran ci-dessous.
|
||||
Juste en dessous d'eux, il y a un lien intitulé _Obtenez votre jeton API_. Cliquez dessus. Le périmètre dont vous avez besoin pour le jeton doit inclure `Zone:DNS:Edit` et `Account:Cloudflare Tunnel:Edit`. Assurez-vous que votre page de création de token ressemble à celle illustrée dans la capture d'écran ci-dessous.
|
||||
|
||||

|
||||
|
||||
Une fois que nous aurons enregistré, notre jeton sera affiché une fois. copiez le précieusement, car vous ne pourrez plus le revoir après la fermeture.
|
||||
Une fois que vous aurez enregistré, votre jeton sera affiché une fois. Copiez-le précieusement, car vous ne pourrez plus le revoir après la fermeture.
|
||||
|
||||
### Cloudflare Zero Trust
|
||||
|
||||
Vous devez vous inscrire à _Cloudflare Teams_ pour pouvoir accéder au tableau de bord _Zero Trust_ qui gère les tunnels et les politiques d'accès. Il s'agit d'un service premium, mais ils proposent un forfait gratuit pour un maximum de 50 utilisateurs, ce qui devrait suffire pour votre Home Lab. Gardez à l’esprit que puisqu’il s’agit d’une fonctionnalité premium, ils demandent une carte de crédit valide lors de l’inscription, mais avec le forfait gratuit, il n'y aura aucun frais.
|
||||
|
||||
Inscrivez-vous [via ce lien](https://dash.teams.cloudflare.com/).
|
||||
Inscrivez-vous [via ce lien](https://one.dash.cloudflare.com/).
|
||||
|
||||
## Configuration de Swag
|
||||
## Configuration de SWAG
|
||||
::note
|
||||
|
||||
Nous partons du principe que vous avez le domaine `mondomaine.fr` avec les DNS qui pointent bien vers ceux de Cloudflare, comme vu précédemment.
|
||||
@@ -69,7 +69,7 @@ Nous partons du principe que vous avez le domaine `mondomaine.fr` avec les DNS q
|
||||
SWAG dispose de deux `Docker Mods` permettant d'y intégrer :
|
||||
|
||||
- __Cloudflared__, le conteneur qui permet de créer et de gérer les tunnels
|
||||
- __Cloudflared Real IP__, un conteneur qui permet à SWAG d'obtenir la vraie source IP des requêtes depuis internet plutot que celle de Docker (ce qui pourrait entrer en conflit avec le mod de géolocalisatioN DBIP).
|
||||
- __Cloudflared Real IP__, un conteneur qui permet à SWAG d'obtenir la vraie source IP des requêtes depuis internet plutôt que celle de Docker (ce qui pourrait entrer en conflit avec le mod de géolocalisation DBIP).
|
||||
|
||||
Ces deux mods, fusionnés dans le conteneur de SWAG, nécessitent un peu de configuration.
|
||||
|
||||
@@ -124,6 +124,17 @@ Enregistrez avec :kbd{value="Ctrl+O"} puis :kbd{value="Entrée"}, puis quittez a
|
||||
|
||||
### Déployer la stack SWAG
|
||||
|
||||
::warning
|
||||
|
||||
Ceci remplace toute la définition du service SWAG. Si vous avez déjà ajouté une section `networks:` ou des `EXTRA_DOMAINS` pour d'autres apps (Dockge, TinyAuth, etc.), fusionnez-les avec le bloc ci-dessous au lieu de l'écraser, sinon vous perdrez cette configuration.
|
||||
::
|
||||
|
||||
Assurez-vous que le fichier de base fail2ban existe déjà, sinon Docker créera un dossier à sa place au lieu de monter le fichier, ce qui casse silencieusement la persistance des bannissements :
|
||||
|
||||
```bash [Terminal]
|
||||
sudo touch /srv/docker/swag/config/fail2ban/fail2ban.sqlite3
|
||||
```
|
||||
|
||||
Ouvrez Dockge, éditez la stack SWAG avec cette configuration
|
||||
|
||||
```yaml [compose.yaml]
|
||||
@@ -190,7 +201,7 @@ TUNNEL_PW=
|
||||
| Variable | Valeur | Exemples |
|
||||
|-----------------------------------|-----------------------------------------------------------------------------------------------------------|--------------------------------|
|
||||
| `PUID`{lang=properties} | A renseigner avec les infos de votre user (trouvables via la commande `id nomdutilisateur`{lang=shell}) | `1000` |
|
||||
| `GUID`{lang=properties} | A renseigner avec les infos de votre user (trouvables via la commande `id nomdutilisateur`{lang=shell}) | `1000 ` |
|
||||
| `PGID`{lang=properties} | A renseigner avec les infos de votre user (trouvables via la commande `id nomdutilisateur`{lang=shell}) | `1000 ` |
|
||||
| `DOMAIN`{lang=properties} | Le domaine que vous avez réservé | `mondomaine.fr` |
|
||||
| `PLUGIN`{lang=properties} | Le fournisseur de zone DNS, ici Cloudflare. Pensez à renseigner `cloudflare.ini` (voir [guide de swag](https://docs.linuxserver.io/general/swag/#create-container-via-dns-validation-with-a-wildcard-cert)) | `cloudflare` |
|
||||
| `EMAIL`{lang=properties} | Votre email pour le certificat | `[email protected]` |
|
||||
@@ -200,9 +211,9 @@ TUNNEL_PW=
|
||||
| `TUNNEL_NAME`{lang=properties} | Le nom de votre tunnel | `mon_tunnel` |
|
||||
| `TUNNEL_PW`{lang=properties} | Un mot de passe fort généré aléatoirement | `iSzKRmP4VbnlsMvdSdgBEJiJi` |
|
||||
|
||||
Une fois fait, déployez la stack. Cela prendra un peu de temps, vérifiez les logs, vous devriez arriver à `serveur ready`
|
||||
Une fois fait, déployez la stack. Cela prendra un peu de temps, vérifiez les logs, vous devriez arriver à `server ready`.
|
||||
|
||||
Une fois le conteneur en ligne, vérifiez dans cloudflare que votre tunnel est bien présent dans la section _Networks > Tunnels_ de [Cloudflare Zero Trust](https://one.dash.cloudflare.com/). Par défaut, l'ensemble des sous domaine sont redirigés vers le tunnel, sans avoir besoin de les déclarer [dans votre zone DNS](/general/networking/dns).
|
||||
Une fois le conteneur en ligne, vérifiez dans cloudflare que votre tunnel est bien présent dans la section _Networks > Tunnels_ de [Cloudflare Zero Trust](https://one.dash.cloudflare.com/). Par défaut, l'ensemble des sous-domaines sont redirigés vers le tunnel, sans avoir besoin de les déclarer [dans votre zone DNS](/general/networking/dns).
|
||||
|
||||
::tip{icon="" to="/general/networking/dns"}
|
||||
✨ __Astuce :__ si vous voulez exposer un service sans tunnel, déclarez simplement un enregistrement A **dans votre zone DNS**. En cas de problème de résolution, désactivez la fonction _proxy_ pour cet enregistrement, par exemple pour `sous.mondomaine.fr`.
|
||||
@@ -238,7 +249,7 @@ Dans le [tableau de bord DNS de Cloudflare](https://dash.cloudflare.com/), cliqu
|
||||
### Terminé !
|
||||
::
|
||||
|
||||
Si vous avez de nombreux sous-domaines, vous pouvez déclarer un seul sous domaine par tunnel comme ci-dessus, puis déclarer vos autres sous domaine en les faisant pointer vers ces sous domaines de référence.
|
||||
Si vous avez de nombreux sous-domaines, vous pouvez déclarer un seul sous-domaine par tunnel comme ci-dessus, puis déclarer vos autres sous-domaines en les faisant pointer vers ces sous-domaines de référence.
|
||||
|
||||
Ainsi, en cas de changement d'ID de tunnel, vous n'aurez qu'un seul enregistrement DNS à modifier.
|
||||
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
---
|
||||
title: TinyAuth
|
||||
description: Installer TinyAuth, un proxy de forward-auth léger, et l'associer à Pocket ID pour ajouter une connexion SSO devant vos applications auto-hébergées. Protéger votre application derrière Swag avec le forward-auth.
|
||||
description: Installer TinyAuth, un proxy de forward-auth léger, et l'associer à Pocket ID pour ajouter une connexion SSO devant vos applications auto-hébergées. Protéger votre application derrière SWAG avec le forward-auth.
|
||||
---
|
||||
|
||||
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||
[TinyAuth](https://tinyauth.app) est une application qui permet de forcer une authentification avant d'accéder à un servoce : une page de connexion que Swag peut insérer devant n'importe quelle application avant de laisser passer une requête, en vérifiant si le visiteur est authentifié avant de le rediriger.
|
||||
[TinyAuth](https://tinyauth.app) est une application qui permet de forcer une authentification avant d'accéder à un service : une page de connexion que SWAG peut insérer devant n'importe quelle application avant de laisser passer une requête, en vérifiant si le visiteur est authentifié avant de le rediriger.
|
||||
|
||||

|
||||
|
||||
Nativement il gère une simple connexion locale identifiant/mot de passe, c'est ce que nous mettrons en place ici. Il peut aussi déléguer la connexion à un fournisseur OIDC externe comme [Pocket ID](/serveex/security/pocket-id), de sorte que quiconque visite une application protégée s'authentifie avec une passkey via Pocket ID puis est redirigé : installez Pocket ID ensuite et suivez [son tutoriel](/serveex/security/pocket-id#connecting-pocket-id-to-tinyauth) pour relier les deux.
|
||||
Nativement il gère une simple connexion locale identifiant/mot de passe, c'est ce que nous mettrons en place ici. Il peut aussi déléguer la connexion à un fournisseur OIDC externe comme [Pocket ID](/serveex/security/pocket-id), de sorte que quiconque visite une application protégée s'authentifie avec une passkey via Pocket ID puis est redirigé : installez Pocket ID ensuite et suivez [son tutoriel](/serveex/security/pocket-id#connecter-pocket-id-à-tinyauth) pour relier les deux.
|
||||
|
||||
- [Documentation de TinyAuth](https://tinyauth.app/docs)
|
||||
- [Documentation de TinyAuth](https://tinyauth.app/docs/getting-started)
|
||||
- [TinyAuth sur GitHub](https://github.com/tinyauthapp/tinyauth)
|
||||
|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
::file-tree
|
||||
@@ -64,7 +66,7 @@ services:
|
||||
volumes:
|
||||
- /srv/docker/tinyauth/data:/data
|
||||
ports:
|
||||
- 3000:3000
|
||||
- 3002:3000 # port hôte uniquement, évite le conflit avec le 3000 d'AdGuard
|
||||
```
|
||||
|
||||
::tip{icon=""}
|
||||
@@ -94,7 +96,7 @@ TINYAUTH_AUTH_USERS=
|
||||
| `TINYAUTH_APPURL`{lang=properties} | L'URL publique par laquelle vous joindrez TinyAuth (voir l'exposition plus bas) | `https://tinyauth.mondomaine.fr` |
|
||||
| `TINYAUTH_AUTH_USERS`{lang=properties} | Le hash généré ci-dessus | `user:$$2a$$10$$UdLYoJ5lgPsC0RKq...` |
|
||||
|
||||
Déployez la stack. L'interface locale est disponible sur `http://ipdevotreserveur:3000`.
|
||||
Déployez la stack. L'interface locale est disponible sur `http://ipdevotreserveur:3002`.
|
||||
|
||||
### Terminé !
|
||||
::
|
||||
@@ -135,7 +137,7 @@ Elle redemande l'identifiant, le mot de passe et le code à 6 chiffres du moment
|
||||
|
||||
À partir de maintenant, cet utilisateur a besoin à la fois de son mot de passe et d'un code valide de son application d'authentification pour se connecter.
|
||||
|
||||
## Exposer TinyAuth avec Swag
|
||||
## Exposer TinyAuth avec SWAG
|
||||
TinyAuth a besoin de son propre sous-domaine : c'est la page sur laquelle les utilisateurs arrivent avant d'être redirigés vers l'application qu'ils veulent réellement.
|
||||
|
||||
::note
|
||||
@@ -152,9 +154,9 @@ Allez dans Dockge et modifiez le fichier compose de SWAG en y ajoutant le résea
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Rattache le conteneur au réseau personnalisé
|
||||
networks: # Rattache le conteneur au réseau personnalisé
|
||||
# ...
|
||||
- tinyauth # Nom du réseau déclaré
|
||||
|
||||
@@ -174,7 +176,7 @@ Nous partons ici du principe que le nom du réseau de TinyAuth est `tinyauth_def
|
||||
|
||||
### Créer le fichier subdomain.conf
|
||||
|
||||
Dans les dossiers de Swag, créez le fichier `tinyauth.subdomain.conf` :
|
||||
Dans les dossiers de SWAG, créez le fichier `tinyauth.subdomain.conf` :
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
✨ __Astuce :__ utilisez **File Browser Quantum** pour naviguer et modifier les fichiers plutôt que des commandes dans le terminal.
|
||||
@@ -225,7 +227,7 @@ __Si ça ne marche pas :__ vérifiez les règles de votre pare-feu.
|
||||
::
|
||||
|
||||
## Protéger une application via le reverse proxy
|
||||
Swag ne fournit pas de fichier d'inclusion tout prêt pour TinyAuth, nous ajouterons donc la vérification forward-auth directement dans le `*.subdomain.conf` de l'application. Nous prendrons Dockge en exemple.
|
||||
SWAG ne fournit pas de fichier d'inclusion tout prêt pour TinyAuth, nous ajouterons donc la vérification forward-auth directement dans le `*.subdomain.conf` de l'application. Nous prendrons Dockge en exemple.
|
||||
|
||||
::steps{level="3"}
|
||||
### Ouvrir le fichier subdomain.conf de l'application
|
||||
@@ -277,7 +279,7 @@ server {
|
||||
}
|
||||
```
|
||||
|
||||
::note{to="/serveex/security/tinyauth#exposing-tinyauth-with-swag"}
|
||||
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
|
||||
|
||||
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
|
||||
::
|
||||
@@ -299,9 +301,9 @@ Il arrive qu'on veuille verrouiller l'essentiel d'une application derrière Tiny
|
||||
|
||||
Un bloc `location` en expression régulière est toujours prioritaire sur le bloc `location /` simple, quel que soit celui qui apparaît en premier dans le fichier. Tout chemin correspondant à une location en regex que vous définissez exécute donc son propre `proxy_pass`, sans jamais atteindre la ligne `auth_request /tinyauth;` du `location /`.
|
||||
|
||||
Par exemple, pour laisser ouverte la page de statut publique d'Uptime-Kuma et ses ressources tout en protégeant le reste :
|
||||
Par exemple, voici comment laisser ouverte la page de statut publique d'Uptime-Kuma et ses ressources tout en protégeant le reste. Seul `api/status-page` est laissé public, pas tout `/api`, car le reste de l'API d'Uptime-Kuma doit rester derrière l'authentification ; `/metrics` (l'endpoint Prometheus d'Uptime-Kuma) est volontairement absent de la regex pour la même raison :
|
||||
|
||||
```nginx [dockge.subdomain.conf]{9-16}
|
||||
```nginx [uptime-kuma.subdomain.conf]{9-16}
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
@@ -310,7 +312,7 @@ server {
|
||||
|
||||
include /config/nginx/ssl.conf;
|
||||
|
||||
location ~ ^/(status|assets|icon\.svg|api|upload|metrics) {
|
||||
location ~ ^/(status|assets|icon\.svg|api/status-page|upload) {
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
set $upstream_app uptime-kuma;
|
||||
|
||||
@@ -15,6 +15,8 @@ C'est donc un bon choix si vous voulez simplement un backend SSO simple et rapid
|
||||
- [Documentation de Pocket ID](https://pocket-id.org/docs)
|
||||
- [Pocket ID sur GitHub](https://github.com/pocket-id/pocket-id)
|
||||
|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
::file-tree
|
||||
@@ -63,7 +65,7 @@ services:
|
||||
ports:
|
||||
- 1411:1411
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:1411/healthz"]
|
||||
test: ["CMD", "/app/pocket-id", "healthcheck"]
|
||||
interval: 90s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
@@ -96,7 +98,7 @@ TRUST_PROXY=true
|
||||
|----------|-------|---------|
|
||||
| `APP_URL`{lang=properties} | L'URL publique par laquelle vous joindrez Pocket ID (voir l'exposition plus bas) | `https://id.mondomaine.fr` |
|
||||
| `ENCRYPTION_KEY`{lang=properties} | La clé générée ci-dessus | `Q2pVEqsTNRkJSO9SkJzU3KZ2...` |
|
||||
| `TRUST_PROXY`{lang=properties} | Nécessaire puisque Pocket ID se trouve derrière Swag | `true` |
|
||||
| `TRUST_PROXY`{lang=properties} | Nécessaire puisque Pocket ID se trouve derrière SWAG | `true` |
|
||||
|
||||
Déployez la stack. L'interface locale est disponible sur `http://ipdevotreserveur:1411`.
|
||||
|
||||
@@ -111,10 +113,10 @@ Pocket ID n'utilise pas de mots de passe : votre premier compte est créé avec
|
||||
|
||||
::note
|
||||
|
||||
Comme `APP_URL` pointe déjà vers votre futur domaine public, l'enregistrement de la passkey peut vous demander d'ouvrir Pocket ID depuis ce domaine. Exposez-le d'abord (voir plus bas) si la configuration ne se termine pas en local.
|
||||
Les passkeys exigent un contexte sécurisé : HTTPS, ou `localhost`. Enregistrer une passkey depuis `http://ipdevotreserveur:1411` sur une autre machine sera refusé par le navigateur, puisque c'est du HTTP simple vers une adresse qui n'est pas `localhost`. Si la configuration ne se termine pas en local, exposez d'abord Pocket ID (voir plus bas) et terminez la configuration en HTTPS.
|
||||
::
|
||||
|
||||
## Exposer Pocket ID avec Swag
|
||||
## Exposer Pocket ID avec SWAG
|
||||
Les autres applications doivent joindre Pocket ID en HTTPS pour finaliser le processus de connexion OIDC, il doit donc être exposé même si vous ne l'utilisez que depuis chez vous.
|
||||
|
||||
::note
|
||||
@@ -131,9 +133,9 @@ Allez dans Dockge et modifiez le fichier compose de SWAG en y ajoutant le résea
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Rattache le conteneur au réseau personnalisé
|
||||
networks: # Rattache le conteneur au réseau personnalisé
|
||||
# ...
|
||||
- pocket-id # Nom du réseau déclaré
|
||||
|
||||
@@ -153,7 +155,7 @@ Nous partons ici du principe que le nom du réseau de Pocket ID est `pocket-id_d
|
||||
|
||||
### Créer le fichier subdomain.conf
|
||||
|
||||
Dans les dossiers de Swag, créez le fichier `id.subdomain.conf` :
|
||||
Dans les dossiers de SWAG, créez le fichier `id.subdomain.conf` :
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
✨ __Astuce :__ utilisez **File Browser Quantum** pour naviguer et modifier les fichiers plutôt que des commandes dans le terminal.
|
||||
@@ -230,6 +232,8 @@ Enregistrez, puis copiez le __Client ID__ et le __Client Secret__ générés. Vo
|
||||
## Connecter Pocket ID à TinyAuth
|
||||
[TinyAuth](/serveex/security/tinyauth) peut déléguer sa connexion à Pocket ID plutôt que (ou en plus de) son identifiant/mot de passe local, de sorte que quiconque visite une application protégée s'authentifie avec une passkey et se retrouve redirigé.
|
||||
|
||||

|
||||
|
||||
::steps{level="3"}
|
||||
### Enregistrer TinyAuth comme client OIDC
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@ description: Installer Uptime-Kuma pour surveiller la disponibilité de vos serv
|
||||
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||

|
||||
[Uptime-Kuma](https://github.com/louislam/uptime-kuma) est un outil de surveillance auto-hébergé qui vérifie régulièrement si vos autres services et sites sont en ligne et joignables, et vous alerte dès que l'un d'eux tombe. Il permet aussi de construire une page de statut publique pour partager l'état de vos services avec d'autres personnes.
|
||||
|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
@@ -65,7 +67,7 @@ __Si ça ne marche pas :__ vérifiez les règles de votre pare-feu.
|
||||
### Terminé !
|
||||
::
|
||||
|
||||
## Exposer avec Swag
|
||||
## Exposer avec SWAG
|
||||
::note{icon=""}
|
||||
📋 __Au préalable :__
|
||||
<br/><br/>
|
||||
@@ -74,13 +76,13 @@ Nous partons du principe que vous avez le sous-domaine `stats.mondomaine.fr` ave
|
||||
|
||||
::warning
|
||||
|
||||
Uptime-Kuma n'utilise pas d'authentification multifacteur. L'exposer sur internet pourrait compromettre les machines qu'il surveille. Ne le faites que si vous utilisez un système MFA comme [TinyAuth](/serveex/security/tinyauth) ou [Authentik](/serveex/advanced/authentik/). Sinon, ne l'exposez pas avec SWAG, utilisez plutôt un VPN comme [Wireguard](/serveex/core/wireguard).
|
||||
Uptime-Kuma n'utilise pas d'authentification multifacteur. L'exposer sur internet pourrait compromettre les machines qu'il surveille. Ne le faites que si vous utilisez un système MFA comme [TinyAuth](/serveex/security/tinyauth) ou [Authentik](/serveex/advanced/authentik/). Sinon, ne l'exposez pas avec SWAG, utilisez plutôt un VPN comme [WireGuard](/serveex/core/wireguard).
|
||||
::
|
||||
|
||||
::steps{level="3"}
|
||||
### Créer le fichier subdomain.conf
|
||||
|
||||
Dans les dossiers de Swag, créez le fichier `stats.subdomain.conf`.
|
||||
Dans les dossiers de SWAG, créez le fichier `stats.subdomain.conf`.
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
✨ __Astuce pour les allergiques au terminal :__
|
||||
@@ -153,9 +155,9 @@ Dans Dockge, modifiez le compose de SWAG et ajoutez le réseau d'Uptime-Kuma :
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Relie le conteneur au réseau personnalisé
|
||||
networks: # Relie le conteneur au réseau personnalisé
|
||||
# ...
|
||||
- uptime-kuma # Nom du réseau déclaré
|
||||
|
||||
@@ -179,7 +181,7 @@ Nous partons ici du principe que le nom du réseau d'Uptime-Kuma est `uptime-kum
|
||||
Et voilà ! Uptime-Kuma est maintenant exposé, et vous pouvez y accéder via `https://stats.mondomaine.fr`.
|
||||
|
||||
## Protéger Uptime-Kuma avec TinyAuth
|
||||
[TinyAuth](/serveex/security/tinyauth) peut se placer devant Uptime-Kuma comme devant n'importe quelle autre application, mais ici nous voulons aussi que la page de statut publique (et les ressources dont elle a besoin pour s'afficher) reste joignable sans se connecter. Cela utilise la même technique de `location` en expression régulière que [Laisser certains chemins publics](/serveex/security/tinyauth#leaving-specific-paths-public), appliquée directement à `stats.subdomain.conf`.
|
||||
[TinyAuth](/serveex/security/tinyauth) peut se placer devant Uptime-Kuma comme devant n'importe quelle autre application, mais ici nous voulons aussi que la page de statut publique (et les ressources dont elle a besoin pour s'afficher) reste joignable sans se connecter. Cela utilise la même technique de `location` en expression régulière que [Laisser certains chemins publics](/serveex/security/tinyauth#laisser-certains-chemins-publics), appliquée directement à `stats.subdomain.conf`.
|
||||
|
||||
::steps{level="3"}
|
||||
### Ouvrir le fichier subdomain.conf
|
||||
@@ -190,7 +192,7 @@ sudo nano /srv/docker/swag/config/nginx/proxy-confs/stats.subdomain.conf
|
||||
|
||||
### Ajouter la vérification forward-auth et les chemins publics
|
||||
|
||||
Remplacez le contenu du fichier par ce qui suit. Le bloc `location ~ ^/(...)` correspond à la page de statut publique d'Uptime-Kuma et à ses ressources, et est servi directement, sans jamais atteindre la vérification `auth_request` du `location /` :
|
||||
Remplacez le contenu du fichier par ce qui suit. Le bloc `location ~ ^/(...)` correspond à la page de statut publique d'Uptime-Kuma et à ses ressources, et est servi directement, sans jamais atteindre la vérification `auth_request` du `location /`. Seul `api/status-page` est laissé public, pas tout `/api`, car le reste de l'API d'Uptime-Kuma doit rester derrière l'authentification ; `/metrics` (l'endpoint Prometheus d'Uptime-Kuma) est volontairement absent de la regex pour la même raison :
|
||||
|
||||
```nginx [stats.subdomain.conf]{9-16,32-33}
|
||||
server {
|
||||
@@ -201,7 +203,7 @@ server {
|
||||
|
||||
include /config/nginx/ssl.conf;
|
||||
|
||||
location ~ ^/(status|assets|icon\.svg|api|upload|metrics) {
|
||||
location ~ ^/(status|assets|icon\.svg|api/status-page|upload) {
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
set $upstream_app uptime-kuma;
|
||||
@@ -238,7 +240,7 @@ server {
|
||||
}
|
||||
```
|
||||
|
||||
::note{to="/serveex/security/tinyauth#exposing-tinyauth-with-swag"}
|
||||
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
|
||||
|
||||
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
|
||||
::
|
||||
@@ -251,7 +253,7 @@ Appuyez sur :kbd{value="Ctrl+O"}, puis :kbd{value="Enter"} pour enregistrer, et
|
||||
Redéployez la stack. Uptime-Kuma sera alors joignable publiquement via `https://stats.mondomaine.fr`, avec la page de statut ouverte et tout le reste derrière TinyAuth.
|
||||
|
||||
::tip{icon=""}
|
||||
✨ __Astuce :__ vous pouvez aussi protéger cette application avec [Authentik](/serveex/advanced/authentik) à la place : ouvrez `stats.subdomain.conf` et décommentez les lignes `include /config/nginx/authentik-server.conf;` et `include /config/nginx/authentik-location.conf;`. N'oubliez pas de [créer une application et un provider dans Authentik](/serveex/advanced/authentik#protecting-an-app-via-reverse-proxy). Modifiez ensuite le provider Uptime-Kuma, et dans *Advanced Protocol Settings > Authenticated Paths*, saisissez :
|
||||
✨ __Astuce :__ vous pouvez aussi protéger cette application avec [Authentik](/serveex/advanced/authentik) à la place : ouvrez `stats.subdomain.conf` et décommentez les lignes `include /config/nginx/authentik-server.conf;` et `include /config/nginx/authentik-location.conf;`. N'oubliez pas de [créer une application et un provider dans Authentik](/serveex/advanced/authentik#protéger-une-app-par-reverse-proxy). Modifiez ensuite le provider Uptime-Kuma, et dans *Advanced Protocol Settings > Authenticated Paths*, saisissez :
|
||||
|
||||
```properties
|
||||
^/$
|
||||
|
||||
@@ -9,7 +9,7 @@ description: Installer Dozzle pour surveiller les logs de vos conteneurs Docker
|
||||
|
||||
[Dozzle](https://dozzle.dev/) est un conteneur qui permet d'accéder aux logs de vos autres conteneurs et de les afficher en temps réel dans une interface agréable. C'est un moyen simple de parcourir les logs et de retrouver des informations dans l'historique.
|
||||
|
||||

|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
@@ -39,14 +39,47 @@ services:
|
||||
image: amir20/dozzle:latest
|
||||
ports:
|
||||
- 9135:8080
|
||||
volumes:
|
||||
- /docker/dozzle/data:/data
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- DOZZLE_HOSTNAME=${DOMAIN}
|
||||
- DOCKER_HOST=tcp://docker-socket-proxy:2375
|
||||
networks:
|
||||
- dozzle-internal
|
||||
depends_on:
|
||||
- docker-socket-proxy
|
||||
|
||||
docker-socket-proxy:
|
||||
image: lscr.io/linuxserver/socket-proxy:latest
|
||||
container_name: docker-socket-proxy-dozzle
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
networks:
|
||||
- dozzle-internal
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
environment:
|
||||
- CONTAINERS=1
|
||||
- IMAGES=1
|
||||
- INFO=1
|
||||
- EVENTS=1
|
||||
- ALLOW_LOGS=1
|
||||
restart: unless-stopped
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /run
|
||||
|
||||
networks:
|
||||
dozzle-internal:
|
||||
name: dozzle-internal
|
||||
```
|
||||
|
||||
::note
|
||||
Dozzle ne fait que lire les logs des conteneurs, donc cette config place **Docker Socket Proxy** devant l'API Docker plutôt que de monter directement `/var/run/docker.sock`, en gardant `POST` totalement désactivé : Dozzle peut lister les conteneurs et streamer leurs logs, rien de plus.
|
||||
::
|
||||
|
||||
::tip{icon=""}
|
||||
✨ __Astuce :__ ajoutez le label watchtower à chaque conteneur pour automatiser les mises à jour
|
||||
|
||||
@@ -73,14 +106,14 @@ Déployez le conteneur. Allez sur `http://ipdevotreserveur:9135`. Et voilà, vot
|
||||
### Terminé !
|
||||
::
|
||||
|
||||
## Exposer Dozzle avec Swag
|
||||
## Exposer Dozzle avec SWAG
|
||||
|
||||
::warning
|
||||
|
||||
Dozzle n'utilise pas d'authentification multifacteur. L'exposer sur internet pourrait compromettre les machines auxquelles il est relié. Ne le faites que si vous utilisez un système d'authentification multifacteur comme [TinyAuth](/serveex/security/tinyauth) ou [Authentik](/serveex/advanced/authentik/). Sinon, ne l'exposez pas avec SWAG et utilisez plutôt un VPN comme [Wireguard](/serveex/core/wireguard).
|
||||
Dozzle n'utilise pas d'authentification multifacteur. L'exposer sur internet pourrait compromettre les machines auxquelles il est relié. Ne le faites que si vous utilisez un système d'authentification multifacteur comme [TinyAuth](/serveex/security/tinyauth) ou [Authentik](/serveex/advanced/authentik/). Sinon, ne l'exposez pas avec SWAG et utilisez plutôt un VPN comme [WireGuard](/serveex/core/wireguard).
|
||||
::
|
||||
|
||||
Vous voudrez peut-être accéder à Dozzle à distance et sur tous vos appareils. Pour cela, nous allons exposer Dozzle via Swag.
|
||||
Vous voudrez peut-être accéder à Dozzle à distance et sur tous vos appareils. Pour cela, nous allons exposer Dozzle via SWAG.
|
||||
|
||||
::note{icon=""}
|
||||
📋 __Au préalable :__
|
||||
@@ -97,9 +130,9 @@ Allez dans Dockge et modifiez le fichier compose de SWAG pour y ajouter le rése
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Rattache le conteneur à un réseau personnalisé
|
||||
networks: # Rattache le conteneur à un réseau personnalisé
|
||||
# ...
|
||||
- dozzle # Nom du réseau déclaré dans la stack
|
||||
|
||||
@@ -119,7 +152,7 @@ Nous partons du principe que le nom du réseau de Dozzle est `dozzle_default`. V
|
||||
|
||||
### Créer le fichier subdomain.conf
|
||||
|
||||
Dans le dossier de Swag, créez le fichier `dozzle.subdomain.conf`.
|
||||
Dans le dossier de SWAG, créez le fichier `dozzle.subdomain.conf`.
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
✨ __Astuce :__ vous pouvez utiliser **File Browser Quantum** pour naviguer et modifier vos fichiers plutôt que des commandes dans le terminal.
|
||||
@@ -189,7 +222,7 @@ Appuyez sur :kbd{value="Ctrl+O"}, puis :kbd{value="Enter"} pour enregistrer, et
|
||||
Et voilà, Dozzle est maintenant exposé !
|
||||
|
||||
## Protéger Dozzle avec TinyAuth
|
||||
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `dozzle.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy) :
|
||||
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `dozzle.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-reverse-proxy) :
|
||||
|
||||
```nginx [dozzle.subdomain.conf]{26-38,41-42}
|
||||
## Version 2023/12/19
|
||||
@@ -259,11 +292,11 @@ server {
|
||||
}
|
||||
```
|
||||
|
||||
::note{to="/serveex/security/tinyauth#exposing-tinyauth-with-swag"}
|
||||
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
|
||||
|
||||
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
|
||||
::
|
||||
|
||||
::tip{icon=""}
|
||||
✨ __Astuce :__ vous pouvez protéger cette application avec [Authentik](/serveex/advanced/authentik) plutôt que TinyAuth, en ouvrant `dozzle.subdomain.conf` et en retirant le `#` devant `include /config/nginx/authentik-server.conf;`{lang=nginx} et `include /config/nginx/authentik-location.conf;`{lang=nginx}. N'oubliez pas de [créer une application et un provider dans Authentik](/serveex/advanced/authentik#protecting-an-app-via-reverse-proxy).
|
||||
✨ __Astuce :__ vous pouvez protéger cette application avec [Authentik](/serveex/advanced/authentik) plutôt que TinyAuth, en ouvrant `dozzle.subdomain.conf` et en retirant le `#` devant `include /config/nginx/authentik-server.conf;`{lang=nginx} et `include /config/nginx/authentik-location.conf;`{lang=nginx}. N'oubliez pas de [créer une application et un provider dans Authentik](/serveex/advanced/authentik#protéger-une-app-par-reverse-proxy).
|
||||
::
|
||||
|
||||
@@ -56,7 +56,7 @@ services:
|
||||
- ${PORT}:80
|
||||
environment:
|
||||
- PUID=${PUID}
|
||||
- PGID=${GUID}
|
||||
- PGID=${PGID}
|
||||
- TZ=Europe/Paris
|
||||
- APP_KEY=${API_KEY}
|
||||
- DB_CONNECTION=sqlite
|
||||
@@ -67,19 +67,19 @@ services:
|
||||
|
||||
### Renseigner vos variables d'environnement
|
||||
|
||||
Trouvez vos `PUID` et `GUID` avec la commande suivante :
|
||||
Trouvez vos `PUID` et `PGID` avec la commande suivante :
|
||||
|
||||
```bash [Terminal]
|
||||
id votreutilisateur
|
||||
```
|
||||
|
||||
Dans le fichier `.env`, renseignez la variable `API_KEY` avec la clé générée et ajoutez une planification des tests au format cron, ainsi que vos `PUID` et `GUID`, par exemple :
|
||||
Dans le fichier `.env`, renseignez la variable `API_KEY` avec la clé générée et ajoutez une planification des tests au format cron, ainsi que vos `PUID` et `PGID`, par exemple :
|
||||
|
||||
```properties [.env]
|
||||
SCHEDULE=15 */6 * * * # toutes les 6 heures
|
||||
API_KEY=base64:zihejehkj8_nzhY/OjeieR= # votre clé
|
||||
PUID=1000
|
||||
GUID=1000
|
||||
PGID=1000
|
||||
PORT=3225 # port d'accès à l'interface web
|
||||
```
|
||||
|
||||
@@ -102,7 +102,7 @@ Nous voulons maintenant exposer Speedtest Tracker sur internet pour y accéder
|
||||
|
||||
::warning
|
||||
|
||||
Speedtest Tracker n'utilise pas d'authentification multifacteur. L'exposer sur internet pourrait compromettre les appareils connectés. Ne le faites que si vous utilisez un système multifacteur comme [TinyAuth](/serveex/security/tinyauth) ou [Authentik](/serveex/advanced/authentik/). Sinon, évitez SWAG et préférez un VPN comme [Wireguard](/serveex/core/wireguard).
|
||||
Speedtest Tracker n'utilise pas d'authentification multifacteur. L'exposer sur internet pourrait compromettre les appareils connectés. Ne le faites que si vous utilisez un système multifacteur comme [TinyAuth](/serveex/security/tinyauth) ou [Authentik](/serveex/advanced/authentik/). Sinon, évitez SWAG et préférez un VPN comme [WireGuard](/serveex/core/wireguard).
|
||||
::
|
||||
|
||||
::steps{level="3"}
|
||||
@@ -165,7 +165,7 @@ Enregistrez et quittez. La configuration se met à jour en quelques secondes.
|
||||
|
||||
::note
|
||||
|
||||
Par défaut, SWAG ne connaît pas le nom « speedtest-tracker ». Pour autoriser l'accès, vous devez ajouter le réseau de Speedtest Tracker au `compose.yml` de SWAG.
|
||||
Par défaut, SWAG ne connaît pas le nom « speedtest-tracker ». Pour autoriser l'accès, vous devez ajouter le réseau de Speedtest Tracker au `compose.yaml` de SWAG.
|
||||
::
|
||||
|
||||
Allez dans Dockge et modifiez le compose de SWAG pour y inclure le réseau de Speedtest Tracker :
|
||||
@@ -200,7 +200,7 @@ Ceci suppose que le réseau de Speedtest Tracker s'appelle `speedtest-tracker_de
|
||||
Patientez un instant, puis visitez `https://speedtest.mondomaine.fr` dans votre navigateur. Vous devriez être redirigé vers Speedtest Tracker. Vous pouvez vérifier l'état du service via le tableau de bord (`http://ipdevotreserveur:81` depuis le réseau local).
|
||||
|
||||
## Protéger Speedtest Tracker avec TinyAuth
|
||||
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `speedtest.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy) :
|
||||
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `speedtest.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-reverse-proxy) :
|
||||
|
||||
```nginx [speedtest.subdomain.conf]{22-34,37-38}
|
||||
## Version 2023/12/19
|
||||
@@ -262,7 +262,7 @@ server {
|
||||
}
|
||||
```
|
||||
|
||||
::note{to="/serveex/security/tinyauth#exposing-tinyauth-with-swag"}
|
||||
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
|
||||
|
||||
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
|
||||
::
|
||||
@@ -270,5 +270,5 @@ Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWA
|
||||
::tip{icon=""}
|
||||
✨ Vous pouvez protéger cette application avec [Authentik](/serveex/advanced/authentik) plutôt que TinyAuth, en ouvrant `speedtest.subdomain.conf` et en décommentant
|
||||
`include /config/nginx/authentik-server.conf;` et `include /config/nginx/authentik-location.conf;`.
|
||||
N'oubliez pas de [créer une application et un provider dans Authentik](/serveex/advanced/authentik#protecting-an-app-via-reverse-proxy).
|
||||
N'oubliez pas de [créer une application et un provider dans Authentik](/serveex/advanced/authentik#protéger-une-app-par-reverse-proxy).
|
||||
::
|
||||
|
||||
@@ -53,13 +53,35 @@ services:
|
||||
network_mode: host
|
||||
volumes:
|
||||
- ./socket:/beszel_socket
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
environment:
|
||||
LISTEN: /beszel_socket/beszel.sock
|
||||
DOCKER_HOST: tcp://127.0.0.1:2375
|
||||
# Ne retirez pas les guillemets autour de la clé
|
||||
KEY: ${KEY}
|
||||
depends_on:
|
||||
- docker-socket-proxy
|
||||
|
||||
docker-socket-proxy:
|
||||
image: lscr.io/linuxserver/socket-proxy:latest
|
||||
container_name: docker-socket-proxy-beszel
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
ports:
|
||||
- 127.0.0.1:2375:2375
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
environment:
|
||||
- CONTAINERS=1
|
||||
restart: unless-stopped
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /run
|
||||
```
|
||||
|
||||
::note
|
||||
`beszel-agent` tourne avec `network_mode: host`, il ne peut donc pas rejoindre un réseau interne dédié comme les autres stacks proxifiées de ce site ; à la place, **Docker Socket Proxy** publie son API sur `127.0.0.1` uniquement, joignable depuis l'agent via l'interface de loopback de l'hôte, avec seulement `CONTAINERS=1` activé puisque l'agent n'a besoin que de lire les statistiques des conteneurs.
|
||||
::
|
||||
|
||||
::tip{icon=""}
|
||||
✨ __Astuce :__ ajoutez le label Watchtower à chaque conteneur pour automatiser les mises à jour.
|
||||
|
||||
@@ -122,11 +144,28 @@ services:
|
||||
container_name: beszel-agent
|
||||
restart: unless-stopped
|
||||
network_mode: host
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
environment:
|
||||
LISTEN: ${PORT}
|
||||
KEY: ${KEY}
|
||||
DOCKER_HOST: tcp://127.0.0.1:2375
|
||||
depends_on:
|
||||
- docker-socket-proxy
|
||||
|
||||
docker-socket-proxy:
|
||||
image: lscr.io/linuxserver/socket-proxy:latest
|
||||
container_name: docker-socket-proxy-beszel
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
ports:
|
||||
- 127.0.0.1:2375:2375
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
environment:
|
||||
- CONTAINERS=1
|
||||
restart: unless-stopped
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /run
|
||||
```
|
||||
|
||||
Et dans le `.env` :
|
||||
@@ -143,14 +182,14 @@ Déployez la stack sur le serveur distant. Les données commenceront à remonter
|
||||
__Si ça ne marche pas :__ vérifiez les règles de votre pare-feu.
|
||||
::
|
||||
|
||||
## Exposer Beszel avec Swag
|
||||
## Exposer Beszel avec SWAG
|
||||
|
||||
::warning
|
||||
|
||||
Beszel ne gère pas l'authentification multifacteur. L'exposer sur internet pourrait compromettre les machines connectées. Ne le faites que si vous utilisez un système comme [TinyAuth](/serveex/security/tinyauth) ou [Authentik](/serveex/advanced/authentik/). Sinon, ne l'exposez pas avec SWAG. Utilisez plutôt un VPN comme [Wireguard](/serveex/core/wireguard).
|
||||
Beszel ne gère pas l'authentification multifacteur. L'exposer sur internet pourrait compromettre les machines connectées. Ne le faites que si vous utilisez un système comme [TinyAuth](/serveex/security/tinyauth) ou [Authentik](/serveex/advanced/authentik/). Sinon, ne l'exposez pas avec SWAG. Utilisez plutôt un VPN comme [WireGuard](/serveex/core/wireguard).
|
||||
::
|
||||
|
||||
Si vous voulez accéder à Beszel à distance depuis tous vos appareils, exposez-le avec Swag.
|
||||
Si vous voulez accéder à Beszel à distance depuis tous vos appareils, exposez-le avec SWAG.
|
||||
|
||||
::note{icon="" to="/general/networking/nat"}
|
||||
📋 __Au préalable :__
|
||||
@@ -161,15 +200,15 @@ Vous devez avoir créé un sous-domaine DNS du type `beszel.mondomaine.fr` avec
|
||||
::steps{level="3"}
|
||||
### Ajouter le réseau de Beszel à SWAG
|
||||
|
||||
Dans Dockge, modifiez le fichier compose de Swag et ajoutez le réseau de Beszel :
|
||||
Dans Dockge, modifiez le fichier compose de SWAG et ajoutez le réseau de Beszel :
|
||||
|
||||
```yaml [compose.yaml]
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks:
|
||||
networks:
|
||||
# ...
|
||||
- beszel # réseau déclaré dans la stack
|
||||
|
||||
@@ -180,16 +219,16 @@ networks:
|
||||
external: true
|
||||
```
|
||||
|
||||
Redéployez la stack et attendez que Swag soit pleinement opérationnel.
|
||||
Redéployez la stack et attendez que SWAG soit pleinement opérationnel.
|
||||
|
||||
::note
|
||||
|
||||
Nous partons du principe que le nom du réseau est `beszel_default`. Vous pouvez vérifier la connectivité en visitant le tableau de bord de Swag sur `http://ipdevotreserveur:81`.
|
||||
Nous partons du principe que le nom du réseau est `beszel_default`. Vous pouvez vérifier la connectivité en visitant le tableau de bord de SWAG sur `http://ipdevotreserveur:81`.
|
||||
::
|
||||
|
||||
### Créer le fichier subdomain.conf
|
||||
|
||||
Dans les dossiers de configuration de Swag, créez `beszel.subdomain.conf`.
|
||||
Dans les dossiers de configuration de SWAG, créez `beszel.subdomain.conf`.
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
✨ __Astuce :__ utilisez **File Browser Quantum** pour naviguer et modifier vos fichiers plutôt que des commandes dans le terminal.
|
||||
@@ -253,7 +292,7 @@ Appuyez sur :kbd{value="Ctrl+O"}, puis :kbd{value="Enter"} pour enregistrer, et
|
||||
Et voilà ! Beszel est maintenant exposé !
|
||||
|
||||
## Protéger Beszel avec TinyAuth
|
||||
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `beszel.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy) :
|
||||
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `beszel.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-reverse-proxy) :
|
||||
|
||||
```nginx [beszel.subdomain.conf]{26-38,41-42}
|
||||
## Version 2023/12/19
|
||||
@@ -316,11 +355,11 @@ server {
|
||||
}
|
||||
```
|
||||
|
||||
::note{to="/serveex/security/tinyauth#exposing-tinyauth-with-swag"}
|
||||
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
|
||||
|
||||
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
|
||||
::
|
||||
|
||||
::tip{icon=""}
|
||||
✨ Vous pouvez protéger cette application avec [Authentik](/serveex/advanced/authentik) plutôt que TinyAuth, en ouvrant `beszel.subdomain.conf` et en retirant le `#` devant `include /config/nginx/authentik-server.conf;` et `include /config/nginx/authentik-location.conf;`. N'oubliez pas de [créer une application et un provider dans Authentik](/serveex/advanced/authentik#protecting-an-app-via-reverse-proxy).
|
||||
✨ Vous pouvez protéger cette application avec [Authentik](/serveex/advanced/authentik) plutôt que TinyAuth, en ouvrant `beszel.subdomain.conf` et en retirant le `#` devant `include /config/nginx/authentik-server.conf;` et `include /config/nginx/authentik-location.conf;`. N'oubliez pas de [créer une application et un provider dans Authentik](/serveex/advanced/authentik#protéger-une-app-par-reverse-proxy).
|
||||
::
|
||||
|
||||
@@ -8,7 +8,7 @@ description: Installer UpSnap pour réveiller à distance les machines de votre
|
||||
|
||||
[UpSnap](https://github.com/seriousm4x/UpSnap) est un conteneur qui permet d'allumer, d'éteindre ou de mettre en veille vos machines à distance. Il utilise principalement le Wake-On-Lan (WoL) sur le réseau et propose des fonctions avancées.
|
||||
|
||||

|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
@@ -71,7 +71,7 @@ services:
|
||||
Remplissez le `.env`, par exemple :
|
||||
|
||||
```properties [.env]
|
||||
RANGE=192.168.1.0/24 # scanne tous les appareils du réseau local ayant une IP entre 192.168.0.1 et 192.168.1.255
|
||||
SCAN_RANGE=192.168.1.0/24 # scanne tous les appareils du réseau local ayant une IP entre 192.168.1.1 et 192.168.1.254
|
||||
DNS=192.168.1.1 # IP du DNS pour résoudre les noms de domaine, typiquement l'IP de votre box
|
||||
```
|
||||
|
||||
@@ -85,14 +85,14 @@ Déployez le conteneur et allez sur `http://ipdevotreserveur:8095`. Suivez simpl
|
||||
__Si ça ne marche pas :__ vérifiez les règles de votre pare-feu.
|
||||
::
|
||||
|
||||
## Exposer UpSnap avec Swag
|
||||
## Exposer UpSnap avec SWAG
|
||||
|
||||
::warning
|
||||
|
||||
UpSnap ne gère pas l'authentification multifacteur. L'exposer sur internet pourrait compromettre les machines connectées. Ne le faites que si vous utilisez un système d'authentification multifacteur comme [TinyAuth](/serveex/security/tinyauth) ou [Authentik](/serveex/advanced/authentik/). Sinon, évitez de l'exposer avec SWAG et utilisez plutôt un VPN comme [Wireguard](/serveex/core/wireguard).
|
||||
UpSnap ne gère pas l'authentification multifacteur. L'exposer sur internet pourrait compromettre les machines connectées. Ne le faites que si vous utilisez un système d'authentification multifacteur comme [TinyAuth](/serveex/security/tinyauth) ou [Authentik](/serveex/advanced/authentik/). Sinon, évitez de l'exposer avec SWAG et utilisez plutôt un VPN comme [WireGuard](/serveex/core/wireguard).
|
||||
::
|
||||
|
||||
Vous voudrez peut-être y accéder à distance depuis tous vos appareils. Pour cela, nous allons exposer UpSnap via Swag.
|
||||
Vous voudrez peut-être y accéder à distance depuis tous vos appareils. Pour cela, nous allons exposer UpSnap via SWAG.
|
||||
|
||||
::note{icon=""}
|
||||
📋 __Au préalable :__
|
||||
@@ -101,37 +101,30 @@ Nous partons du principe que vous avez créé un sous-domaine dans votre [zone D
|
||||
::
|
||||
|
||||
::steps{level="3"}
|
||||
### Ajouter le réseau d'UpSnap à SWAG
|
||||
### Rendre l'hôte accessible depuis SWAG
|
||||
|
||||
Allez dans Dockge et modifiez le compose de SWAG en y ajoutant le réseau d'UpSnap :
|
||||
UpSnap tourne en `network_mode: host` (nécessaire pour que la diffusion Wake-on-LAN et le scan réseau fonctionnent de manière fiable), il ne rejoint donc jamais de réseau Docker auquel SWAG pourrait se rattacher comme pour les autres stacks. Il faut à la place donner à SWAG un moyen d'atteindre l'hôte lui-même :
|
||||
|
||||
```yaml [compose.yaml]
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Rattache le conteneur au réseau personnalisé
|
||||
# ...
|
||||
- upsnap # Nom du réseau déclaré dans la stack
|
||||
|
||||
networks: # Définit le réseau personnalisé
|
||||
# ...
|
||||
upsnap: # Nom du réseau déclaré dans la stack
|
||||
name: upsnap_default # Nom réel du réseau externe
|
||||
external: true # Indique qu'il s'agit d'un réseau externe
|
||||
container_name: # ...
|
||||
# ...
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway" # se résout vers l'IP de l'hôte Docker lui-même
|
||||
```
|
||||
|
||||
Redémarrez la stack en cliquant sur « deploy » et attendez que SWAG soit pleinement opérationnel.
|
||||
|
||||
::note
|
||||
|
||||
Nous partons ici du principe que le nom du réseau d'upsnap est `upsnap_default`. Vous pouvez vérifier la connexion dans le tableau de bord de SWAG sur `http://ipdevotreserveur:81`.
|
||||
`host-gateway` est une valeur spéciale que Docker résout automatiquement vers l'IP de la machine hôte, donc cela fonctionne quelle que soit l'adresse réelle de votre serveur.
|
||||
::
|
||||
|
||||
### Créer le fichier subdomain.conf
|
||||
|
||||
Dans les dossiers de Swag, créez le fichier `upsnap.subdomain.conf`.
|
||||
Dans les dossiers de SWAG, créez le fichier `upsnap.subdomain.conf`.
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
✨ __Astuce :__ vous pouvez utiliser **File Browser Quantum** pour naviguer dans vos fichiers et éditer vos documents plutôt que des commandes dans le terminal.
|
||||
@@ -184,7 +177,7 @@ server {
|
||||
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
set $upstream_app upsnap;
|
||||
set $upstream_app host.docker.internal;
|
||||
set $upstream_port 8095;
|
||||
set $upstream_proto http;
|
||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
@@ -201,7 +194,7 @@ Appuyez sur :kbd{value="Ctrl+O"}, puis :kbd{value="Enter"} pour enregistrer, et
|
||||
Et voilà ! Vous avez exposé UpSnap !
|
||||
|
||||
## Protéger UpSnap avec TinyAuth
|
||||
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `upsnap.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy) :
|
||||
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `upsnap.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-reverse-proxy) :
|
||||
|
||||
```nginx [upsnap.subdomain.conf]{26-38,41-42}
|
||||
## Version 2023/12/19
|
||||
@@ -262,7 +255,7 @@ server {
|
||||
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
set $upstream_app upsnap;
|
||||
set $upstream_app host.docker.internal;
|
||||
set $upstream_port 8095;
|
||||
set $upstream_proto http;
|
||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
@@ -271,11 +264,11 @@ server {
|
||||
}
|
||||
```
|
||||
|
||||
::note{to="/serveex/security/tinyauth#exposing-tinyauth-with-swag"}
|
||||
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
|
||||
|
||||
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
|
||||
::
|
||||
|
||||
::tip{icon=""}
|
||||
✨ Vous pouvez protéger cette application avec [Authentik](/serveex/advanced/authentik) plutôt que TinyAuth, en ouvrant `upsnap.subdomain.conf` et en retirant le `#` devant `include /config/nginx/authentik-server.conf;`{lang=nginx} et `include /config/nginx/authentik-location.conf;`{lang=nginx}. N'oubliez pas de [créer une application et un provider dans Authentik](/serveex/advanced/authentik#protecting-an-app-via-reverse-proxy).
|
||||
✨ Vous pouvez protéger cette application avec [Authentik](/serveex/advanced/authentik) plutôt que TinyAuth, en ouvrant `upsnap.subdomain.conf` et en retirant le `#` devant `include /config/nginx/authentik-server.conf;`{lang=nginx} et `include /config/nginx/authentik-location.conf;`{lang=nginx}. N'oubliez pas de [créer une application et un provider dans Authentik](/serveex/advanced/authentik#protéger-une-app-par-reverse-proxy).
|
||||
::
|
||||
|
||||
@@ -16,7 +16,7 @@ Comme toujours, nous utiliserons l'[image linuxserver.io](https://docs.linuxserv
|
||||
|
||||
::note{to="/serveex/core/wireguard"}
|
||||
|
||||
Contrairement à Plex, Jellyfin n'a pas de relais cloud : pour accéder à votre serveur en dehors de votre réseau local, vous devez l'exposer vous-même (voir plus bas), ou utiliser un VPN comme **Wireguard**.
|
||||
Contrairement à Plex, Jellyfin n'a pas de relais cloud : pour accéder à votre serveur en dehors de votre réseau local, vous devez l'exposer vous-même (voir plus bas), ou utiliser un VPN comme **WireGuard**.
|
||||
::
|
||||
|
||||
## Installer Jellyfin
|
||||
@@ -44,7 +44,7 @@ tree:
|
||||
Créez les dossiers `movies`, `tvseries` et `library` dans `/media` :
|
||||
|
||||
```bash [Terminal]
|
||||
mkdir -p /media/movies /media/library /media/tvseries
|
||||
mkdir -p /media/movies /media/tvseries /media/library
|
||||
```
|
||||
|
||||
### Déployer la stack
|
||||
@@ -59,7 +59,7 @@ services:
|
||||
container_name: jellyfin
|
||||
environment:
|
||||
- PUID=${PUID}
|
||||
- PGID=${GUID}
|
||||
- PGID=${PGID}
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- /srv/docker/jellyfin/config:/config
|
||||
@@ -86,7 +86,7 @@ services:
|
||||
|
||||
### Renseigner vos variables d'environnement
|
||||
|
||||
Trouvez vos PUID et GUID en lançant :
|
||||
Trouvez vos PUID et PGID en lançant :
|
||||
|
||||
```bash [Terminal]
|
||||
id utilisateur
|
||||
@@ -96,7 +96,7 @@ Remplissez votre fichier `.env` avec les valeurs récupérées, par exemple :
|
||||
|
||||
```properties [.env]
|
||||
PUID=1000
|
||||
GUID=1000
|
||||
PGID=1000
|
||||
```
|
||||
|
||||
Déployez la stack. L'interface locale est disponible sur `http://ipdevotreserveur:8096`.
|
||||
@@ -124,7 +124,7 @@ Si vos médias sont stockés sur un disque réseau (un NAS ou un disque dur exte
|
||||
|
||||
## Transcodage matériel
|
||||
|
||||
Jellyfin réencode la vidéo à la volée dès qu'un client ne peut pas lire un fichier tel quel : la résolution de l'écran de l'appareil est inférieure à celle de la source, sa connexion réseau est trop lente pour le débit du fichier, ou il ne prend pas en charge le codec, le format HDR ou le type de sous-titres du fichier. C'est ce qu'on appelle le **transcodage**. Lorsque le transcodage est logiciel et éxecuté par le CPU, cela prend énormément de ressources et cela peut saturer un serveur modeste avec seulement un ou deux flux simultanés. Le **transcodage matériel** délègue ce travail au GPU intégré à votre processeur (Intel QuickSync, sur la plupart du matériel de homelab), qui s'en occupe bien plus vite et laisse le CPU libre pour tout le reste.
|
||||
Jellyfin réencode la vidéo à la volée dès qu'un client ne peut pas lire un fichier tel quel : la résolution de l'écran de l'appareil est inférieure à celle de la source, sa connexion réseau est trop lente pour le débit du fichier, ou il ne prend pas en charge le codec, le format HDR ou le type de sous-titres du fichier. C'est ce qu'on appelle le **transcodage**. Lorsque le transcodage est logiciel et exécuté par le CPU, cela prend énormément de ressources et cela peut saturer un serveur modeste avec seulement un ou deux flux simultanés. Le **transcodage matériel** délègue ce travail au GPU intégré à votre processeur (Intel QuickSync, sur la plupart du matériel de homelab), qui s'en occupe bien plus vite et laisse le CPU libre pour tout le reste.
|
||||
|
||||
Le **tone mapping** est une fonction liée mais distincte : convertir une vidéo HDR (qui a besoin d'un écran HDR compatible pour rendre correctement) en SDR pour qu'elle s'affiche correctement sur un écran, une TV ou un client qui ne gère pas le HDR, au lieu de paraître délavée ou trop sombre.
|
||||
|
||||
@@ -192,7 +192,7 @@ Jellyfin ne sera pas exposé sur internet dans ce site, contrairement à la plup
|
||||
|
||||
Plutôt que de faire passer tout le trafic d'un appareil par le VPN, ou même tout le sous-réseau VPN `10.8.0.0/24`, nous utiliserons un **split tunnel** plus serré : chaque appareil distant ne route par le tunnel que le trafic destiné à l'adresse VPN de votre serveur. Tout le reste (navigation, autres applications) reste sur la connexion normale de l'appareil, et le VPN ne sert jamais qu'à joindre cette seule machine.
|
||||
|
||||
::note{to="/serveex/core/wireguard#client-server-setup"}
|
||||
::note{to="/serveex/core/wireguard#sur-le-serveur-client"}
|
||||
|
||||
Ceci suppose que votre serveur Jellyfin fait déjà tourner son propre client WireGuard, le reliant à votre VPN comme décrit dans **Client Server Setup**. Notez l'adresse VPN que wg-easy lui a attribuée (par exemple `10.8.0.2`) ; c'est l'adresse que viseront tous les appareils ci-dessous.
|
||||
::
|
||||
@@ -204,7 +204,7 @@ Ce split tunnel est une convention côté client, pas une frontière de sécurit
|
||||
::steps{level="3"}
|
||||
### Créer un client dans wg-easy pour chaque appareil
|
||||
|
||||
En suivant [Récupérer les fichiers de configuration](/serveex/core/wireguard#retrieve-configuration-files), créez un client par appareil (téléphone, ordinateur, TV/boîtier multimédia) et téléchargez son fichier de configuration.
|
||||
En suivant [Récupérer les fichiers de configuration](/serveex/core/wireguard#récupérer-les-fichiers-de-configuration), créez un client par appareil (téléphone, ordinateur, TV/boîtier multimédia) et téléchargez son fichier de configuration.
|
||||
|
||||
### Restreindre le tunnel au seul serveur
|
||||
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
---
|
||||
title: Qbittorrent
|
||||
title: qBittorrent
|
||||
description: Installer qBittorrent avec Gluetun et ProtonVPN pour télécharger des torrents de manière sécurisée derrière un VPN sur votre serveur auto-hébergé.
|
||||
---
|
||||
|
||||
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||

|
||||

|
||||
|
||||
Afin de télécharger vos media favoris en toute sécurité, nous allons monter un système à base de :
|
||||
|
||||
- [Qbittorent](https://github.com/linuxserver/docker-qbittorrent) comme logiciel de téléchargement bittorent
|
||||
- [Proton VPN Plus](https://protonvpn.com/torrenting), VPN pour sécuriser vos échanges, auquel vous devez souscrire (il y a de nombreux codes promo) pour accéder au protocole Bittorent, mais vous pouvez également en choisir un autre, à condition qu'il propose le protocole bittorent.
|
||||
- [qBittorrent](https://github.com/linuxserver/docker-qbittorrent) comme logiciel de téléchargement BitTorrent
|
||||
- [Proton VPN Plus](https://protonvpn.com/torrenting), VPN pour sécuriser vos échanges, auquel vous devez souscrire (il y a de nombreux codes promo) pour accéder au protocole BitTorrent, mais vous pouvez également en choisir un autre, à condition qu'il propose le protocole BitTorrent.
|
||||
- [Gluetun](https://github.com/qdm12/gluetun)
|
||||
- [Qbittorrent port update](https://codeberg.org/TechnoSam/qbittorrent-gluetun-port-update) pour mettre automatiquement à jour le port de votre VPN (qui change régulièrement).
|
||||
- [qBittorrent port update](https://codeberg.org/TechnoSam/qbittorrent-gluetun-port-update) pour mettre automatiquement à jour le port de votre VPN (qui change régulièrement).
|
||||
- Et le mode [vuetorrent](https://github.com/gabe565/linuxserver-mod-vuetorrent) pour une interface moderne et intuitive.
|
||||
|
||||
Nous monterons ici le système ci-dessous :
|
||||
|
||||

|
||||

|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -34,7 +34,7 @@ tree:
|
||||
- gluetun/
|
||||
- compose.yaml
|
||||
- .env
|
||||
- "media # relié à Jellyfin et Qbittorrent":
|
||||
- "media # relié à Jellyfin et qBittorrent":
|
||||
- "downloads/ # téléchargements génériques, choisis dans les réglages"
|
||||
- "movies/ # utilisé pour télécharger les films"
|
||||
- "tvseries/ # utilisé pour télécharger les séries"
|
||||
@@ -47,7 +47,7 @@ tree:
|
||||
Si ce n'est pas déjà fait, créez le dossier `downloads` dans `/media` :
|
||||
|
||||
```bash [Terminal]
|
||||
mkdir -P /media/downloads
|
||||
mkdir -p /media/downloads
|
||||
```
|
||||
|
||||
### Déployer la stack
|
||||
@@ -67,7 +67,7 @@ services:
|
||||
- DOCKER_MODS=ghcr.io/gabe565/linuxserver-mod-vuetorrent|ghcr.io/t-anc/gsp-qbittorent-gluetun-sync-port-mod:main
|
||||
- TZ=Europe/Paris
|
||||
- PUID=${PUID}
|
||||
- PGID=${GUID}
|
||||
- PGID=${PGID}
|
||||
- WEBUI_PORT=${UI_PORT}
|
||||
- GSP_GTN_API_KEY=${GSP_KEY}
|
||||
- GSP_QBT_USERNAME=${ID}
|
||||
@@ -88,7 +88,7 @@ services:
|
||||
devices:
|
||||
- /dev/net/tun:/dev/net/tun
|
||||
ports:
|
||||
- ${UI_PORT}:5695 # Port de la web-ui
|
||||
- ${UI_PORT}:${UI_PORT} # Port de la web-ui
|
||||
- 8000:8000 # Port de controle de Gluetun
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
@@ -122,7 +122,7 @@ services:
|
||||
|
||||
### Configurer la mise à jour du port de téléchargement
|
||||
|
||||
Avant de renseigner le `.env` dans Dockge, configurons la mise à jour du port de téléchargement. Proton et la plupart des VPN font tourner le port de redirection, qui doit être communiqué à Qbittorrent.
|
||||
Avant de renseigner le `.env` dans Dockge, configurons la mise à jour du port de téléchargement. Proton et la plupart des VPN font tourner le port de redirection, qui doit être communiqué à qBittorrent.
|
||||
|
||||
Nous avons ajouté le mod `ghcr.io/t-anc/gsp-qbittorent-gluetun-sync-port-mod` au conteneur.
|
||||
|
||||
@@ -164,7 +164,7 @@ Dans Dockge, renseignez les variables du `.env` :
|
||||
|
||||
```properties [.env]
|
||||
PUID=
|
||||
GUID=
|
||||
PGID=
|
||||
UI_PORT=
|
||||
PR_KEY=
|
||||
GSP_KEY= # la clé générée et saisie dans config.toml
|
||||
@@ -177,12 +177,12 @@ Détail :
|
||||
| Variable | Description | Exemple |
|
||||
|------------|-------------|---------|
|
||||
| `PUID` | ID utilisateur (`id votreutilisateur`) | `1000` |
|
||||
| `GUID` | ID de groupe (`id votreutilisateur`) | `1000` |
|
||||
| `PGID` | ID de groupe (`id votreutilisateur`) | `1000` |
|
||||
| `UI_PORT` | Port d'accès à l'interface web | `5695` |
|
||||
| `PR_KEY` | Clé privée fournie par Proton | `buKsjNHLyzKMM1qYnzOy4s7SHfly` |
|
||||
| `GSP_KEY` | Clé générée pour la mise à jour du port | `MnBa47MeVmk7xiv` |
|
||||
| `ID` | Identifiant de connexion à l'interface Qbittorrent | `user` |
|
||||
| `PW` | Mot de passe de l'interface Qbittorrent | `password` |
|
||||
| `ID` | Identifiant de connexion à l'interface qBittorrent | `user` |
|
||||
| `PW` | Mot de passe de l'interface qBittorrent | `password` |
|
||||
|
||||
### Terminé !
|
||||
::
|
||||
@@ -194,7 +194,7 @@ Détail :
|
||||
|
||||
Une fois fait, déployez le conteneur.
|
||||
|
||||
::note{to="/serveex/core/docker/#dockge"}
|
||||
::note{to="/serveex/core/docker#installer-dockge-pour-gérer-et-déployer-les-conteneurs"}
|
||||
|
||||
**Les logs de démarrage affichent un mot de passe temporaire pour l'utilisateur `admin`.**
|
||||
Consultez les logs dans **Dockge** pour le récupérer, ou tapez cette commande dans un terminal :
|
||||
@@ -217,7 +217,7 @@ Changez votre identifiant et votre mot de passe dans les réglages « webui ».
|
||||
### Terminé !
|
||||
::
|
||||
|
||||
C'est terminé ! Dans les réglages de Qbittorrent, section « Téléchargements », définissez `/media/downloads` comme dossier par défaut.
|
||||
C'est terminé ! Dans les réglages de qBittorrent, section « Téléchargements », définissez `/media/downloads` comme dossier par défaut.
|
||||
|
||||
Lors de l'ajout d'un téléchargement, pensez à choisir le bon dossier pour que Jellyfin se synchronise correctement (`/media/movies` ou `/media/tvseries`). Vous pouvez aussi automatiser cela avec des catégories et des dossiers.
|
||||
|
||||
@@ -225,10 +225,10 @@ Lors de l'ajout d'un téléchargement, pensez à choisir le bon dossier pour que
|
||||
|
||||
::warning
|
||||
|
||||
Qbittorrent ne gère pas l'authentification multifacteur. L'exposer sur internet peut mettre votre système en danger. Ne le faites que si vous utilisez du MFA via [TinyAuth](/serveex/security/tinyauth) ou [Authentik](/serveex/advanced/authentik/). Sinon, ne l'exposez pas avec SWAG. Utilisez plutôt un VPN comme [Wireguard](/serveex/core/wireguard).
|
||||
qBittorrent ne gère pas l'authentification multifacteur. L'exposer sur internet peut mettre votre système en danger. Ne le faites que si vous utilisez du MFA via [TinyAuth](/serveex/security/tinyauth) ou [Authentik](/serveex/advanced/authentik/). Sinon, ne l'exposez pas avec SWAG. Utilisez plutôt un VPN comme [WireGuard](/serveex/core/wireguard).
|
||||
::
|
||||
|
||||
Pour lancer des téléchargements depuis l'extérieur, sans VPN, vous pouvez exposer l'interface web de Qbittorrent.
|
||||
Pour lancer des téléchargements depuis l'extérieur, sans VPN, vous pouvez exposer l'interface web de qBittorrent.
|
||||
|
||||
::note
|
||||
|
||||
@@ -321,7 +321,7 @@ server {
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
set $upstream_app gluetun;
|
||||
set $upstream_port 5555;
|
||||
set $upstream_port 5695;
|
||||
set $upstream_proto http;
|
||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
|
||||
@@ -334,10 +334,10 @@ Appuyez sur :kbd{value="Ctrl+O"}, puis :kbd{value="Enter"} pour enregistrer, et
|
||||
### Terminé !
|
||||
::
|
||||
|
||||
Attendez quelques minutes, puis allez sur `https://seedbox.mondomaine.fr`. Vous devriez arriver sur l'interface de Qbittorrent.
|
||||
Attendez quelques minutes, puis allez sur `https://seedbox.mondomaine.fr`. Vous devriez arriver sur l'interface de qBittorrent.
|
||||
|
||||
## Protéger Qbittorrent avec TinyAuth
|
||||
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `seedbox.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy) :
|
||||
## Protéger qBittorrent avec TinyAuth
|
||||
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `seedbox.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-reverse-proxy) :
|
||||
|
||||
```nginx [seedbox.subdomain.conf]{26-38,41-42}
|
||||
## Version 2023/12/19
|
||||
@@ -399,7 +399,7 @@ server {
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
set $upstream_app gluetun;
|
||||
set $upstream_port 5555;
|
||||
set $upstream_port 5695;
|
||||
set $upstream_proto http;
|
||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
|
||||
@@ -407,15 +407,15 @@ server {
|
||||
}
|
||||
```
|
||||
|
||||
::note{to="/serveex/security/tinyauth#exposing-tinyauth-with-swag"}
|
||||
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
|
||||
|
||||
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
|
||||
::
|
||||
|
||||
::tip{icon=""}
|
||||
✨ Vous pouvez sécuriser cette application avec [Authentik](/serveex/advanced/authentik) plutôt que TinyAuth, en décommentant les lignes `authentik-server.conf` et `authentik-location.conf`. N'oubliez pas de [créer une application et un provider dans Authentik](/serveex/advanced/authentik#protecting-an-app-via-reverse-proxy).
|
||||
✨ Vous pouvez sécuriser cette application avec [Authentik](/serveex/advanced/authentik) plutôt que TinyAuth, en décommentant les lignes `authentik-server.conf` et `authentik-location.conf`. N'oubliez pas de [créer une application et un provider dans Authentik](/serveex/advanced/authentik#protéger-une-app-par-reverse-proxy).
|
||||
::
|
||||
|
||||
Et voilà ! Vous avez maintenant un media center prêt à l'emploi.
|
||||
|
||||

|
||||

|
||||
|
||||
@@ -26,7 +26,7 @@ tree:
|
||||
- srv:
|
||||
- docker:
|
||||
- jellyfin:
|
||||
- compose.yml
|
||||
- compose.yaml
|
||||
- .env
|
||||
- config/
|
||||
- sonarr:
|
||||
@@ -49,7 +49,7 @@ tree:
|
||||
|
||||
::warning
|
||||
|
||||
__Attention :__ respectez bien cette structure de fichiers, en particulier le dossier `media`. Ce dossier doit être monté **exactement de la même façon** dans le fichier compose de _Qbittorrent_ (`/votre/chemin/media:/media`) et dans les applications _arr_. Sinon, les applications _arr_ risquent de ne pas reconnaître le chemin fourni par Qbittorrent et ne créeront pas de _hardlinks_. Sans hardlinks, les applications _arr_ copieront les fichiers, ce qui **doublera l'espace utilisé** sur votre stockage.
|
||||
__Attention :__ respectez bien cette structure de fichiers, en particulier le dossier `media`. Ce dossier doit être monté **exactement de la même façon** dans le fichier compose de _Qbittorrent_ (`/votre/chemin/media:/media`) et dans les applications _arr_. Sinon, les applications _arr_ risquent de ne pas reconnaître le chemin fourni par qBittorrent et ne créeront pas de _hardlinks_. Sans hardlinks, les applications _arr_ copieront les fichiers, ce qui **doublera l'espace utilisé** sur votre stockage.
|
||||
::
|
||||
|
||||
::steps{level="3"}
|
||||
@@ -133,8 +133,8 @@ services:
|
||||
container_name: bazarr
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- PUID=${PUID}
|
||||
- PGID=${PGID}
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- /srv/docker/bazarr/config:/config
|
||||
@@ -162,15 +162,15 @@ Renseignez votre fichier `.env` avec les variables ci-dessous :
|
||||
|
||||
```properties [.env]
|
||||
PUID=
|
||||
GUID=
|
||||
PGID=
|
||||
MEDIA_PATH=
|
||||
```
|
||||
|
||||
| Variable | Description | Exemple |
|
||||
|----------------|-------------------------------------------------------------------------------------------------|-------------|
|
||||
| `PUID` | À renseigner avec vos informations utilisateur (à vérifier avec `id votreutilisateur`) | `1000` |
|
||||
| `GUID` | Idem | `1000` |
|
||||
| `MEDIA_PATH` | Chemin de votre dossier média, ici `/media`. Il doit correspondre à celui utilisé par Qbittorrent. | `/media` |
|
||||
| `PGID` | Idem | `1000` |
|
||||
| `MEDIA_PATH` | Chemin de votre dossier média, ici `/media`. Il doit correspondre à celui utilisé par qBittorrent. | `/media` |
|
||||
|
||||
::note
|
||||
|
||||
@@ -207,7 +207,7 @@ Créez un compte et choisissez *forms login*.
|
||||
|
||||
::warning
|
||||
|
||||
__Attention :__ si vous avez déjà des films dans `movies` provenant de Qbittorrent, ne laissez pas Radarr les ajouter. Radarr pourrait les modifier, ce qui interromprait le seed dans Qbittorrent.
|
||||
__Attention :__ si vous avez déjà des films dans `movies` provenant de qBittorrent, ne laissez pas Radarr les ajouter. Radarr pourrait les modifier, ce qui interromprait le seed dans qBittorrent.
|
||||
::
|
||||
|
||||
#### Configurer les profils
|
||||
@@ -216,12 +216,12 @@ Allez dans *Settings > Profiles*. Ce sont vos profils de qualité par défaut. Q
|
||||
|
||||

|
||||
|
||||
#### Ajouter Qbittorrent
|
||||
#### Ajouter qBittorrent
|
||||
|
||||
Dans *Settings > Download Clients*, ajoutez Qbittorrent.
|
||||
Dans *Settings > Download Clients*, ajoutez qBittorrent.
|
||||
|
||||
- Utilisez l'IP de votre serveur comme *Host* et le port `5695` si vous suivez ce guide.
|
||||
- Renseignez vos *Username* et *Password* Qbittorrent.
|
||||
- Renseignez vos *Username* et *Password* qBittorrent.
|
||||
- Cliquez sur *Test*.
|
||||
- Si le test réussit, cliquez sur *Save*.
|
||||
|
||||
@@ -389,12 +389,12 @@ Il peut être utile d'exposer Seerr si vous voulez envoyer des demandes depuis l
|
||||
|
||||
::warning
|
||||
|
||||
Seerr n'a pas d'authentification à deux facteurs intégrée. Ne l'exposez que si vous utilisez une solution d'authentification robuste comme [TinyAuth](/serveex/security/tinyauth) ou [Authentik](/serveex/advanced/authentik). Sinon, ne l'exposez pas avec SWAG, utilisez plutôt un VPN comme [Wireguard](/serveex/core/wireguard).
|
||||
Seerr n'a pas d'authentification à deux facteurs intégrée. Ne l'exposez que si vous utilisez une solution d'authentification robuste comme [TinyAuth](/serveex/security/tinyauth) ou [Authentik](/serveex/advanced/authentik). Sinon, ne l'exposez pas avec SWAG, utilisez plutôt un VPN comme [WireGuard](/serveex/core/wireguard).
|
||||
::
|
||||
|
||||
::note
|
||||
|
||||
Nous partons du principe que vous avez le sous-domaine `films.mondomaine.fr` avec un `CNAME` pointant vers `films.fr` dans votre [zone DNS](/general/networking/dns). Et que, [à moins d'utiliser Cloudflare Zero Trust](/serveex/security/cloudflare), le port `443` de votre box est redirigé vers le port `443` de votre serveur via les [règles NAT](/general/networking/nat).
|
||||
Nous partons du principe que vous avez le sous-domaine `films.mondomaine.fr` avec un `CNAME` pointant vers `mondomaine.fr` dans votre [zone DNS](/general/networking/dns). Et que, [à moins d'utiliser Cloudflare Zero Trust](/serveex/security/cloudflare), le port `443` de votre box est redirigé vers le port `443` de votre serveur via les [règles NAT](/general/networking/nat).
|
||||
::
|
||||
|
||||
::steps{level="3"}
|
||||
@@ -406,9 +406,9 @@ Allez dans Dockge, modifiez le fichier compose de SWAG, et ajoutez le réseau de
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Connects the container to a custom network
|
||||
networks: # Connects the container to a custom network
|
||||
# ...
|
||||
- jellyfin # Name of the network declared in the stack
|
||||
|
||||
@@ -514,7 +514,7 @@ __Si ça ne marche pas :__ vérifiez les règles de votre pare-feu.
|
||||
Et voilà, Seerr est maintenant accessible publiquement !
|
||||
|
||||
## Protéger Seerr avec TinyAuth
|
||||
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `films.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy). L'interface web (`/`) reçoit la vérification, `/api` en est exclu, puisque les appels d'API de Seerr (et tout ce qui s'y intègre) ne peuvent pas faire de connexion interactive dans un navigateur :
|
||||
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `films.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-reverse-proxy). L'interface web (`/`) reçoit la vérification, `/api` en est exclu, puisque les appels d'API de Seerr (et tout ce qui s'y intègre) ne peuvent pas faire de connexion interactive dans un navigateur :
|
||||
|
||||
```nginx [films.subdomain.conf]{24-36,39-40}
|
||||
## Version 2024/07/16
|
||||
@@ -592,11 +592,11 @@ server {
|
||||
}
|
||||
```
|
||||
|
||||
::note{to="/serveex/security/tinyauth#exposing-tinyauth-with-swag"}
|
||||
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
|
||||
|
||||
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
|
||||
::
|
||||
|
||||
::tip{icon=""}
|
||||
✨ Vous pouvez protéger cette application avec [Authentik](/serveex/advanced/authentik) plutôt que TinyAuth, en ouvrant `films.subdomain.conf` et en retirant le `#` devant `include /config/nginx/authentik-server.conf;`{lang=nginx} et `include /config/nginx/authentik-location.conf;`{lang=nginx}. N'oubliez pas de [créer une application et un provider dans Authentik](/serveex/advanced/authentik#protecting-an-app-via-reverse-proxy).
|
||||
✨ Vous pouvez protéger cette application avec [Authentik](/serveex/advanced/authentik) plutôt que TinyAuth, en ouvrant `films.subdomain.conf` et en retirant le `#` devant `include /config/nginx/authentik-server.conf;`{lang=nginx} et `include /config/nginx/authentik-location.conf;`{lang=nginx}. N'oubliez pas de [créer une application et un provider dans Authentik](/serveex/advanced/authentik#protéger-une-app-par-reverse-proxy).
|
||||
::
|
||||
|
||||
@@ -8,7 +8,7 @@ description: Installer Immich, une alternative auto-hébergée à Google Photos
|
||||
|
||||
[Immich](https://immich.app/docs/overview/introduction) est une solution auto-hébergée de gestion de photos et de vidéos qui remplace les services cloud comme Google Photos ou iCloud. Elle propose des fonctions puissantes comme la reconnaissance faciale et la géolocalisation.
|
||||
|
||||

|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
@@ -71,9 +71,9 @@ Dans Dockge, ouvrez la stack SWAG et modifiez le fichier compose pour y ajouter
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Rattache le conteneur au réseau personnalisé
|
||||
networks: # Rattache le conteneur au réseau personnalisé
|
||||
# ...
|
||||
- immich # Nom du réseau défini dans la stack
|
||||
|
||||
@@ -177,7 +177,7 @@ Immich gère OIDC nativement, vous pouvez donc exiger une connexion Pocket ID av
|
||||
::steps{level="3"}
|
||||
### Enregistrer Immich comme client OIDC
|
||||
|
||||
[Enregistrez un client OIDC dans Pocket ID](/serveex/security/pocket-id#registering-an-oidc-client) nommé `immich`, avec ces trois URL de callback :
|
||||
[Enregistrez un client OIDC dans Pocket ID](/serveex/security/pocket-id#enregistrer-un-client-oidc) nommé `immich`, avec ces trois URL de callback :
|
||||
|
||||
```text
|
||||
https://immich.mondomaine.fr/auth/login
|
||||
|
||||
@@ -8,7 +8,7 @@ description: Installer Nextcloud pour auto-héberger vos fichiers, photos et age
|
||||
|
||||
[Nextcloud](https://nextcloud.com/) est une solution auto-hébergée qui permet d'accéder à vos données et de les synchroniser sur tous vos appareils. Elle inclut aussi des fonctions de collaboration, un agenda, et bien plus. C'est une excellente alternative à des services comme Google Drive, iCloud ou OneDrive.
|
||||
|
||||

|
||||

|
||||
|
||||
## Installation
|
||||
::note{to="https://docs.linuxserver.io/images/docker-nextcloud/"}
|
||||
@@ -43,7 +43,7 @@ services:
|
||||
container_name: nextcloud
|
||||
environment:
|
||||
- PUID=${PUID}
|
||||
- PGID=${GUID}
|
||||
- PGID=${PGID}
|
||||
- TZ=Etc/UTC
|
||||
volumes:
|
||||
- /srv/docker/nextcloud/config:/config
|
||||
@@ -60,7 +60,7 @@ Si vous utilisez un NAS ou un disque partagé sur le réseau via **Samba**, remp
|
||||
|
||||
### Renseigner vos variables d'environnement
|
||||
|
||||
Trouvez vos `PUID` et `GUID` avec la commande suivante :
|
||||
Trouvez vos `PUID` et `PGID` avec la commande suivante :
|
||||
|
||||
```bash [Terminal]
|
||||
id utilisateur
|
||||
@@ -70,7 +70,7 @@ Remplissez ensuite le fichier `.env` avec le port de votre choix et les valeurs
|
||||
|
||||
```properties [.env]
|
||||
PUID=1000
|
||||
GUID=1000
|
||||
PGID=1000
|
||||
PORT=4545
|
||||
```
|
||||
|
||||
@@ -84,8 +84,8 @@ Déployez la stack et visitez `http://ipdevotreserveur:4545` pour terminer la co
|
||||
__Si ça ne marche pas :__ vérifiez les règles de votre pare-feu.
|
||||
::
|
||||
|
||||
## Exposer Nextcloud avec Swag
|
||||
L'objectif de cette installation est d'accéder à Nextcloud à distance depuis tous vos appareils. Nous allons utiliser Swag pour exposer l'application.
|
||||
## Exposer Nextcloud avec SWAG
|
||||
L'objectif de cette installation est d'accéder à Nextcloud à distance depuis tous vos appareils. Nous allons utiliser SWAG pour exposer l'application.
|
||||
|
||||
::note
|
||||
|
||||
@@ -101,9 +101,9 @@ Dans Dockge, allez sur votre stack SWAG et modifiez le compose pour y ajouter le
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks:
|
||||
networks:
|
||||
# ...
|
||||
- nextcloud
|
||||
|
||||
@@ -155,7 +155,7 @@ Appuyez sur :kbd{value="Ctrl+O"}, puis :kbd{value="Enter"} pour enregistrer, et
|
||||
|
||||
### Créer le fichier subdomain.conf
|
||||
|
||||
Dans les dossiers de Swag, créez le fichier `nextcloud.subdomain.conf` :
|
||||
Dans les dossiers de SWAG, créez le fichier `nextcloud.subdomain.conf` :
|
||||
|
||||
```bash [Terminal]
|
||||
sudo nano /srv/docker/swag/config/nginx/proxy-confs/nextcloud.subdomain.conf
|
||||
@@ -212,7 +212,7 @@ Dans Nextcloud, allez dans _Apps > Integration_ et installez __OpenID Connect us
|
||||
|
||||
### Enregistrer Nextcloud comme client OIDC
|
||||
|
||||
[Enregistrez un client OIDC dans Pocket ID](/serveex/security/pocket-id#registering-an-oidc-client) nommé `Nextcloud`, avec cette URL de callback :
|
||||
[Enregistrez un client OIDC dans Pocket ID](/serveex/security/pocket-id#enregistrer-un-client-oidc) nommé `Nextcloud`, avec cette URL de callback :
|
||||
|
||||
```text
|
||||
https://nextcloud.mondomaine.fr/apps/user_oidc/code
|
||||
|
||||
@@ -84,14 +84,13 @@ Montez chaque dossier listé sous `sources` dans `config.yaml` au même chemin
|
||||
::tip{icon=""}
|
||||
✨ __Astuce :__ ajoutez le label watchtower pour automatiser les mises à jour.
|
||||
|
||||
```yaml [compose.yaml]
|
||||
services:
|
||||
filebrowser-quantum:
|
||||
#...
|
||||
labels:
|
||||
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
```
|
||||
```yaml [compose.yaml]
|
||||
services:
|
||||
filebrowser-quantum:
|
||||
#...
|
||||
labels:
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
```
|
||||
::
|
||||
|
||||
Déployez le conteneur et allez sur `http://ipdevotreserveur:8020`. Connectez-vous avec les identifiants par défaut `admin` / `admin`, puis changez immédiatement le mot de passe dans les réglages de votre profil.
|
||||
@@ -104,14 +103,14 @@ Déployez le conteneur et allez sur `http://ipdevotreserveur:8020`. Connectez-vo
|
||||
__Si ça ne marche pas :__ vérifiez les règles de votre pare-feu.
|
||||
::
|
||||
|
||||
## Exposer File Browser Quantum avec Swag
|
||||
## Exposer File Browser Quantum avec SWAG
|
||||
|
||||
::warning
|
||||
|
||||
File Browser Quantum ne gère pas l'authentification multifacteur. L'exposer publiquement pourrait mettre vos systèmes en danger. Ne le faites que si vous utilisez une solution d'authentification robuste comme [TinyAuth](/serveex/security/tinyauth) ou [Authentik](/serveex/advanced/authentik/). Sinon, ne l'exposez pas avec SWAG. Utilisez plutôt un VPN comme [Wireguard](/serveex/core/wireguard).
|
||||
File Browser Quantum ne gère pas l'authentification multifacteur. L'exposer publiquement pourrait mettre vos systèmes en danger. Ne le faites que si vous utilisez une solution d'authentification robuste comme [TinyAuth](/serveex/security/tinyauth) ou [Authentik](/serveex/advanced/authentik/). Sinon, ne l'exposez pas avec SWAG. Utilisez plutôt un VPN comme [WireGuard](/serveex/core/wireguard).
|
||||
::
|
||||
|
||||
Vous voudrez peut-être accéder à File Browser Quantum à distance depuis tous vos appareils. Pour cela, nous allons l'exposer à travers Swag.
|
||||
Vous voudrez peut-être accéder à File Browser Quantum à distance depuis tous vos appareils. Pour cela, nous allons l'exposer à travers SWAG.
|
||||
|
||||
::note{icon=""}
|
||||
|
||||
@@ -127,9 +126,9 @@ Dans Dockge, allez sur la stack SWAG et modifiez le fichier compose pour y ajout
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Rattache le conteneur au réseau personnalisé
|
||||
networks: # Rattache le conteneur au réseau personnalisé
|
||||
# ...
|
||||
- filebrowser-quantum # Nom du réseau déclaré dans la stack
|
||||
|
||||
@@ -149,7 +148,7 @@ Redémarrez la stack en cliquant sur « deploy » et attendez que SWAG soit comp
|
||||
|
||||
### Créer le fichier subdomain.conf
|
||||
|
||||
Dans les dossiers de Swag, créez le fichier `fbq.subdomain.conf`.
|
||||
Dans les dossiers de SWAG, créez le fichier `fbq.subdomain.conf`.
|
||||
|
||||
```bash [Terminal]
|
||||
sudo nano /srv/docker/swag/config/nginx/proxy-confs/fbq.subdomain.conf
|
||||
@@ -211,7 +210,7 @@ Appuyez sur :kbd{value="Ctrl+O"}, puis :kbd{value="Enter"} pour enregistrer, et
|
||||
Et voilà ! File Browser Quantum est maintenant exposé.
|
||||
|
||||
## Protéger File Browser Quantum avec TinyAuth
|
||||
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `fbq.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy) :
|
||||
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `fbq.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-reverse-proxy) :
|
||||
|
||||
```nginx [fbq.subdomain.conf]{22-34,37-38}
|
||||
## Version 2023/12/19
|
||||
@@ -276,11 +275,11 @@ server {
|
||||
}
|
||||
```
|
||||
|
||||
::note{to="/serveex/security/tinyauth#exposing-tinyauth-with-swag"}
|
||||
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
|
||||
|
||||
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
|
||||
::
|
||||
|
||||
::tip{icon=""}
|
||||
✨ __Astuce :__ vous pouvez protéger cette application avec [Authentik](/serveex/advanced/authentik) plutôt que TinyAuth, en ouvrant `fbq.subdomain.conf` et en décommentant `include /config/nginx/authentik-server.conf;`{lang=nginx} et `include /config/nginx/authentik-location.conf;`{lang=nginx}. N'oubliez pas de [créer une application et un provider dans Authentik](/serveex/advanced/authentik#protecting-an-app-via-reverse-proxy).
|
||||
✨ __Astuce :__ vous pouvez protéger cette application avec [Authentik](/serveex/advanced/authentik) plutôt que TinyAuth, en ouvrant `fbq.subdomain.conf` et en décommentant `include /config/nginx/authentik-server.conf;`{lang=nginx} et `include /config/nginx/authentik-location.conf;`{lang=nginx}. N'oubliez pas de [créer une application et un provider dans Authentik](/serveex/advanced/authentik#protéger-une-app-par-reverse-proxy).
|
||||
::
|
||||
|
||||
@@ -8,7 +8,7 @@ description: Installer Pingvin Share, une plateforme de partage de fichiers auto
|
||||
|
||||
[Pingvin](https://github.com/stonith404/pingvin-share) est un outil pour partager rapidement des fichiers, à la manière de WeTransfer. Ses nombreuses options de partage (mot de passe, durée d'expiration, lien personnalisé, etc.) en font l'outil idéal pour partager des fichiers rapidement. Pingvin peut aussi créer des _demandes d'envoi_, c'est-à-dire un lien partageable à envoyer à quelqu'un pour qu'il dépose ses fichiers et que vous les récupériez.
|
||||
|
||||

|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
@@ -42,26 +42,24 @@ services:
|
||||
```
|
||||
::note
|
||||
|
||||
À partir d'ici, nous partons du principe que le nom du réseau de Swag est `swag_default`.
|
||||
À partir d'ici, nous partons du principe que le nom du réseau de SWAG est `swag_default`.
|
||||
::
|
||||
|
||||
::tip{icon=""}
|
||||
✨ __Astuce :__ ajoutez le label watchtower à chaque conteneur pour automatiser les mises à jour.
|
||||
|
||||
```yaml [compose.yaml]
|
||||
services:
|
||||
pingvin-share:
|
||||
#...
|
||||
labels:
|
||||
```yaml [compose.yaml]
|
||||
services:
|
||||
pingvin-share:
|
||||
#...
|
||||
labels:
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
|
||||
clamav:
|
||||
#...
|
||||
labels:
|
||||
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
```
|
||||
clamav:
|
||||
#...
|
||||
labels:
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
```
|
||||
::
|
||||
|
||||
Déployez le conteneur et allez sur `http://ipdevotreserveur:3600`. Et voilà ! Votre instance web Pingvin est en route !
|
||||
@@ -74,8 +72,8 @@ Déployez le conteneur et allez sur `http://ipdevotreserveur:3600`. Et voilà !
|
||||
__Si ça ne marche pas :__ vérifiez les règles de votre pare-feu.
|
||||
::
|
||||
|
||||
## Exposer Pingvin avec Swag
|
||||
Tout l'intérêt d'une solution comme celle-ci est de pouvoir y accéder à distance, depuis tous vos appareils. Pour cela, nous allons exposer Pingvin à travers Swag.
|
||||
## Exposer Pingvin avec SWAG
|
||||
Tout l'intérêt d'une solution comme celle-ci est de pouvoir y accéder à distance, depuis tous vos appareils. Pour cela, nous allons exposer Pingvin à travers SWAG.
|
||||
|
||||
::note{icon=""}
|
||||
📋 __Au préalable :__ <br/><br/>
|
||||
@@ -91,9 +89,9 @@ Dans Dockge, allez sur la stack SWAG et modifiez le fichier compose pour y ajout
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Rattache le conteneur au réseau personnalisé
|
||||
networks: # Rattache le conteneur au réseau personnalisé
|
||||
# ...
|
||||
- pingvin # Nom du réseau déclaré dans la stack
|
||||
|
||||
@@ -113,7 +111,7 @@ Redéployez la stack en cliquant sur « deploy » et attendez que SWAG soit comp
|
||||
|
||||
### Créer le fichier subdomain.conf
|
||||
|
||||
Dans les dossiers de Swag, créez le fichier `pingvin.subdomain.conf`.
|
||||
Dans les dossiers de SWAG, créez le fichier `pingvin.subdomain.conf`.
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
|
||||
@@ -190,7 +188,7 @@ Pingvin gère OIDC nativement, vous pouvez donc exiger une connexion Pocket ID a
|
||||
::steps{level="3"}
|
||||
### Enregistrer Pingvin comme client OIDC
|
||||
|
||||
[Enregistrez un client OIDC dans Pocket ID](/serveex/security/pocket-id#registering-an-oidc-client) nommé `pingvin`, avec cette URL de callback :
|
||||
[Enregistrez un client OIDC dans Pocket ID](/serveex/security/pocket-id#enregistrer-un-client-oidc) nommé `pingvin`, avec cette URL de callback :
|
||||
|
||||
```text
|
||||
https://pingvin.mondomaine.fr/api/oauth/callback/oidc
|
||||
@@ -224,15 +222,15 @@ Dans l'espace d'administration d'Authentik, créez un provider OAuth2/OpenID.
|
||||
|
||||
Remplissez chaque section comme suit, en remplaçant `mondomaine.fr` par votre propre domaine. Copiez les champs `Client ID` et `Client Secret` en lieu sûr.
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
#### Créer l'application
|
||||
|
||||
Enregistrez et créez une application `pingvin` comme suit.
|
||||
|
||||

|
||||

|
||||
|
||||
#### Ajouter le provider à votre outpost
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ description: Installer code-server pour utiliser VS Code dans votre navigateur d
|
||||
|
||||
[code-server](https://github.com/linuxserver/docker-code-server) est un conteneur permettant d'accéder à [VS Code](https://code.visualstudio.com/) en interface web dans un environnement Linux. C'est littéralement VS Code et vos projets dans votre poche, disponibles partout.
|
||||
|
||||

|
||||

|
||||
|
||||
## Installation
|
||||
::note{to="https://docs.linuxserver.io/images/docker-code-server/"}
|
||||
@@ -43,7 +43,7 @@ services:
|
||||
container_name: code-server
|
||||
environment:
|
||||
- PUID=${PUID}
|
||||
- PGID=${GUID}
|
||||
- PGID=${PGID}
|
||||
- TZ=Etc/UTC
|
||||
- HASHED_PASSWORD=${PW}
|
||||
volumes:
|
||||
@@ -58,14 +58,13 @@ services:
|
||||
::tip{icon=""}
|
||||
✨ Ajoutez le label Watchtower à chaque conteneur pour automatiser les mises à jour
|
||||
|
||||
```yaml [compose.yaml]
|
||||
services:
|
||||
code-server:
|
||||
#...
|
||||
labels:
|
||||
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
```
|
||||
```yaml [compose.yaml]
|
||||
services:
|
||||
code-server:
|
||||
#...
|
||||
labels:
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
```
|
||||
::
|
||||
|
||||
### Renseigner vos variables d'environnement
|
||||
@@ -76,7 +75,7 @@ Choisissez un mot de passe et générez son hash :
|
||||
echo -n "votremotdepasse" | npx argon2-cli -e
|
||||
```
|
||||
|
||||
Conservez précieusement le résultat. Trouvez vos PUID et GUID avec :
|
||||
Conservez précieusement le résultat. Trouvez vos PUID et PGID avec :
|
||||
|
||||
```bash [Terminal]
|
||||
id votreutilisateur
|
||||
@@ -87,7 +86,7 @@ Remplissez le fichier `.env` avec les valeurs trouvées, par exemple :
|
||||
```properties [.env]
|
||||
PW='$argon2i$v=19$m=4096,t=3,p=1$wST5QhBgk2lu1ih4DMuxvg$LS1alrVdIWtvZHwnzCM1DUGg+5DTO3Dt1d5v9XtLws4'
|
||||
PUID=1000
|
||||
GUID=1000
|
||||
PGID=1000
|
||||
```
|
||||
|
||||
::warning
|
||||
@@ -118,8 +117,8 @@ services:
|
||||
```
|
||||
Une fois dans VS Code, vous aurez accès au dossier monté.
|
||||
|
||||
## Exposer code-server avec Swag
|
||||
Tout l'intérêt d'une telle solution est d'y accéder à distance depuis n'importe quel appareil. Pour cela, nous allons exposer code-server via Swag.
|
||||
## Exposer code-server avec SWAG
|
||||
Tout l'intérêt d'une telle solution est d'y accéder à distance depuis n'importe quel appareil. Pour cela, nous allons exposer code-server via SWAG.
|
||||
|
||||
::note
|
||||
|
||||
@@ -135,16 +134,16 @@ Dans Dockge, allez sur la stack SWAG et modifiez le fichier compose pour y ajout
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Rattache le conteneur à un réseau personnalisé
|
||||
networks: # Rattache le conteneur à un réseau personnalisé
|
||||
# ...
|
||||
- code-server # Nom du réseau défini dans la stack
|
||||
|
||||
networks: # Définit le réseau personnalisé
|
||||
# ...
|
||||
code-server: # Nom du réseau défini dans la stack
|
||||
name: code-serveur # Nom réel du réseau externe
|
||||
name: code-server_default # Nom réel du réseau externe
|
||||
external: true # Indique qu'il s'agit d'un réseau externe
|
||||
```
|
||||
|
||||
@@ -157,7 +156,7 @@ Redéployez la stack en cliquant sur « deploy » et attendez que SWAG soit plei
|
||||
|
||||
### Créer le fichier subdomain.conf
|
||||
|
||||
Dans les dossiers de configuration de Swag, créez le fichier `code.subdomain.conf`.
|
||||
Dans les dossiers de configuration de SWAG, créez le fichier `code.subdomain.conf`.
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
✨ __Astuce :__ vous pouvez utiliser **File Browser Quantum** pour naviguer et modifier vos fichiers plutôt que des commandes dans le terminal.
|
||||
@@ -227,7 +226,7 @@ Appuyez sur :kbd{value="Ctrl+O"}, puis :kbd{value="Enter"} pour enregistrer, et
|
||||
Et voilà ! code-server est maintenant exposé !
|
||||
|
||||
## Protéger code-server avec TinyAuth
|
||||
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `code.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy) :
|
||||
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `code.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-reverse-proxy) :
|
||||
|
||||
```nginx [code.subdomain.conf]{26-38,41-42}
|
||||
## Version 2023/12/19
|
||||
@@ -296,11 +295,11 @@ server {
|
||||
}
|
||||
```
|
||||
|
||||
::note{to="/serveex/security/tinyauth#exposing-tinyauth-with-swag"}
|
||||
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
|
||||
|
||||
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
|
||||
::
|
||||
|
||||
::tip{icon=""}
|
||||
✨ __Astuce :__ vous pouvez protéger cette application avec [Authentik](/serveex/advanced/authentik) plutôt que TinyAuth, en ouvrant `code.subdomain.conf` et en décommentant `include /config/nginx/authentik-server.conf;`{lang=nginx} et `include /config/nginx/authentik-location.conf;`{lang=nginx}. N'oubliez pas de [créer une application et un provider dans Authentik](/serveex/advanced/authentik#protecting-an-app-via-reverse-proxy).
|
||||
✨ __Astuce :__ vous pouvez protéger cette application avec [Authentik](/serveex/advanced/authentik) plutôt que TinyAuth, en ouvrant `code.subdomain.conf` et en décommentant `include /config/nginx/authentik-server.conf;`{lang=nginx} et `include /config/nginx/authentik-location.conf;`{lang=nginx}. N'oubliez pas de [créer une application et un provider dans Authentik](/serveex/advanced/authentik#protéger-une-app-par-reverse-proxy).
|
||||
::
|
||||
|
||||
@@ -73,8 +73,8 @@ Déployez le conteneur et allez sur `http://ipdevotreserveur:3333`. Votre instan
|
||||
__Si ça ne marche pas :__ vérifiez les règles de votre pare-feu.
|
||||
::
|
||||
|
||||
## Exposer Forgejo avec Swag
|
||||
L'intérêt de cette installation est de pouvoir y accéder à distance depuis n'importe lequel de vos appareils. Pour cela, nous allons exposer Forgejo à travers Swag.
|
||||
## Exposer Forgejo avec SWAG
|
||||
L'intérêt de cette installation est de pouvoir y accéder à distance depuis n'importe lequel de vos appareils. Pour cela, nous allons exposer Forgejo à travers SWAG.
|
||||
|
||||
::note
|
||||
|
||||
@@ -90,9 +90,9 @@ Dans Dockge, allez sur la stack SWAG et modifiez le fichier compose en y ajoutan
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Rattache le conteneur au réseau personnalisé
|
||||
networks: # Rattache le conteneur au réseau personnalisé
|
||||
# ...
|
||||
- forgejo # Nom du réseau déclaré
|
||||
|
||||
@@ -112,7 +112,7 @@ Redéployez la stack en cliquant sur « Deploy » et attendez que SWAG soit plei
|
||||
|
||||
### Créer le fichier subdomain.conf
|
||||
|
||||
Dans les dossiers de Swag, créez le fichier `forgejo.subdomain.conf`.
|
||||
Dans les dossiers de SWAG, créez le fichier `forgejo.subdomain.conf`.
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
✨ __Astuce :__ vous pouvez utiliser **File Browser Quantum** pour naviguer et modifier vos fichiers plutôt que des commandes dans le terminal.
|
||||
@@ -212,7 +212,7 @@ Forgejo peut aussi déléguer la connexion à un fournisseur OIDC plutôt qu'à
|
||||
::steps{level="3"}
|
||||
### Enregistrer Forgejo comme client OIDC
|
||||
|
||||
[Enregistrez un client OIDC dans Pocket ID](/serveex/security/pocket-id#registering-an-oidc-client) nommé `Forgejo`, avec cette URL de callback :
|
||||
[Enregistrez un client OIDC dans Pocket ID](/serveex/security/pocket-id#enregistrer-un-client-oidc) nommé `Forgejo`, avec cette URL de callback :
|
||||
|
||||
```text
|
||||
https://forgejo.mondomaine.fr/user/oauth2/PocketID/callback
|
||||
|
||||
@@ -31,14 +31,13 @@ services:
|
||||
::tip{icon=""}
|
||||
✨ __Astuce :__ ajoutez le label Watchtower à chaque conteneur pour activer les mises à jour automatiques.
|
||||
|
||||
```yaml [compose.yaml]
|
||||
services:
|
||||
it-tools:
|
||||
#...
|
||||
labels:
|
||||
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
```
|
||||
```yaml [compose.yaml]
|
||||
services:
|
||||
it-tools:
|
||||
#...
|
||||
labels:
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
```
|
||||
::
|
||||
|
||||
Déployez le conteneur et visitez `http://ipdevotreserveur:3222`. Voilà, votre instance web IT Tools est en route !
|
||||
@@ -51,8 +50,8 @@ Déployez le conteneur et visitez `http://ipdevotreserveur:3222`. Voilà, votre
|
||||
__Si ça ne marche pas :__ vérifiez les règles de votre pare-feu.
|
||||
::
|
||||
|
||||
## Exposer IT Tools avec Swag
|
||||
Vous voudrez peut-être y accéder à distance sur tous vos appareils. Pour cela, nous allons exposer IT Tools avec Swag.
|
||||
## Exposer IT Tools avec SWAG
|
||||
Vous voudrez peut-être y accéder à distance sur tous vos appareils. Pour cela, nous allons exposer IT Tools avec SWAG.
|
||||
|
||||
::note
|
||||
|
||||
@@ -68,9 +67,9 @@ Dans Dockge, allez sur la stack SWAG et modifiez le fichier compose pour y ajout
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Rattache le conteneur au réseau personnalisé
|
||||
networks: # Rattache le conteneur au réseau personnalisé
|
||||
# ...
|
||||
- it-tools # Nom du réseau tel que défini dans la stack IT Tools
|
||||
|
||||
@@ -95,7 +94,7 @@ Redémarrez la stack en cliquant sur « deploy » et attendez que SWAG soit plei
|
||||
|
||||
### Créer le fichier subdomain.conf
|
||||
|
||||
Dans les dossiers de Swag, créez le fichier `tools.subdomain.conf`.
|
||||
Dans les dossiers de SWAG, créez le fichier `tools.subdomain.conf`.
|
||||
|
||||
::tip{icon="" to="/serveex/files/file-browser-quantum"}
|
||||
✨ __Astuce :__ vous pouvez utiliser **File Browser Quantum** pour naviguer et modifier vos fichiers plutôt que des commandes dans le terminal.
|
||||
@@ -166,7 +165,7 @@ Appuyez sur :kbd{value="Ctrl+O"}, puis :kbd{value="Enter"} pour enregistrer, et
|
||||
Et voilà ! IT Tools est maintenant exposé !
|
||||
|
||||
## Protéger IT Tools avec TinyAuth
|
||||
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `tools.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy) :
|
||||
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `tools.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-reverse-proxy) :
|
||||
|
||||
```nginx [tools.subdomain.conf]{26-38,41-42}
|
||||
## Version 2023/12/19
|
||||
@@ -236,11 +235,11 @@ server {
|
||||
}
|
||||
```
|
||||
|
||||
::note{to="/serveex/security/tinyauth#exposing-tinyauth-with-swag"}
|
||||
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
|
||||
|
||||
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
|
||||
::
|
||||
|
||||
::tip{icon=""}
|
||||
✨ __Astuce :__ vous pouvez sécuriser cette application avec [Authentik](/serveex/advanced/authentik) plutôt que TinyAuth, en ouvrant `tools.subdomain.conf` et en décommentant les lignes `include /config/nginx/authentik-server.conf;` et `include /config/nginx/authentik-location.conf;`. N'oubliez pas de [créer une application et un provider dans Authentik](/serveex/advanced/authentik#protecting-an-app-via-reverse-proxy).
|
||||
✨ __Astuce :__ vous pouvez sécuriser cette application avec [Authentik](/serveex/advanced/authentik) plutôt que TinyAuth, en ouvrant `tools.subdomain.conf` et en décommentant les lignes `include /config/nginx/authentik-server.conf;` et `include /config/nginx/authentik-location.conf;`. N'oubliez pas de [créer une application et un provider dans Authentik](/serveex/advanced/authentik#protéger-une-app-par-reverse-proxy).
|
||||
::
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
---
|
||||
title: Adguard Home
|
||||
title: AdGuard Home
|
||||
description: Installer AdGuard Home pour bloquer publicités et trackers à l'échelle du réseau avec DNS-over-HTTPS, gestion des clients et règles de filtrage personnalisées.
|
||||
---
|
||||
|
||||
|
||||
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
|
||||
|
||||
[AdGuard Home](https://github.com/AdguardTeam/AdGuardHome) est un serveur DNS anti-pub et anti-traçage qui fonctionne au niveau du système. Une fois configuré, il couvrira TOUS vos appareils domestiques et vous n'aurezbesoin d'aucun logiciel côté client pour cela.
|
||||
[AdGuard Home](https://github.com/AdguardTeam/AdGuardHome) est un serveur DNS anti-pub et anti-traçage qui fonctionne au niveau du système. Une fois configuré, il couvrira TOUS vos appareils domestiques et vous n'aurez besoin d'aucun logiciel côté client pour cela.
|
||||
|
||||
Il fonctionne comme un serveur DNS qui redirige les domaines de suivi vers un «black hole», empêchant ainsi vos appareils de se connecter à ces serveurs.
|
||||
|
||||
En pratique, une fois en place, il vous faudra juste configurer les serveurs DNS de vos appareils, pour que ces derniers l'utilisent.
|
||||
|
||||

|
||||

|
||||
|
||||
**Rappel sur le fonctionnement d'un DNS :**
|
||||
|
||||
Lorsque vous naviguez sur un site, ou une application, des requêtes sont émises vers un ou des domaines afin d'afficher le contenu de votre page. Les publicités notamment. Votre appareil ne connait pas les adresses IP de ces serveurs à joindre. Pour les connaitre, il va contacter un _serveur de nom_ (Domain Name Server) qui lui va lui répondre avec l'adresse IP la plus à jour pour le domaine de la requête.
|
||||
|
||||
Par défaut, votre appareil utilise le serveur votre fournisseur d'accès, paramétré dans votre box ou directement sur le CGNAT de votre opérateur si appareil mobile. Cela peut etre changé directement dans les réglages de votre navigateur, mais aussi dans le système de votre appareil, et parfois directement dans votre box si votre FAI le permet.
|
||||
Par défaut, votre appareil utilise le serveur de votre fournisseur d'accès, paramétré dans votre box ou directement sur le CGNAT de votre opérateur si appareil mobile. Cela peut être changé directement dans les réglages de votre navigateur, mais aussi dans le système de votre appareil, et parfois directement dans votre box si votre FAI le permet.
|
||||
|
||||
Adguard lui, va s'intercaler entre le serveur de nom et votre appareil. Si vous paramétrez vos appareil, ils contacteront d'abord adguard qui filtrera les requetes, via des listes régulièrement mises à jour :
|
||||
AdGuard lui, va s'intercaler entre le serveur de nom et votre appareil. Si vous paramétrez vos appareil, ils contacteront d'abord AdGuard qui filtrera les requêtes, via des listes régulièrement mises à jour :
|
||||
|
||||
- Si le domaine n'est pas dans une blocklist, il contactera des serveurs de noms génériques (dit upstreams) et répondra vers vos appareils avec l'adresse IP recherchée.
|
||||
- Si le domaine est dans une blocklist, il ne contactera pas les DNS upstream et ne répondre pas à vos appareils. Le contenu affilié à cette requete ne s'affichera pas.
|
||||
- Si le domaine est dans une blocklist, il ne contactera pas les DNS upstream et ne répondra pas à vos appareils. Le contenu affilié à cette requête ne s'affichera pas.
|
||||
|
||||
C'est ainsi que les pubs et domaines malveillants sont bloqués : leurs domaines sont présents dans la blocklist, le reste de la page lui charge correctement.
|
||||
C'est ainsi que les pubs et domaines malveillants sont bloqués : leurs domaines sont présents dans la blocklist, le reste de la page se charge correctement.
|
||||
|
||||

|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
@@ -37,7 +37,7 @@ tree:
|
||||
/:
|
||||
- srv:
|
||||
- docker:
|
||||
- adguard:
|
||||
- adguardhome:
|
||||
- confdir/
|
||||
- workdir/
|
||||
- compose.yaml
|
||||
@@ -47,7 +47,7 @@ tree:
|
||||
|
||||
::note
|
||||
|
||||
Nous monterons également le dossier `/srv/docker/swag/config/etc/letsencrypt` pour accéder au certificat SSL de Swag.
|
||||
Nous monterons également le dossier `/srv/docker/swag/config/etc/letsencrypt` pour accéder au certificat SSL de SWAG.
|
||||
::
|
||||
|
||||
::steps{level="3"}
|
||||
@@ -62,10 +62,11 @@ Nommez la stack `adguardhome` et collez la configuration ci-dessous :
|
||||
services:
|
||||
adguardhome:
|
||||
container_name: adguard
|
||||
image: adguard/adguardhome
|
||||
image: adguard/adguardhome:latest
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 53:53/udp
|
||||
- 53:53/tcp
|
||||
- 8080:80/tcp
|
||||
- 4443:443/tcp
|
||||
- 853:853/tcp
|
||||
@@ -93,10 +94,15 @@ Déployez la stack.
|
||||
|
||||
Allez sur `http://ipdevotreserveur:3000` et suivez les instructions de configuration.
|
||||
|
||||
::warning
|
||||
|
||||
L'assistant de configuration vous demande de choisir un port pour l'interface d'administration. Gardez `3000` : la configuration SWAG plus bas suppose que l'interface reste sur ce port, et le changer ici ferait échouer l'exposition d'AdGuard avec SWAG (erreur 502).
|
||||
::
|
||||
|
||||
### Terminé !
|
||||
::
|
||||
|
||||
C'est tout ! Adguard est déployé.
|
||||
C'est tout ! AdGuard est déployé.
|
||||
|
||||
## Exposer AdGuard avec SWAG
|
||||
Pour rendre AdGuard utilisable en dehors de votre réseau domestique, vous devez l'exposer.
|
||||
@@ -120,9 +126,9 @@ Dans Dockge, allez sur la stack SWAG et modifiez le fichier compose pour y ajout
|
||||
---
|
||||
services:
|
||||
swag:
|
||||
container_name: # ...
|
||||
container_name: # ...
|
||||
# ...
|
||||
networks: # Rattache le conteneur au réseau personnalisé
|
||||
networks: # Rattache le conteneur au réseau personnalisé
|
||||
# ...
|
||||
- adguard # Nom du réseau déclaré dans la stack
|
||||
|
||||
@@ -234,7 +240,7 @@ server {
|
||||
::
|
||||
|
||||
## Protéger AdGuard avec TinyAuth
|
||||
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `adguard.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy). Le `location /dns-query` est laissé en dehors de la vérification `auth_request`, puisque les clients DNS-over-HTTPS ne peuvent pas faire de connexion interactive :
|
||||
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `adguard.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-reverse-proxy). Le `location /dns-query` est laissé en dehors de la vérification `auth_request`, puisque les clients DNS-over-HTTPS ne peuvent pas faire de connexion interactive :
|
||||
|
||||
```nginx [adguard.subdomain.conf]{28-40,43-44,69-70}
|
||||
## Version 2023/05/31
|
||||
@@ -331,7 +337,7 @@ server {
|
||||
}
|
||||
```
|
||||
|
||||
::note{to="/serveex/security/tinyauth#exposing-tinyauth-with-swag"}
|
||||
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
|
||||
|
||||
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
|
||||
::
|
||||
@@ -341,28 +347,28 @@ Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWA
|
||||
<br/><br/>
|
||||
Vous pouvez protéger cette app avec Authentik en ouvrant `adguard.subdomain.conf` et en retirant les `#` devant `include /config/nginx/authentik-server.conf;`{lang=nginx} et `include /config/nginx/authentik-location.conf;`{lang=nginx}. n'oubliez pas de [créer une application et un fournisseur dans Authentik](/serveex/advanced/authentik#protéger-une-app-par-reverse-proxy). Il vous faudra exclure l'url `https://adguard.mondomaine.fr/dns-query` de l'authentification :
|
||||
|
||||
- Editez le fournisseur d'Adguard
|
||||
- Éditez le fournisseur d'AdGuard
|
||||
- Dans *paramètres avancés du protocole > chemins authentifiés*, saisissez `^/dns-query`
|
||||
::
|
||||
|
||||
Enregistrez avec :kbd{value="Ctrl+O"} puis :kbd{value="Entrée"}, puis quittez avec :kbd{value="Ctrl+X"}.
|
||||
|
||||
Et voilà, vous exposez Adguard à présent !
|
||||
Et voilà, vous exposez AdGuard à présent !
|
||||
|
||||
## Configurer le chiffrement SSL/TLS
|
||||
Le chiffrement est essentiel si vous souhaitez garder privées les requêtes que vous faites vers adguard. Chiffrer ces requêtes c'est vous assurez que personne, meme votre FAI ne connaissent votre historique. C'est aussi vous assurer que personne d'autre que votre serveur vous répond.
|
||||
Le chiffrement est essentiel si vous souhaitez garder privées les requêtes que vous faites vers AdGuard. Chiffrer ces requêtes c'est vous assurer que personne, même votre FAI, ne connaisse votre historique. C'est aussi vous assurer que personne d'autre que votre serveur vous répond.
|
||||
|
||||
Afin de configurer le chiffrement :
|
||||
|
||||
- Allez dans _paramètre_ puis dans _chiffrement_.
|
||||
- Parametrez comme suit
|
||||
- Allez dans _paramètres_ puis dans _chiffrement_.
|
||||
- Paramétrez comme suit
|
||||
|
||||

|
||||

|
||||
|
||||
- Puis en dessous, dans la section _certificats_ cochez _Définir un emplacement de fichier du certificat_
|
||||
- Dans le champs de saisie, mettez `/swag-ssl/live/mondomaine.fr/fullchain.pem` en remplaçant `mondomaine.fr` par votre domaine principal.
|
||||
- Dans le champ de saisie, mettez `/swag-ssl/live/mondomaine.fr/fullchain.pem` en remplaçant `mondomaine.fr` par votre domaine principal.
|
||||
- Dans _clé privée_ cochez _Définir un fichier pour la clef privée_
|
||||
- Dans le champs de saisie, mettez `/swag-ssl/live/mondomaine.fr/privkey.pem` en remplaçant `mondomaine.fr` par votre domaine principal.
|
||||
- Dans le champ de saisie, mettez `/swag-ssl/live/mondomaine.fr/privkey.pem` en remplaçant `mondomaine.fr` par votre domaine principal.
|
||||
- Validez
|
||||
|
||||
Et voilà ! Vous avez protégé vos futures requêtes DNS !
|
||||
@@ -370,11 +376,11 @@ Et voilà ! Vous avez protégé vos futures requêtes DNS !
|
||||
## Configurer les appareils
|
||||
Pour configurer vos appareils, vous avez plusieurs choix (que vous pouvez cumuler).
|
||||
### Sécuriser le réseau local
|
||||
Vous pouvez sécuriser votre réseau local avec adguard en configurant votre box pour que chaque requête DNS soit dirigée par défaut vers adguard plutot que les services de votre FAI. Attention, votre box doit pouvoir permettre le changement de DNS (Orange ne le permet pas).
|
||||
Vous pouvez sécuriser votre réseau local avec AdGuard en configurant votre box pour que chaque requête DNS soit dirigée par défaut vers AdGuard plutôt que les services de votre FAI. Attention, votre box doit pouvoir permettre le changement de DNS (Orange ne le permet pas).
|
||||
|
||||
Généralement cette option est dans les paramètres _DHCP_ de votre box. Pensez bien à ajouter un serveur secondaire tel que :
|
||||
|
||||
- Cloudlare : `1.1.1.1`
|
||||
- Cloudflare : `1.1.1.1`
|
||||
- Google : `8.8.8.8`
|
||||
|
||||
En effet, sans cela, si votre serveur tombe, vos appareils n'arriveraient plus à se connecter à internet.
|
||||
@@ -384,14 +390,14 @@ En effet, sans cela, si votre serveur tombe, vos appareils n'arriveraient plus
|
||||
Des appareils peuvent avoir un autre DNS paramétré et ne pas utiliser ceux de la box.
|
||||
::
|
||||
|
||||
### Forcer un navigateur à utiliser Adguard
|
||||
### Forcer un navigateur à utiliser AdGuard
|
||||
|
||||
Dans votre navigateur, vous pouvez configurer un DNS pour le forcer à utiliser adguard home.
|
||||
Dans les paramètres, il vous faudra renseigner l'adresse` https://adguard.mondomaine.fr/dns-query`
|
||||
Dans votre navigateur, vous pouvez configurer un DNS pour le forcer à utiliser AdGuard home.
|
||||
Dans les paramètres, il vous faudra renseigner l'adresse `https://adguard.mondomaine.fr/dns-query`
|
||||
|
||||
### Windows, paramétrer Adguard au niveau système
|
||||
### Windows, paramétrer AdGuard au niveau système
|
||||
|
||||
Dans windows, vous devez paramétrer Adguard pour chaque carte réseau que vous souhaitez utiliser.
|
||||
Dans Windows, vous devez paramétrer AdGuard pour chaque carte réseau que vous souhaitez utiliser.
|
||||
|
||||
- Rendez vous dans _accueil > Réseau et internet >_ et choisissez votre carte réseau à modifier
|
||||
- Cliquez sur _modifier les DNS_ (parfois dans _propriété du matériel_)
|
||||
@@ -402,7 +408,7 @@ Dans windows, vous devez paramétrer Adguard pour chaque carte réseau que vous
|
||||
- Désactivez _retour au texte en clair_
|
||||
- Enregistrez
|
||||
|
||||
Tous les programmes de votre machine utilisant cette carte réseau seront filtrés par Adguard.
|
||||
Tous les programmes de votre machine utilisant cette carte réseau seront filtrés par AdGuard.
|
||||
|
||||
## Ajouter des filtres
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user