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
Screenshots
The homepage is a dashboard with many widgets and services.
Installation and configuration
Requirements
- Docker
- Docker Compose
- Git
- Web domain (I use OVH)
- Open port 80, 443, 22 and 2222 on your router
- For games server, you need to open these ports (7777, 8888, 25565, 26900, 26901, 26903)
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/kfdand/dev/dri) withOLLAMA_MODELandEMBEDDING_MODELfrominfrastructure/.env, pulled byollama-pullat 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>(useradmin, passwordLITELLM_UI_PASSWORDininfrastructure/.env). - Speaches: speech to text and text to speech for Open WebUI, on the CPU, with
SPEACHES_STT_MODEL,SPEACHES_TTS_MODELandSPEACHES_TTS_VOICEfrominfrastructure/.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-zimandlocal-ai-initdownload 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_registerwaits for the end of the installation wizard, registers the runner in Forgejo withFORGEJO_RUNNER_SECRET(generated bymake init), then exits.forgejo_runnerthen 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
- Wordpress
- Gnu Make
- Github API
- Github Actions
- Docker
- Docker Compose
- Docker Hub
- How To Start WordPress with Caddy using Docker Compose
- Digital Ocean - How To Install WordPress with Docker Compose (nginx)
- Imagisphe
- Letsencrypt
- Caddy
- Adminer
- self-hosted-ai-stack
- Uptime Kuma
- qbittorrent
- Transmission
- Gitea
- Jellyfin
- SyncThing
- PsiTransfer
- It-tools
- Omni-tools
- Privatebin
- ghost
- Homepage Tuto
- ProjectSend
- Picoshare
- Dufs
- demos
- Stirling PDF
- open-webui
- Fix docker volume
- Forgejo-runner
- Forgejo-runner
- Forgejo
- Argus
- SearXNG
- Dependency-Track
- Authelia
- BentoPDF

