├── .vscode └── settings.json ├── db_updates ├── v1.1.17 │ ├── data.json │ └── v1.1.17.sql ├── v1.1.31 │ ├── data.json │ └── v1.1.31.sql ├── v1.1.13 │ ├── data.json │ └── v1.1.13.sql └── manifest.json ├── notifications ├── ssm.shutdown.hbs └── ssm.startup.hbs ├── entry.sh ├── public ├── images │ ├── logonbg.png │ ├── ssm_logo128.png │ ├── ssm_logo256.ico │ ├── ssm_logo256.png │ ├── ssm_logo64.png │ ├── favicons │ │ ├── favicon.ico │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── mstile-150x150.png │ │ ├── apple-touch-icon.png │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-256x256.png │ │ ├── browserconfig.xml │ │ ├── site.webmanifest │ │ └── safari-pinned-tab.svg │ └── ssm_logo128_outline.png ├── js │ └── date-euro.js ├── modals │ ├── server-mods-success.html │ ├── server-mods-error.html │ ├── server-action-success.html │ ├── server-action-error.html │ ├── server-settings-error.html │ ├── server-settings-success.html │ ├── server-settings-confirm.html │ ├── add-role-modal.html │ ├── server-action-confirm.html │ ├── add-user-modal.html │ ├── server-action-installsf.html │ ├── server-session-new.html │ ├── metrics-opt-in.html │ ├── add-apikey-modal.html │ ├── add-webhook-modal.html │ ├── create-server-modal.html │ └── inital-setup.html └── css │ ├── login.min.css │ └── login.css ├── test ├── test6.js ├── test2.js ├── test7.js ├── test3.js ├── test9.js ├── test4.js ├── test.js ├── test8.js └── test5.js ├── server ├── server_cleanup.js ├── server_logger.js ├── server_cloud.js ├── ms_agent │ └── server_gameconfig.js ├── server_docker_api.js ├── server_agent_app.js └── server_notifcation_handler.js ├── .gitignore ├── tools ├── release_app.sh ├── clean-css.sh ├── variables.sh ├── configure_app.sh ├── prerelease-checks.sh ├── package │ ├── ci_deploy_release.sh │ ├── ci_compile_linux.sh │ ├── ci_compile_windows.sh │ ├── package_app.sh │ └── package_linux.sh ├── update_SSM_exe.sh ├── interactive_test.sh ├── build_app.sh └── compile.sh ├── README.md ├── objects ├── notifications │ ├── obj_notify_ssmstartup.js │ ├── obj_notify_ssmshutdown.js │ ├── obj_notify_agentcreated.js │ ├── obj_notify_agentstarted.js │ ├── obj_notify_agentshutdown.js │ ├── obj_notify_serveroffline.js │ ├── obj_notify_serverrunning.js │ ├── obj_notify_serverstarting.js │ └── obj_notify_serverstopping.js ├── configs │ ├── config_game.js │ └── config_engine.js ├── errors │ ├── error_sml.js │ ├── error_steamcmd.js │ └── error_steamcmdrun.js ├── obj_user_role.js ├── obj_webhook_notification_interface.js ├── obj_user.js ├── obj_notification.js ├── obj_discord_notification_interface.js ├── obj_notification_interface.js └── obj_agent.js ├── routes └── api │ ├── index.js │ ├── ficsitinfo.js │ ├── logs.js │ ├── info.js │ ├── admin.js │ └── public.js ├── views ├── logout.hbs ├── index.hbs ├── servers.hbs ├── settings.hbs ├── backups.hbs ├── users.hbs ├── layouts │ └── login.hbs ├── login.hbs ├── saves.hbs ├── changedefaultpass.hbs ├── logs.hbs └── admin.hbs ├── .release-it.json ├── .github ├── dependabot.yml └── ISSUE_TEMPLATE │ └── bug_report.md ├── Dockerfile ├── src ├── app.js ├── logger.js ├── cache.js ├── page_logs.js ├── api_proxy.js └── page_backups.js ├── LICENSE ├── uninstall.sh ├── .gitlab-ci.yml └── package.json /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /db_updates/v1.1.17/data.json: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /db_updates/v1.1.31/data.json: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /db_updates/v1.1.13/data.json: -------------------------------------------------------------------------------- 1 | ["test"] 2 | -------------------------------------------------------------------------------- /notifications/ssm.shutdown.hbs: -------------------------------------------------------------------------------- 1 | {{{Title}}} 2 | 3 | {{{Text}}} -------------------------------------------------------------------------------- /notifications/ssm.startup.hbs: -------------------------------------------------------------------------------- 1 | {{{Title}}} 2 | 3 | {{{Text}}} -------------------------------------------------------------------------------- /entry.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | su - ssm -c "/opt/SSM/SatisfactoryServerManager --agent" 4 | -------------------------------------------------------------------------------- /db_updates/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "patches": ["v1.1.12", "v1.1.13", "v1.1.17", "v1.1.31"] 3 | } 4 | -------------------------------------------------------------------------------- /db_updates/v1.1.13/v1.1.13.sql: -------------------------------------------------------------------------------- 1 | UPDATE config SET config_value = 'v1.1.13' WHERE config_key='version'; -------------------------------------------------------------------------------- /public/images/logonbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrhid6/SatisfactoryServerManager/HEAD/public/images/logonbg.png -------------------------------------------------------------------------------- /test/test6.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | 3 | global.__basedir = path.resolve(path.join(__dirname, "../")); 4 | -------------------------------------------------------------------------------- /public/images/ssm_logo128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrhid6/SatisfactoryServerManager/HEAD/public/images/ssm_logo128.png -------------------------------------------------------------------------------- /public/images/ssm_logo256.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrhid6/SatisfactoryServerManager/HEAD/public/images/ssm_logo256.ico -------------------------------------------------------------------------------- /public/images/ssm_logo256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrhid6/SatisfactoryServerManager/HEAD/public/images/ssm_logo256.png -------------------------------------------------------------------------------- /public/images/ssm_logo64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrhid6/SatisfactoryServerManager/HEAD/public/images/ssm_logo64.png -------------------------------------------------------------------------------- /public/images/favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrhid6/SatisfactoryServerManager/HEAD/public/images/favicons/favicon.ico -------------------------------------------------------------------------------- /public/images/ssm_logo128_outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrhid6/SatisfactoryServerManager/HEAD/public/images/ssm_logo128_outline.png -------------------------------------------------------------------------------- /public/images/favicons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrhid6/SatisfactoryServerManager/HEAD/public/images/favicons/favicon-16x16.png -------------------------------------------------------------------------------- /public/images/favicons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrhid6/SatisfactoryServerManager/HEAD/public/images/favicons/favicon-32x32.png -------------------------------------------------------------------------------- /public/images/favicons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrhid6/SatisfactoryServerManager/HEAD/public/images/favicons/mstile-150x150.png -------------------------------------------------------------------------------- /public/images/favicons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrhid6/SatisfactoryServerManager/HEAD/public/images/favicons/apple-touch-icon.png -------------------------------------------------------------------------------- /server/server_cleanup.js: -------------------------------------------------------------------------------- 1 | const Mrhid6Utils = require("mrhid6utils"); 2 | 3 | const Cleanup = new Mrhid6Utils.Cleanup(); 4 | 5 | module.exports = Cleanup; 6 | -------------------------------------------------------------------------------- /public/images/favicons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrhid6/SatisfactoryServerManager/HEAD/public/images/favicons/android-chrome-192x192.png -------------------------------------------------------------------------------- /public/images/favicons/android-chrome-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrhid6/SatisfactoryServerManager/HEAD/public/images/favicons/android-chrome-256x256.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | scripts/*.exe 3 | scripts/Temp 4 | build 5 | assets/version.txt 6 | release-builds 7 | tools/TOKEN.txt 8 | tools/DOCKERPASS.txt 9 | tools/app_config.txt 10 | *.log 11 | 12 | tools/app_config.txt 13 | log.txt -------------------------------------------------------------------------------- /tools/release_app.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | CURDIR=$(dirname "$(readlink -f "$0")") 3 | BASEDIR=$(readlink -f "$CURDIR/..") 4 | 5 | . ${BASEDIR}/tools/variables.sh 6 | 7 | cd ${BASEDIR} 8 | 9 | bash ${CURDIR}/build_app.sh -i -u 10 | 11 | release-it --ci -VV 12 | -------------------------------------------------------------------------------- /public/images/favicons/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #2d89ef 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SatisfactoryServerManager 2 | 3 | > ![#f03c15](https://placehold.co/15x15/f03c15/f03c15.png) **IMPORTANT:** SSM Is being deprecated and being replaced with SSM Cloud 4 | 5 | ## SSM Cloud 6 | 7 | SSM cloud is the replacement for SSM. Go to [SSM Cloud](https://ssmcloud.hostxtra.co.uk) and signup for free. 8 | 9 | **SSM will no longer be updated so use at your own risk!** 10 | -------------------------------------------------------------------------------- /test/test2.js: -------------------------------------------------------------------------------- 1 | const { SatisfactoryInstall } = require("satisfactory-mod-launcher-api"); 2 | 3 | const sfInstall = new SatisfactoryInstall( 4 | "Satisfactory Early Access", 5 | "109075.0.0", 6 | "C:\\tmp\\SSM_Temp", 7 | "FactoryGame.exe" 8 | ); 9 | 10 | console.log(sfInstall.mods); 11 | sfInstall._getInstalledMods().then((mods) => { 12 | console.log(mods); 13 | }); 14 | -------------------------------------------------------------------------------- /test/test7.js: -------------------------------------------------------------------------------- 1 | const Config = require("../server/server_config"); 2 | const ModHandler = require("../server/ms_agent/server_new_mod_handler"); 3 | 4 | Config.load() 5 | .then(() => { 6 | return ModHandler.init(); 7 | }) 8 | .then(() => { 9 | return; //ModHandler.InstallMod("RefinedPower"); 10 | }) 11 | .catch((err) => { 12 | console.log(err); 13 | }); 14 | -------------------------------------------------------------------------------- /objects/notifications/obj_notify_ssmstartup.js: -------------------------------------------------------------------------------- 1 | const Notification = require("../obj_notification"); 2 | 3 | class ObjNotifySSMStartup extends Notification { 4 | constructor() { 5 | super("ssm.startup"); 6 | 7 | this.set("title", "SSM Start Up Event"); 8 | this.set("description", "SSM Core Has Just Been Started!"); 9 | } 10 | } 11 | 12 | module.exports = ObjNotifySSMStartup; 13 | -------------------------------------------------------------------------------- /routes/api/index.js: -------------------------------------------------------------------------------- 1 | var express = require("express"); 2 | var router = express.Router(); 3 | 4 | router.use("/info", require("./info")); 5 | router.use("/logs", require("./logs")); 6 | router.use("/ficsitinfo", require("./ficsitinfo")); 7 | router.use("/agent", require("./agent")); 8 | router.use("/public", require("./public")); 9 | router.use("/admin", require("./admin")); 10 | 11 | module.exports = router; 12 | -------------------------------------------------------------------------------- /objects/notifications/obj_notify_ssmshutdown.js: -------------------------------------------------------------------------------- 1 | const Notification = require("../obj_notification"); 2 | 3 | class ObjNotifySSMShutdown extends Notification { 4 | constructor() { 5 | super("ssm.shutdown"); 6 | 7 | this.set("title", "SSM Shutdown Event"); 8 | this.set("description", "SSM Core Has Just Been Shutdown!"); 9 | } 10 | } 11 | 12 | module.exports = ObjNotifySSMShutdown; 13 | -------------------------------------------------------------------------------- /tools/clean-css.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" 3 | BASEDIR="${DIR}/.." 4 | 5 | CSS_DIR="${BASEDIR}/public/css" 6 | 7 | echo -en "\nMain CSS ... " 8 | cleancss -o ${CSS_DIR}/main.min.css ${CSS_DIR}/main.css 9 | echo -en "Finished!" 10 | 11 | echo -en "\nLogin CSS ... " 12 | cleancss -o ${CSS_DIR}/login.min.css ${CSS_DIR}/login.css 13 | echo -en "Finished!\n\n" 14 | -------------------------------------------------------------------------------- /views/logout.hbs: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |
6 |

Logged Out Of SSM

7 |

8 | You have been logged out of SSM

9 | Log Back In 10 |

11 |
12 |
-------------------------------------------------------------------------------- /.release-it.json: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "tagName": "v${version}", 4 | "requireCleanWorkingDir": false 5 | }, 6 | "npm": { 7 | "publish": false 8 | }, 9 | "github": { 10 | "release": true, 11 | "assets": ["release-builds/*.zip", "release-builds/*.tar.gz"] 12 | }, 13 | "hooks": { 14 | "before:release": [ 15 | "bash ./tools/package/package_app.sh --version v${version} --windows --linux", 16 | "bash ./tools/prerelease-checks.sh --version v${version}" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /db_updates/v1.1.31/v1.1.31.sql: -------------------------------------------------------------------------------- 1 | 2 | ALTER TABLE agents ADD COLUMN agent_running INTEGER NOT NULL DEFAULT 0; 3 | ALTER TABLE agents ADD COLUMN agent_active INTEGER NOT NULL DEFAULT 0; 4 | ALTER TABLE agents ADD COLUMN agent_info TEXT NOT NULL DEFAULT ''; 5 | ALTER TABLE agents ADD COLUMN agent_memory INT NOT NULL DEFAULT 1073741824; 6 | 7 | INSERT INTO permissions(perm_name) VALUES("api.servers"); 8 | INSERT INTO permissions(perm_name) VALUES("api.serveractions"); 9 | 10 | UPDATE config SET config_value = 'v1.1.31' WHERE config_key='version'; -------------------------------------------------------------------------------- /objects/notifications/obj_notify_agentcreated.js: -------------------------------------------------------------------------------- 1 | const Notification = require("../obj_notification"); 2 | 3 | class ObjNotifyAgentCreated extends Notification { 4 | constructor(AgentName) { 5 | super("agent.created"); 6 | 7 | this.set("title", "A New SSM Agent Was Created!"); 8 | this.set("description", "A New SSM Agent Was Successfully Created!"); 9 | this.set("details", { 10 | agent_name: AgentName, 11 | }); 12 | } 13 | } 14 | 15 | module.exports = ObjNotifyAgentCreated; 16 | -------------------------------------------------------------------------------- /objects/notifications/obj_notify_agentstarted.js: -------------------------------------------------------------------------------- 1 | const Notification = require("../obj_notification"); 2 | 3 | class ObjNotifyAgentStarted extends Notification { 4 | constructor(Agent) { 5 | super("agent.started"); 6 | 7 | this.set("title", "A SSM Agent Was Started!"); 8 | this.set("description", "A SSM Agent Was Successfully Started!"); 9 | this.set("details", { 10 | agent_name: Agent.getDisplayName(), 11 | }); 12 | } 13 | } 14 | 15 | module.exports = ObjNotifyAgentStarted; 16 | -------------------------------------------------------------------------------- /objects/notifications/obj_notify_agentshutdown.js: -------------------------------------------------------------------------------- 1 | const Notification = require("../obj_notification"); 2 | 3 | class ObjNotifyAgentShutdown extends Notification { 4 | constructor(Agent) { 5 | super("agent.shutdown"); 6 | 7 | this.set("title", "A SSM Agent Was Shutdown!"); 8 | this.set("description", "A SSM Agent Was Successfully Shutdown!"); 9 | this.set("details", { 10 | agent_name: Agent.getDisplayName(), 11 | }); 12 | } 13 | } 14 | 15 | module.exports = ObjNotifyAgentShutdown; 16 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | open-pull-requests-limit: 10 8 | ignore: 9 | - dependency-name: express-handlebars 10 | versions: 11 | - 5.2.1 12 | - dependency-name: systeminformation 13 | versions: 14 | - 5.0.11 15 | - 5.0.6 16 | - 5.0.8 17 | - 5.0.9 18 | - 5.1.2 19 | - 5.2.1 20 | - 5.2.5 21 | - 5.3.1 22 | - 5.3.2 23 | - dependency-name: lodash 24 | versions: 25 | - 4.17.20 26 | -------------------------------------------------------------------------------- /tools/variables.sh: -------------------------------------------------------------------------------- 1 | export GITHUB_TOKEN="$(cat ./tools/TOKEN.txt)" 2 | export DOCKER_PASS="$(cat ./tools/DOCKERPASS.txt)" 3 | 4 | SSH_CMD="ssh -q -o HostKeyAlgorithms=ssh-rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" 5 | SCP_CMD="scp -qpr -o HostKeyAlgorithms=ssh-rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" 6 | 7 | function printDots() { 8 | text=$1 9 | length=$2 10 | textlen=${#text} 11 | 12 | newlength=$((length - textlen - 1)) 13 | 14 | v=$(printf "%-${newlength}s" ".") 15 | echo -en "${text} ${v// /.} " 16 | } 17 | -------------------------------------------------------------------------------- /db_updates/v1.1.17/v1.1.17.sql: -------------------------------------------------------------------------------- 1 | 2 | UPDATE permissions SET perm_name='page.user.dashboard' WHERE perm_name='page.dashboard'; 3 | UPDATE permissions SET perm_name='page.user.servers' WHERE perm_name='page.servers'; 4 | UPDATE permissions SET perm_name='page.user.mods' WHERE perm_name='page.mods'; 5 | UPDATE permissions SET perm_name='page.user.logs' WHERE perm_name='page.logs'; 6 | UPDATE permissions SET perm_name='page.user.saves' WHERE perm_name='page.saves'; 7 | UPDATE permissions SET perm_name='page.user.admin' WHERE perm_name='page.admin'; 8 | 9 | UPDATE config SET config_value = 'v1.1.17' WHERE config_key='version'; -------------------------------------------------------------------------------- /public/images/favicons/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SSM", 3 | "short_name": "SSM", 4 | "icons": [ 5 | { 6 | "src": "/public/images/favicons/android-chrome-192x192.png?v=9B95M7ezK3", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/public/images/favicons/android-chrome-256x256.png?v=9B95M7ezK3", 12 | "sizes": "256x256", 13 | "type": "image/png" 14 | } 15 | ], 16 | "theme_color": "#ffffff", 17 | "background_color": "#ffffff", 18 | "display": "standalone" 19 | } 20 | -------------------------------------------------------------------------------- /objects/notifications/obj_notify_serveroffline.js: -------------------------------------------------------------------------------- 1 | const Notification = require("../obj_notification"); 2 | 3 | class ObjNotifyServerOffline extends Notification { 4 | constructor(Agent) { 5 | super("server.offline"); 6 | 7 | this.set("title", "Satisfactory Server Is Offline!"); 8 | this.set( 9 | "description", 10 | "The Satisfactory Dedicated Server Hosted On This Agent Is Offline!" 11 | ); 12 | this.set("details", { 13 | agent_name: Agent.getDisplayName(), 14 | }); 15 | } 16 | } 17 | 18 | module.exports = ObjNotifyServerOffline; 19 | -------------------------------------------------------------------------------- /objects/notifications/obj_notify_serverrunning.js: -------------------------------------------------------------------------------- 1 | const Notification = require("../obj_notification"); 2 | 3 | class ObjNotifyServerRunning extends Notification { 4 | constructor(Agent) { 5 | super("server.running"); 6 | 7 | this.set("title", "Satisfactory Server Is Running!"); 8 | this.set( 9 | "description", 10 | "The Satisfactory Dedicated Server Hosted On This Agent Is Running!" 11 | ); 12 | this.set("details", { 13 | agent_name: Agent.getDisplayName(), 14 | }); 15 | } 16 | } 17 | 18 | module.exports = ObjNotifyServerRunning; 19 | -------------------------------------------------------------------------------- /objects/notifications/obj_notify_serverstarting.js: -------------------------------------------------------------------------------- 1 | const Notification = require("../obj_notification"); 2 | 3 | class ObjNotifyServerStarting extends Notification { 4 | constructor(Agent) { 5 | super("server.starting"); 6 | 7 | this.set("title", "Satisfactory Server Is Starting!"); 8 | this.set( 9 | "description", 10 | "The Satisfactory Dedicated Server Hosted On This Agent Is Starting!" 11 | ); 12 | this.set("details", { 13 | agent_name: Agent.getDisplayName(), 14 | }); 15 | } 16 | } 17 | 18 | module.exports = ObjNotifyServerStarting; 19 | -------------------------------------------------------------------------------- /objects/notifications/obj_notify_serverstopping.js: -------------------------------------------------------------------------------- 1 | const Notification = require("../obj_notification"); 2 | 3 | class ObjNotifyServerStopping extends Notification { 4 | constructor(Agent) { 5 | super("server.stopping"); 6 | 7 | this.set("title", "Satisfactory Server Is Stopping!"); 8 | this.set( 9 | "description", 10 | "The Satisfactory Dedicated Server Hosted On This Agent Is Stopping!" 11 | ); 12 | this.set("details", { 13 | agent_name: Agent.getDisplayName(), 14 | }); 15 | } 16 | } 17 | 18 | module.exports = ObjNotifyServerStopping; 19 | -------------------------------------------------------------------------------- /views/index.hbs: -------------------------------------------------------------------------------- 1 |
2 | 17 | 18 |
19 | 20 |
-------------------------------------------------------------------------------- /public/js/date-euro.js: -------------------------------------------------------------------------------- 1 | jQuery.extend( jQuery.fn.dataTableExt.oSort, { 2 | "date-euro-pre": function ( a ) { 3 | var x; 4 | 5 | if ( $.trim(a) !== '' ) { 6 | var frDatea = $.trim(a).split(' '); 7 | var frTimea = (undefined != frDatea[1]) ? frDatea[1].split(':') : [00,00,00]; 8 | var frDatea2 = frDatea[0].split('/'); 9 | x = (frDatea2[2] + frDatea2[1] + frDatea2[0] + frTimea[0] + frTimea[1] + ((undefined != frTimea[2]) ? frTimea[2] : 0)) * 1; 10 | } 11 | else { 12 | x = Infinity; 13 | } 14 | 15 | return x; 16 | }, 17 | 18 | "date-euro-asc": function ( a, b ) { 19 | return a - b; 20 | }, 21 | 22 | "date-euro-desc": function ( a, b ) { 23 | return b - a; 24 | } 25 | } ); -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Server Information (please complete the following information):** 27 | - OS: [e.g. Ubuntu] 28 | - SSM Version: [e.g. v1.0.0] 29 | 30 | **Additional context** 31 | Add any other context about the problem here. 32 | -------------------------------------------------------------------------------- /server/server_logger.js: -------------------------------------------------------------------------------- 1 | const iLogger = require("mrhid6utils").Logger; 2 | const path = require("path"); 3 | const platform = process.platform; 4 | 5 | switch (platform) { 6 | case "win32": 7 | userDataPath = path.resolve( 8 | "C:\\ProgramData\\SatisfactoryServerManager" 9 | ); 10 | break; 11 | case "linux": 12 | case "darwin": 13 | userDataPath = path.resolve( 14 | path.join(require("os").homedir(), ".SatisfactoryServerManager") 15 | ); 16 | break; 17 | } 18 | 19 | class Logger extends iLogger { 20 | constructor() { 21 | super({ 22 | logBaseDirectory: path.join(userDataPath, "logs"), 23 | logName: "SSM", 24 | }); 25 | } 26 | } 27 | 28 | const logger = new Logger(); 29 | module.exports = logger; 30 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | FROM ubuntu:latest 3 | 4 | ARG DEBIAN_FRONTEND=noninteractive 5 | 6 | RUN apt-get -qq update -y && apt-get -qq upgrade -y 7 | 8 | RUN apt-get -qq install binutils software-properties-common libcap2-bin apt-utils wget curl htop dnsmasq -y 9 | RUN add-apt-repository multiverse 10 | RUN dpkg --add-architecture i386 11 | 12 | RUN apt-get -qq install lib32gcc-s1 -y 13 | RUN apt-get -qq update -y 14 | 15 | RUN useradd -m -u 9999 -s /bin/bash ssm 16 | 17 | RUN mkdir /opt/SSM 18 | VOLUME /opt/SSM 19 | 20 | COPY release-builds/linux/* /opt/SSM/ 21 | RUN chown -R ssm:ssm /opt/SSM 22 | 23 | RUN mkdir -p /home/ssm/.SatisfactoryServerManager && mkdir -p /home/ssm/.config/Epic/FactoryGame 24 | RUN chown -R ssm:ssm /home/ssm 25 | 26 | COPY entry.sh /entry.sh 27 | RUN chmod 755 /entry.sh 28 | 29 | RUN ls -l / 30 | 31 | EXPOSE 3000/tcp 32 | 33 | ENTRYPOINT [ "/entry.sh" ] 34 | -------------------------------------------------------------------------------- /test/test3.js: -------------------------------------------------------------------------------- 1 | const { Docker } = require("node-docker-api"); 2 | 3 | const platform = process.platform; 4 | 5 | let dockerSettings = { 6 | host: "http://127.0.0.1", 7 | port: 2375, 8 | }; 9 | 10 | if (platform != "win32") { 11 | dockerSettings = { 12 | socketPath: "/var/run/docker.sock", 13 | }; 14 | } 15 | 16 | /* 17 | const docker = new Docker(dockerSettings); 18 | 19 | docker.container.list({ 20 | all: 1 21 | }) 22 | .then(containers => { 23 | const container = containers[0]; 24 | const VolumeID = container.data.Mounts[0].Name; 25 | return docker.volume.get(VolumeID); 26 | }).then(volume => { 27 | console.log(volume) 28 | /*container.delete({ 29 | force: true 30 | }) 31 | }) 32 | .catch(error => console.log(error)); 33 | 34 | 35 | 36 | docker.volume.list({ 37 | all: 1 38 | }).then(volumes => { 39 | console.log(volumes) 40 | }).catch(console.log) 41 | */ 42 | -------------------------------------------------------------------------------- /objects/configs/config_game.js: -------------------------------------------------------------------------------- 1 | const iConfig = require("mrhid6utils").Config; 2 | 3 | class ObjGameConfig extends iConfig { 4 | constructor(configDir) { 5 | super({ 6 | useExactPath: true, 7 | configBaseDirectory: configDir, 8 | configName: "Game", 9 | configType: "ini", 10 | createConfig: true, 11 | }); 12 | } 13 | 14 | setDefaultValues = async () => { 15 | super.set( 16 | "/Script/Engine.GameNetworkManager.TotalNetBandwidth", 17 | 104857600 18 | ); 19 | super.set( 20 | "/Script/Engine.GameNetworkManager.MaxDynamicBandwidth", 21 | 104857600 22 | ); 23 | super.set( 24 | "/Script/Engine.GameNetworkManager.MinDynamicBandwidth", 25 | 104857600 26 | ); 27 | 28 | super.get("/Script/Engine.GameSession.MaxPlayers", 20); 29 | }; 30 | } 31 | 32 | module.exports = ObjGameConfig; 33 | -------------------------------------------------------------------------------- /test/test9.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | 3 | global.__basedir = path.resolve(path.join(__dirname, "../")); 4 | 5 | const Config = require("../server/server_config"); 6 | const Logger = require("../server/server_logger"); 7 | const DB = require("../server/server_db"); 8 | const ServerApp = require("../server/server_app"); 9 | 10 | Number.prototype.pad = function (width, z) { 11 | let n = this; 12 | z = z || "0"; 13 | n = n + ""; 14 | return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n; 15 | }; 16 | 17 | String.prototype.IsJsonString = () => { 18 | try { 19 | JSON.parse(this); 20 | } catch (e) { 21 | return false; 22 | } 23 | return true; 24 | }; 25 | 26 | Config.load() 27 | .then(() => { 28 | Logger.init(); 29 | return DB.init(); 30 | }) 31 | .then(() => { 32 | return ServerApp.API_GenerateDebugReport(); 33 | }) 34 | .then(() => { 35 | console.log("Done"); 36 | }); 37 | -------------------------------------------------------------------------------- /views/servers.hbs: -------------------------------------------------------------------------------- 1 |
2 | 7 |
8 |
9 | 10 |
Server List
11 |
12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
NameRunningActiveVersionOptions
24 |
25 |
26 |
-------------------------------------------------------------------------------- /test/test4.js: -------------------------------------------------------------------------------- 1 | const Config = require("../server/server_config"); 2 | const iSteamCMD = require("../server/server_steamcmd"); 3 | 4 | const { 5 | SteamCMDAlreadyInstalled, 6 | } = require("../objects/errors/error_steamcmd"); 7 | 8 | Config.load().then(() => { 9 | const SteamCMD = new iSteamCMD(); 10 | SteamCMD.init(Config.get("ssm.steamcmd")); 11 | 12 | SteamCMD.download() 13 | .then(() => { 14 | console.log("SteamCMD Downloaded!"); 15 | return SteamCMD.run(); 16 | }) 17 | .then(() => { 18 | console.log("SteamCMD Initialised!"); 19 | }) 20 | .then(() => { 21 | console.log("SteamCMD Installed SF Server!"); 22 | }) 23 | .catch((err) => { 24 | if (!(err instanceof SteamCMDAlreadyInstalled)) { 25 | console.log(err); 26 | } 27 | }); 28 | 29 | SteamCMD.getAppInfo(1690800).then((output) => { 30 | console.log(JSON.stringify(output, null, 4)); 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /views/settings.hbs: -------------------------------------------------------------------------------- 1 |
2 |

Settings

3 | 4 |
5 | Heads up! This page has not yet been updated! 6 |
7 |
8 |
9 | 10 |
Webhooks
11 |
12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
IDNameEnabledTypeOptions
24 |
25 |
26 | 27 |
-------------------------------------------------------------------------------- /views/backups.hbs: -------------------------------------------------------------------------------- 1 |
2 | 3 | 13 | 14 |
15 |
16 |
Backups
17 | 18 |
19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
File NameCreatedSizeOptions
30 |
31 |
32 |
-------------------------------------------------------------------------------- /src/app.js: -------------------------------------------------------------------------------- 1 | const PageHandler = require("./page_handler"); 2 | const Logger = require("./logger"); 3 | 4 | Date.prototype.getMonthName = function () { 5 | const monthNames = [ 6 | "Jan", 7 | "Feb", 8 | "Mar", 9 | "Apr", 10 | "May", 11 | "Jun", 12 | "Jul", 13 | "Aug", 14 | "Sep", 15 | "Oct", 16 | "Nov", 17 | "Dec", 18 | ]; 19 | return monthNames[this.getMonth()]; 20 | }; 21 | 22 | Number.prototype.pad = function (width, z) { 23 | let n = this; 24 | z = z || "0"; 25 | n = n + ""; 26 | return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n; 27 | }; 28 | 29 | Number.prototype.toDecimal = function () { 30 | return this.toFixed(2); 31 | }; 32 | 33 | String.prototype.trunc = 34 | String.prototype.trunc || 35 | function (n) { 36 | return this.length > n ? this.substr(0, n - 1) + "…" : this; 37 | }; 38 | 39 | function main() { 40 | Logger.displayBanner(); 41 | PageHandler.init(); 42 | } 43 | 44 | $(document).ready(() => { 45 | main(); 46 | }); 47 | -------------------------------------------------------------------------------- /public/modals/server-mods-success.html: -------------------------------------------------------------------------------- 1 |