mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-04 16:46:08 +02:00
217 lines
9.1 KiB
HTML
217 lines
9.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Docker | EchoHub Documentation </title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="title" content="Docker | EchoHub Documentation ">
|
|
|
|
|
|
<link rel="icon" href="../images/hue_icon.svg">
|
|
<link rel="stylesheet" href="../public/docfx.min.css">
|
|
<link rel="stylesheet" href="../public/main.css">
|
|
<meta name="docfx:navrel" content="../toc.html">
|
|
<meta name="docfx:tocrel" content="toc.html">
|
|
|
|
<meta name="docfx:rel" content="../">
|
|
|
|
|
|
<meta name="docfx:docurl" content="https://github.com/HueByte/EchoHub/blob/master/docs/#L1">
|
|
<meta name="loc:inThisArticle" content="In this article">
|
|
<meta name="loc:searchResultsCount" content="{count} results for "{query}"">
|
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
|
<meta name="loc:tocFilter" content="Filter by title">
|
|
<meta name="loc:nextArticle" content="Next">
|
|
<meta name="loc:prevArticle" content="Previous">
|
|
<meta name="loc:themeLight" content="Light">
|
|
<meta name="loc:themeDark" content="Dark">
|
|
<meta name="loc:themeAuto" content="Auto">
|
|
<meta name="loc:changeTheme" content="Change theme">
|
|
<meta name="loc:copy" content="Copy">
|
|
<meta name="loc:downloadPdf" content="Download PDF">
|
|
|
|
<script type="module" src="./../public/docfx.min.js"></script>
|
|
|
|
<script>
|
|
const theme = localStorage.getItem('theme') || 'auto'
|
|
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="">
|
|
<header class="bg-body border-bottom">
|
|
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
|
|
<div class="container-xxl flex-nowrap">
|
|
<a class="navbar-brand" href="../index.html">
|
|
<img id="logo" class="svg" src="../images/hue_icon.svg" alt="EchoHub">
|
|
EchoHub
|
|
</a>
|
|
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
|
|
<i class="bi bi-three-dots"></i>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navpanel">
|
|
<div id="navbar">
|
|
<form class="search" role="search" id="search">
|
|
<i class="bi bi-search"></i>
|
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
</header>
|
|
|
|
<main class="container-xxl">
|
|
<div class="toc-offcanvas">
|
|
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
|
|
<div class="offcanvas-header">
|
|
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
|
|
</div>
|
|
<div class="offcanvas-body">
|
|
<nav class="toc" id="toc"></nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<div class="actionbar">
|
|
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
|
|
<i class="bi bi-list"></i>
|
|
</button>
|
|
|
|
<nav id="breadcrumb"></nav>
|
|
</div>
|
|
|
|
<article data-uid="">
|
|
<h1 id="docker">Docker</h1>
|
|
|
|
<h2 id="quick-start">Quick Start</h2>
|
|
<pre><code class="lang-bash">cp .env.example .env # create your config
|
|
docker compose up -d # start the server
|
|
</code></pre>
|
|
<p>On first run the server automatically generates JWT and encryption keys, creates the database, and seeds a <code>#general</code> channel. Connect with the EchoHub client to <code>http://localhost:5000</code>.</p>
|
|
<h3 id="using-a-pre-built-image">Using a Pre-built Image</h3>
|
|
<p>Instead of building locally, you can pull from GHCR. In <code>docker-compose.yml</code>, replace the <code>build</code> block:</p>
|
|
<pre><code class="lang-yaml">services:
|
|
echohub-server:
|
|
image: ghcr.io/huebyte/echohub-server:latest
|
|
# build:
|
|
# context: ./src
|
|
# dockerfile: EchoHub.Server/Dockerfile
|
|
</code></pre>
|
|
<h2 id="configuration">Configuration</h2>
|
|
<p>All settings are configured through the <code>.env</code> file. These are environment variables that override <code>appsettings.json</code> — the <code>__</code> (double underscore) maps to JSON nesting levels. For example, <code>Server__Name</code> overrides the <code>Server:Name</code> key in <code>appsettings.json</code>.</p>
|
|
<p>See the <a href="configuration.html">Configuration</a> guide for the full reference of all available settings and how the override hierarchy works.</p>
|
|
<p>Common Docker-relevant variables:</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Variable</th>
|
|
<th>Default</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>Server__Name</code></td>
|
|
<td>My EchoHub Server</td>
|
|
<td>Display name for your server</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>Server__Admins__0</code></td>
|
|
<td><em>(empty)</em></td>
|
|
<td>Admin username (use <code>__1</code>, <code>__2</code> for more)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>Irc__Enabled</code></td>
|
|
<td><code>false</code></td>
|
|
<td>Enable the IRC gateway</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>Serilog__MinimumLevel__Default</code></td>
|
|
<td><code>Information</code></td>
|
|
<td>Log level (<code>Debug</code>, <code>Warning</code>, etc.)</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h2 id="persistent-data">Persistent Data</h2>
|
|
<p>All server state lives in a single Docker volume mounted at <code>/app/data</code>:</p>
|
|
<pre><code class="lang-text">/app/data/
|
|
├── appsettings.json # generated config with JWT/encryption keys
|
|
├── echohub.db # SQLite database
|
|
├── uploads/ # uploaded files and avatars
|
|
└── logs/ # rolling log files (14-day retention)
|
|
</code></pre>
|
|
<h3 id="backup">Backup</h3>
|
|
<pre><code class="lang-bash"># stop the server to ensure a consistent snapshot
|
|
docker compose stop
|
|
# copy the data volume to a local directory
|
|
docker cp echohub-server:/app/data ./backup
|
|
docker compose start
|
|
</code></pre>
|
|
<h2 id="irc-gateway">IRC Gateway</h2>
|
|
<p>To enable IRC, set these in your <code>.env</code>:</p>
|
|
<pre><code class="lang-env">Irc__Enabled=true
|
|
</code></pre>
|
|
<p>Then uncomment the port in <code>docker-compose.yml</code>:</p>
|
|
<pre><code class="lang-yaml">ports:
|
|
- "5000:5000"
|
|
- "6697:6697" # IRC (TLS encrypted, preferred)
|
|
</code></pre>
|
|
<p>For TLS, also set:</p>
|
|
<pre><code class="lang-env">Irc__TlsEnabled=true
|
|
Irc__TlsCertPath=/app/data/cert.pfx
|
|
Irc__TlsCertPassword=your_password
|
|
</code></pre>
|
|
<p>Mount your certificate into the data volume or bind-mount it directly.</p>
|
|
<p>IRC users must have an existing EchoHub account. See <a href="getting-started.html#connect-via-irc">Getting Started</a> for client connection examples.</p>
|
|
<h2 id="updating">Updating</h2>
|
|
<pre><code class="lang-bash"># if using pre-built images
|
|
docker compose pull
|
|
docker compose up -d
|
|
|
|
# if building locally
|
|
docker compose build
|
|
docker compose up -d
|
|
</code></pre>
|
|
<p>Data persists across updates since it lives in the named volume.</p>
|
|
<h2 id="troubleshooting">Troubleshooting</h2>
|
|
<p><strong>Port already in use</strong> -- Another process is using port 5000. Change the host port in <code>docker-compose.yml</code>:</p>
|
|
<pre><code class="lang-yaml">ports:
|
|
- "8080:5000" # access via http://localhost:8080
|
|
</code></pre>
|
|
<p><strong>Permission denied on volume</strong> -- The container runs as a non-root <code>echohub</code> user (UID 999). If using bind mounts instead of named volumes, ensure the directory is writable.</p>
|
|
<p><strong>View logs</strong> -- Check the container output:</p>
|
|
<pre><code class="lang-bash">docker compose logs -f echohub-server
|
|
</code></pre>
|
|
<p>File-based logs are also available inside the volume at <code>/app/data/logs/</code>.</p>
|
|
|
|
</article>
|
|
|
|
<div class="contribution d-print-none">
|
|
<a href="https://github.com/HueByte/EchoHub/blob/master/docs/#L1" class="edit-link">Edit this page</a>
|
|
</div>
|
|
|
|
<div class="next-article d-print-none border-top" id="nextArticle"></div>
|
|
|
|
</div>
|
|
|
|
<div class="affix">
|
|
<nav id="affix"></nav>
|
|
</div>
|
|
</main>
|
|
|
|
<div class="container-xxl search-results" id="search-results"></div>
|
|
|
|
<footer class="border-top text-secondary">
|
|
<div class="container-xxl">
|
|
<div class="flex-fill">
|
|
<div class='footer-custom'><div class='footer-inner'><span class='footer-brand'>EchoHub</span><span class='footer-sep'>·</span><a href='https://github.com/HueByte/EchoHub'>GitHub</a><span class='footer-sep'>·</span><a href='https://echohub.voidcube.cloud'>Website</a></div></div>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|