functioning minecraft server

This commit is contained in:
2026-09-16 14:43:00 -06:00
parent e43552b15d
commit 9ae63ef1cd
7 changed files with 66 additions and 14 deletions

View File

@@ -1,4 +1,10 @@
--- ---
- name: Create Gitea directory
ansible.builtin.file:
path: /opt/apps/gitea
state: directory
mode: '0755'
- name: Deploy Gitea - name: Deploy Gitea
containers.podman.podman_container: containers.podman.podman_container:
image: docker.gitea.com/gitea:nightly image: docker.gitea.com/gitea:nightly

View File

@@ -1,4 +1,14 @@
--- ---
- name: Create Jellyfin directories
ansible.builtin.file:
path: "{{ item.path }}"
state: directory
mode: "{{ item.mode }}"
loop:
- { path: /opt/apps/jellyfin/config, mode: '0755' }
- { path: /opt/apps/jellyfin/tvseries, mode: '0777' }
- { path: /opt/apps/jellyfin/movies, mode: '0777' }
- name: Deploy Jellyfin - name: Deploy Jellyfin
containers.podman.podman_container: containers.podman.podman_container:
image: lscr.io/linuxserver/jellyfin:latest image: lscr.io/linuxserver/jellyfin:latest

View File

@@ -4,22 +4,17 @@
# External prerequisites (NOT managed by this repo): # External prerequisites (NOT managed by this repo):
# - Cloudflare A record mc.boxswapper.io -> public IP (grey-cloud, like vpn.boxswapper.io) # - Cloudflare A record mc.boxswapper.io -> public IP (grey-cloud, like vpn.boxswapper.io)
# - Router port forwards: TCP 25565 + UDP 19132 -> 10.10.0.45 # - Router port forwards: TCP 25565 + UDP 19132 -> 10.10.0.45
- name: Create Minecraft data directory
ansible.builtin.file:
path: /opt/apps/minecraft/data
state: directory
mode: '0755'
- name: Deploy Minecraft Server - name: Deploy Minecraft Server
containers.podman.podman_container: containers.podman.podman_container:
image: docker.io/itzg/minecraft-server:latest image: docker.io/itzg/minecraft-server:latest
name: minecraft name: minecraft
env: env: "{{ minecraft_env_base }}"
EULA: "TRUE"
TYPE: PAPER
VERSION: "{{ minecraft_version }}"
MEMORY: "{{ minecraft_memory }}"
MOTD: "{{ minecraft_motd }}"
DIFFICULTY: "{{ minecraft_difficulty }}"
GAMEMODE: "{{ minecraft_gamemode }}"
MAX_PLAYERS: "{{ minecraft_max_players }}"
VIEW_DISTANCE: "{{ minecraft_view_distance }}"
ONLINE_MODE: "{{ minecraft_online_mode }}"
PLUGINS: "{{ minecraft_plugins | join(',') }}"
restart_policy: always restart_policy: always
recreate: true recreate: true
state: started state: started
@@ -32,4 +27,23 @@
- "19132:19132/udp" - "19132:19132/udp"
network: network:
- npm_internal - npm_internal
ip: '{{ minecraft_ip }}' ip: '{{ minecraft_ip }}'
vars:
minecraft_env_base:
EULA: "TRUE"
TYPE: PAPER
VERSION: "{{ minecraft_version }}"
MEMORY: "{{ minecraft_memory }}"
MOTD: "{{ minecraft_motd }}"
DIFFICULTY: "{{ minecraft_difficulty }}"
GAMEMODE: "{{ minecraft_gamemode }}"
MAX_PLAYERS: "{{ minecraft_max_players }}"
VIEW_DISTANCE: "{{ minecraft_view_distance }}"
ONLINE_MODE: "{{ minecraft_online_mode }}"
PLUGINS: "{{ minecraft_plugins | join(',') }}"
# Open server (no whitelist). Explicit FALSE so mc-image-helper writes white-list=false
# into server.properties on every boot (a stale TRUE would otherwise block all joins).
ENABLE_WHITELIST: "FALSE"
# Enables /tmp/minecraft-console-in so `podman exec minecraft mc-send-to-console "<cmd>"`
# works for admin commands.
CREATE_CONSOLE_IN_PIPE: "TRUE"

View File

@@ -1,4 +1,13 @@
--- ---
- name: Create NPM directories
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: '0755'
loop:
- /opt/apps/npm
- /opt/apps/letsencrypt
- name: Deploy Nginx Proxy Manager - name: Deploy Nginx Proxy Manager
containers.podman.podman_container: containers.podman.podman_container:
image: "docker.io/jc21/nginx-proxy-manager:latest" image: "docker.io/jc21/nginx-proxy-manager:latest"

View File

@@ -4,6 +4,12 @@
# DNS record must be grey-cloud (Cloudflare 523 lesson from vpn.boxswapper.io), cert via NPM # DNS record must be grey-cloud (Cloudflare 523 lesson from vpn.boxswapper.io), cert via NPM
# Config is copied from ./wazuh-docker/config before first deploy # Config is copied from ./wazuh-docker/config before first deploy
- name: Create Wazuh config directory
ansible.builtin.file:
path: /opt/apps/wazuh/config
state: directory
mode: '0755'
- name: Copy Wazuh config files to host - name: Copy Wazuh config files to host
ansible.builtin.copy: ansible.builtin.copy:
src: ./wazuh-docker/config/ src: ./wazuh-docker/config/

View File

@@ -24,6 +24,12 @@
# wg-easy "Podman + nftables" tutorial. # wg-easy "Podman + nftables" tutorial.
# EXTERNAL ACCESS: router MUST forward UDP 51820 -> 192.168.0.98. Test from LTE, # EXTERNAL ACCESS: router MUST forward UDP 51820 -> 192.168.0.98. Test from LTE,
# not your LAN — NAT hairpin breaks public-IP handshakes from inside the network. # not your LAN — NAT hairpin breaks public-IP handshakes from inside the network.
- name: Create WireGuard data directory
ansible.builtin.file:
path: /opt/apps/wireguard
state: directory
mode: '0755'
- name: Deploy WireGuard Easy (wg-easy) - name: Deploy WireGuard Easy (wg-easy)
containers.podman.podman_container: containers.podman.podman_container:
name: wg-easy name: wg-easy

View File

@@ -16,6 +16,7 @@ directories:
- /opt/apps/wazuh/config/wazuh_dashboard - /opt/apps/wazuh/config/wazuh_dashboard
- /opt/apps/wazuh/config/wazuh_indexer - /opt/apps/wazuh/config/wazuh_indexer
- /opt/apps/minecraft - /opt/apps/minecraft
- /opt/apps/minecraft/data
## Jellyfin directories for media ## Jellyfin directories for media
@@ -74,7 +75,7 @@ minecraft_host: mc.boxswapper.io
minecraft_ip: 10.10.0.45 minecraft_ip: 10.10.0.45
minecraft_version: latest minecraft_version: latest
minecraft_memory: 2G minecraft_memory: 2G
minecraft_motd: "Internal Apps Minecraft - mc.boxswapper.io" minecraft_motd: "Welcome Retards"
minecraft_difficulty: normal minecraft_difficulty: normal
minecraft_gamemode: survival minecraft_gamemode: survival
minecraft_max_players: 20 minecraft_max_players: 20