2026-11-18 00:41:41 +01:00
2026-11-17 23:44:34 +01:00
2026-11-18 00:41:41 +01:00
2026-11-18 00:41:41 +01:00
2026-07-05 12:56:29 +02:00
2026-11-18 00:41:41 +01:00
2026-11-17 22:22:55 +01:00
2026-11-17 22:22:55 +01:00
2026-10-18 20:50:42 +02:00
2022-11-24 13:29:36 +01:00
2026-11-18 00:41:41 +01:00
2026-11-18 00:41:41 +01:00

Infrastructure

Open source, decentralized and self-hosted infrastructure for many local services and authentication with Authelia.

Features

  • caddy 2 HTTP/S reverse proxy
  • Authelia (SSO / authentication middleware)
  • local_ai: Ollama (ROCm), Open WebUI, OpenCode, VS Code server, Kiwix, Docling, Kroki, Speaches (voice)
  • Compiler Explorer
  • qbittorrent and transmission (Torrent client/server)
  • Docker / docker-compose
  • Homepage (Dashboard)
  • SearXNG (Self-hosted search engine)
  • Jellyfin (Eg Netflix, Disney+)
  • Forgejo (Git server, fork of Gitea)
  • Uptime Kuma (Monitoring)
  • Argus (Application update monitoring)
  • SyncThing (File synchronization)
  • Dufs (File server)
  • PsiTransfer, ProjectSend, Picoshare (File sharing)
  • it-tools, omni-tools and cyberchef (Tools for IT)
  • Privatebin
  • Memos (Note-taking)
  • Stirling PDF (PDF tools)
  • Wordpress (Via FASTCGI/caddy)
  • Dependency-Track (SBOM / vulnerability tracking)
  • Game (Satisfactory, Minecraft, 7 Days to Die, Team Fortress 2 etc...)

Architecture

Architecture

Screenshots

The homepage is a dashboard with many widgets and services.

Homepage

Installation and configuration

Requirements

List of ports used by the services in this infrastructure:

Port number Service Description
80 Caddy HTTP traffic
443 Caddy HTTPS traffic
22 Forgejo Git/SSH access
2222 OpenSSH Global SSH access
7777 Satisfactory Game server port
8888 Satisfactory Game server port
25565 Minecraft Game server port
8100 Bluemap Minecraft Web map port
26900 7 Days to Die Game server port
26901 7 Days to Die Game server port
26903 7 Days to Die Game server port
27015 Team Fortress 2 Game server port

To avoid get rate limit from letsencrypt (10 certificates per 3 hours), you need to disable some certificates in the caddyfiles and enable them 3h later...

Clone

Clone this repository to your local machine using:

git clone --recurse-submodules --remote-submodules https://github.com/bensuperpc/infrastructure.git

Go to the folder

cd infrastructure

Start the infrastructure

make init

Build the local images (opencode, vscode-server, compiler-explorer), before the first start and after changing images/dev:

make build

Start the website with:

make up

Stop the website with:

make stop

Remove containers with:

make down

Services are enabled via preset configuration files in the presets/ directory.

The active presets are declared in the Makefile via the CONFIGS variable, for example, CONFIGS := local_ai loads presets/local_ai.conf which activates the main_infrastructure, caddy, homepage and local_ai profiles. It can also be set for one command: make CONFIGS="local_ai tools" up.

Preset Services
local_ai Ollama, Open WebUI, LiteLLM, OpenCode, VS Code server, Kiwix, Docling, Kroki, SearXNG, Speaches
tools it-tools, omni-tools, CyberChef, BentoPDF, VS Code server, Compiler Explorer
forgejo Forgejo and its runner
dependency-track Dependency-Track
files Dufs, PicoShare, ProjectSend, PsiTransfer, Syncthing
office Memos, Stirling PDF, PrivateBin
media Jellyfin
torrent qBittorrent, OpenSSH, Uptime Kuma, Dozzle
transmission Transmission (instead of qBittorrent)
web WordPress
monitoring Uptime Kuma, Dozzle, Argus
7dtd, minecraft, satisfactory, tf2 Game servers

Configure the domain

The domain and the certificates are set once, in infrastructure/.env (created by make init):

DOMAIN=bensuperpc.org
TLS=bensuperpc@gmail.com
LISTEN_ADDRESS=0.0.0.0

For local testing:

DOMAIN=bensuperpc.localhost
TLS=internal
LISTEN_ADDRESS=127.0.0.1

LISTEN_ADDRESS applies to every published port: Caddy, SSH (Forgejo, OpenSSH), qBittorrent and the game servers.

Online, Caddy gets a Let's Encrypt certificate for each subdomain with the TLS e-mail, and renews it automatically. To test locally, see Local testing.

Domain name Type Description
bensuperpc.org Main Redirect to www.bensuperpc.org
www.bensuperpc.org Main Homepage
openwebui.bensuperpc.org Sub Open WebUI: chat and RAG with Ollama (local_ai)
litellm.bensuperpc.org Sub LiteLLM proxy for Open WebUI: external APIs (local_ai)
opencode.bensuperpc.org Sub OpenCode coding agent (local_ai)
vscode.bensuperpc.org Sub VS Code server, same tools as OpenCode
kiwix.bensuperpc.org Sub Offline documentation (local_ai)
docling.bensuperpc.org Sub Documents to Markdown (local_ai)
kroki.bensuperpc.org Sub Diagrams from text (local_ai)
compiler-explorer.bensuperpc.org Sub Compiler Explorer
authelia.bensuperpc.org Sub Authelia for authentication
uptimekuma.bensuperpc.org Sub Uptime Kuma for monitoring
qbittorrent.bensuperpc.org Sub Torrent client/server
dozzle.bensuperpc.org Sub Dozzle for docker logs
transmission.bensuperpc.org Sub Torrent client/server
forgejo.bensuperpc.org Sub Fork of Gitea for git
git.bensuperpc.org Sub Fork of Gitea for git
jellyfin.bensuperpc.org Sub Jellyfin for media server
syncthing.bensuperpc.org Sub SyncThing for file synchronization
psitransfer.bensuperpc.org Sub PsiTransfer for file sharing
it-tools.bensuperpc.org Sub Tools for IT
omni-tools.bensuperpc.org Sub Tools for IT
privatebin.bensuperpc.org Sub Privatebin
projectsend.bensuperpc.org Sub ProjectSend for file sharing
picoshare.bensuperpc.org Sub Picoshare for file sharing
dufs.bensuperpc.org Sub Dufs for file sharing
memos.bensuperpc.org Sub Memos note-taking app
stirlingpdf.bensuperpc.org Sub Stirling PDF tools
argus.bensuperpc.org Sub Argus for monitoring application updates
searxng.bensuperpc.org Sub SearXNG self-hosted search engine
dependency-track.bensuperpc.org Sub SBOM / vulnerability analysis
wordpress.bensuperpc.org Sub Wordpress website
bentopdf.bensuperpc.org Sub BentoPDF

Configure the infrastructure

Every secret is in one file, infrastructure/.env (gitignored), created by make init from .env.example: each __GENERATE__ becomes a random value.

The services' <name>.env files, next to their compose file, are tracked in git and hold no secret: they read them as ${NAME}, e.g. DATABASE_URL=postgresql://litellm:${LITELLM_DB_PASSWORD}@litellm-postgres:5432/litellm, so a database and its client share the same value. Run make init again after a git pull: it only adds the new keys.

Authelia - user database

make init writes infrastructure/services/infra/authelia/config/users_database.yml (gitignored) with one admin, from AUTHELIA_ADMIN_USER, AUTHELIA_ADMIN_EMAIL and AUTHELIA_ADMIN_PASSWORD in infrastructure/.env, if the file does not exist yet. To change the password or add users, edit the file with an argon2 hash:

docker run --rm authelia/authelia:4.39.28 authelia crypto hash generate argon2 --password 'MyPassword'

After 5 wrong passwords in 3 minutes, Authelia refuses logins for 30 minutes.

Dozzle - user account

Generate a user entry for users.yml:

docker run -it --rm amir20/dozzle generate bensuperpc --password mypassword --email bensuperpc@gmail.com --name "bensuperpc"

OpenSSH - public key

Replace id_ed25519.pub with your own public SSH key.

local_ai

The local_ai profile runs a local AI stack for C/C++, Qt, Python and embedded development, usable offline once downloaded (about 20 GB):

  • Ollama (ROCm: needs an AMD GPU, /dev/kfd and /dev/dri) with OLLAMA_MODEL and EMBEDDING_MODEL from infrastructure/.env, pulled by ollama-pull at start if missing.
  • LiteLLM: OpenAI-compatible proxy used by Open WebUI for external APIs (OpenAI, Anthropic...); add models and keys in its UI at litellm.<DOMAIN> (user admin, password LITELLM_UI_PASSWORD in infrastructure/.env).
  • Speaches: speech to text and text to speech for Open WebUI, on the CPU, with SPEACHES_STT_MODEL, SPEACHES_TTS_MODEL and SPEACHES_TTS_VOICE from infrastructure/.env, downloaded at start if missing.
  • Open WebUI (chat, RAG through Docling), OpenCode (coding agent with SearXNG and offline docs through Kiwix), and VS Code server.
  • kiwix-zim and local-ai-init download the offline docs at start if missing, then exit.
  • dind: rootless Docker with TLS for OpenCode and VS Code server, separate from the host's Docker.

OpenCode asks for a pairing link on its first visit: docker exec opencode opencode pair --url https://opencode.bensuperpc.org, open WebUI's first account is its admin.

VS Code server's password is VSCODE_SERVER_PASSWORD in infrastructure/.env.

Networks: OpenCode, Open WebUI, Kiwix, Docling and Kroki have no internet (local-ai is internal), openCode reaches the web only through mcp-searxng, it searches with searxng-ai, which keeps only the results from the domains of infrastructure/services/ai/searxng/config/hostnames-remove.yml, and reads pages through mcp-searxng-proxy (Squid), which refuses the domains missing from config/whitelist.txt.

For additional models, use the ollama pull command as shown below.

docker exec ollama ollama pull gemma4:12b
docker exec ollama ollama show qwen3.8:27b
docker exec ollama ollama pull qwen3.5:9b

For Hugging Face models, use the hf.co/<author>/<repo>:<version> format as shown below.

docker exec ollama ollama pull hf.co/byteshape/Qwen3.8-27B-GGUF:IQ4_XS-3.84bpw
docker exec ollama ollama show hf.co/byteshape/Qwen3.8-27B-GGUF:IQ4_XS-3.84bpw

Team Fortress 2 - Steam GSLT

make init will remind you: set TEAMFORTRESS2_SRCDS_TOKEN in infrastructure/.env with your token from steamcommunity.com/dev/managegameservers.

Dependency-Track - first login

Default credentials are admin / admin - change them on first login.

Argus - GitHub token

Argus checks about 30 GitHub projects every hour, within GitHub's 60 requests per hour without a token. For more, set ARGUS_GITHUB_TOKEN in infrastructure/.env with a fine-grained token without any permission.

Forgejo - installation

On the first start, git.<DOMAIN> shows the installation wizard, filled in from forgejo.env: create the administrator account there. The wizard writes INSTALL_LOCK = true to Forgejo's app.ini: do not set FORGEJO__security__INSTALL_LOCK in forgejo.env, Forgejo applies the FORGEJO__* variables at every start and false would break the installation.

Homepage

You can change the homepage config in these files:

Forgejo Runner

The forgejo preset starts a runner, registered without any manual step:

  • forgejo_runner_register waits for the end of the installation wizard, registers the runner in Forgejo with FORGEJO_RUNNER_SECRET (generated by make init), then exits.
  • forgejo_runner then starts with runner.yml.

Labels for runs-on:: docker (Node 22), ubuntu-latest, ubuntu-24.04 and ubuntu-22.04 (ghcr.io/catthehacker/ubuntu images). Edit them in runner.yml, then docker restart forgejo_runner.

actions/checkout and the other actions are downloaded from https://data.forgejo.org. Jobs reach Forgejo directly at http://forgejo:3000, without Authelia.

Docker volumes

This infrastructure uses docker volumes to store data, all configuration/data for each service are not shared between services for security and maintenance reasons, but public_data and private_data are shared between all services to store your data.

Volume name Description
public_data Public data reachable on internet via dufs.bensuperpc.org, can be disabled.
private_data Private data

SSH access

The default port for SSH/rsync is 2222.

You can access to the server with:

ssh -p 2222 admin@bensuperpc.org

Qbittorrent

To activate the alternative webui theme (VueTorrent), you need to go in the qbittorrent settings, then in the webui section, check the Use alternative webui and add /vuetorrent to text field.

Local testing

Set in infrastructure/.env:

DOMAIN=bensuperpc.localhost
TLS=internal
LISTEN_ADDRESS=127.0.0.1

*.localhost names resolve to 127.0.0.1 without /etc/hosts, and Caddy signs the certificates with its own CA, so Authelia works as online, after the first start, import Caddy's root certificate in your browser:

make caddy-root

Variables exported in your shell (DOMAIN, OLLAMA_MODEL...) take precedence over infrastructure/.env: unset them before make.

Sources

License

License

S
Description
My infrastructure with docker and Caddy for bensuperpc.org (WIP)
Readme MIT
2.6 MiB
0 Stars 1 Watchers 0 Forks
Languages
PHP 46.1%
Dockerfile 16.5%
Shell 15.9%
Makefile 13.3%
Python 8.2%