Merge pull request #5 from ediblerope/claude/setup-vrising-docker-server-c4zIe
Add V-Rising dedicated server via Docker
This commit is contained in:
commit
93bb85d2af
2 changed files with 63 additions and 30 deletions
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
# Services #
|
# Services #
|
||||||
./services/server-permissions.nix
|
./services/server-permissions.nix
|
||||||
#./services/game-servers.nix
|
./services/game-servers.nix
|
||||||
./services/qbittorrent-nox.nix
|
./services/qbittorrent-nox.nix
|
||||||
./services/nginx.nix
|
./services/nginx.nix
|
||||||
./services/go2rtc.nix
|
./services/go2rtc.nix
|
||||||
|
|
|
||||||
|
|
@ -1,36 +1,69 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") {
|
config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") {
|
||||||
## <----- HYTALE ----> ##
|
## <----- V-RISING ----> ##
|
||||||
systemd.services.hytale-server = {
|
virtualisation.docker.enable = true;
|
||||||
description = "Hytale Dedicated Server";
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
systemd.tmpfiles.rules = [
|
||||||
after = [ "network.target" ];
|
"d /var/lib/v-rising 0755 root root -"
|
||||||
|
"d /var/lib/v-rising/server 0755 root root -"
|
||||||
path = with pkgs; [ bash jdk unzip gawk gnugrep coreutils screen ]; # Added screen
|
"d /var/lib/v-rising/persistentdata 0755 root root -"
|
||||||
|
];
|
||||||
environment = {
|
|
||||||
HYTALE_MEMORY = "8G";
|
virtualisation.oci-containers = {
|
||||||
};
|
backend = "docker";
|
||||||
|
containers.v-rising = {
|
||||||
serviceConfig = {
|
image = "trueosiris/vrising:latest";
|
||||||
Type = "forking"; # Changed from "simple"
|
|
||||||
User = "fred";
|
volumes = [
|
||||||
Group = "users";
|
"/var/lib/v-rising/server:/mnt/vrising/server"
|
||||||
WorkingDirectory = "/home/fred/docker/hytale-server/Server";
|
"/var/lib/v-rising/persistentdata:/mnt/vrising/persistentdata"
|
||||||
ExecStart = "${pkgs.screen}/bin/screen -dmS hytale /home/fred/docker/hytale-server/start-hytale.sh";
|
];
|
||||||
ExecStop = "${pkgs.screen}/bin/screen -S hytale -X stuff 'stop^M'";
|
|
||||||
RemainAfterExit = "yes";
|
ports = [
|
||||||
Restart = "on-failure";
|
"9876:9876/udp"
|
||||||
RestartSec = "10s";
|
"9877:9877/udp"
|
||||||
TimeoutStopSec = "30s";
|
];
|
||||||
|
|
||||||
# Security hardening
|
environment = {
|
||||||
NoNewPrivileges = true;
|
TZ = "Europe/Stockholm";
|
||||||
PrivateTmp = true;
|
SERVERNAME = "FredOS V-Rising";
|
||||||
|
WORLDNAME = "world1";
|
||||||
|
# SERVERPASSWORD = "";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedUDPPorts = [ 5520 ];
|
## <----- HYTALE ----> ##
|
||||||
|
# systemd.services.hytale-server = {
|
||||||
|
# description = "Hytale Dedicated Server";
|
||||||
|
# wantedBy = [ "multi-user.target" ];
|
||||||
|
# after = [ "network.target" ];
|
||||||
|
#
|
||||||
|
# path = with pkgs; [ bash jdk unzip gawk gnugrep coreutils screen ];
|
||||||
|
#
|
||||||
|
# environment = {
|
||||||
|
# HYTALE_MEMORY = "8G";
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# serviceConfig = {
|
||||||
|
# Type = "forking";
|
||||||
|
# User = "fred";
|
||||||
|
# Group = "users";
|
||||||
|
# WorkingDirectory = "/home/fred/docker/hytale-server/Server";
|
||||||
|
# ExecStart = "${pkgs.screen}/bin/screen -dmS hytale /home/fred/docker/hytale-server/start-hytale.sh";
|
||||||
|
# ExecStop = "${pkgs.screen}/bin/screen -S hytale -X stuff 'stop^M'";
|
||||||
|
# RemainAfterExit = "yes";
|
||||||
|
# Restart = "on-failure";
|
||||||
|
# RestartSec = "10s";
|
||||||
|
# TimeoutStopSec = "30s";
|
||||||
|
#
|
||||||
|
# # Security hardening
|
||||||
|
# NoNewPrivileges = true;
|
||||||
|
# PrivateTmp = true;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
|
networking.firewall.allowedUDPPorts = [ 9876 9877 ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue