Generic Custom Configuration issue while setting up Foundry VTT

OS Name/Version: Ubuntu 22.04.1 LTS

Product Name/Version: AMP v2.4.0.6 “Halimede”

Problem Description:

I am attempting to run the Foundry VTT dedicated server software through AMP, and there are a number of issues I’m running into in an effort to get it working with a custom configuration. Granted my experience with the more technical end of server hosting is limited, so I apologize in advance for my ignorance. My issues are as follows:

1: The software is run using the “node” command through nodejs, and as such I’m not sure what I should use as an “executable” to get even an attempted launch in instance.

2: The software requires a separate “data” folder for retaining custom modules. This folder cannot be located in the same root directory as the rest of the software’s files. I’m unsure how to setup the software launch directory to be nested in the virtual drive for the instance, such that the virtual drive has a separate directory for this “data”. I see a few parameters in the config generator that appear to be what I’m after, but there’s no way to modify them.

The install process is detailed at Installation Guide | Foundry Virtual Tabletop
They recommend PM2 for this purpose, but I’d much rather use AMP as I appreciate the relative ease of use and remote access from multiple users/ranks. If there’s any chance that I could get some assistance with this it’d be much appreciated.

Steps to reproduce:

  • Step 1 Generate config with what relevant information is available
  • Step 2 Create an instance with custom config, and import the install files
  • Step 3 Attempt to launch software with AMP (failure to launch, no error)

Actions taken to resolve so far:

launch command for context, house within the directory containing all the appropriate install files and noted “resources” directory:
node resources/app/main.js --dataPath=“path to ‘data’ directory”

1: attempting to configure with the .exe in the install files (though it needs to be run through nodejs, not the exe)
2: attempting to configure with main.js as the executable (needs nested in the “node” command while located in the relevant directory)
3: get confused when I can’t ignore the executable field in the configurator.

I’m not positive I understand your situation exactly, but I think I understand what you are trying to do.

I don’t have the install files to test this, but it looks somewhat similar to Necesse, which runs on Java.

Step 1 - Create the config file in advance, download it from somewhere (like your github), and use it as a template. Check out the necessemetaconfig.json for an example of that

Step 2 - Since it looks like you need to download your licensed files from your Foundry web portal, I don’t know that your template would be able to download the files directly. You may be able to provide your unique download link via a server setting, but I don’t know if that will work. Lastly, you could upload a zip file before hitting update. Then just extract the files with an update stage.

You can create the data directory with the update stages after unzipping the install files.

step 3 - Check out the Necesse application, it launches java, and the command arguments specify what file and other run options. something like:

App.ExecutableLinux=[path to node]/node
App.CommandLineArgs=resources/app/main.js --dataPath=“{{$FullBaseDir}}foundrydata”

Hopefully this is helpful, let me know if there are other questions.

Edit: updated instructions from Greelan’s correct approach. I was copying from the install guide and forgot to update the path variable to the actual AMP one.

You’d want to keep your data in the instance datastore, so it would be --dataPath=./foundrydata to specify a data folder in the working dir (I assume that is how the server would treat it). Otherwise specify a full path with --dataPath="{{$FullBaseDir}}foundrydata"

You could also specify the cubecoders/ampbase:node docker image, meaning the user wouldn’t have to bother with installing nodejs on the host and just use docker

BTW, just saw your comment in 2. Why not?

If that is really an issue, then you can create two directories in the base dir - server and data.

Download and unzip the server files into the server dir, and specify the data dir as the datapath.

Check out Vintage Story, it is very similar in structure, including that it needs something else (in that case mono) to run the exe: AMPTemplates/vintage-story.kvp at main · CubeCoders/AMPTemplates · GitHub. In fact I’d suggest your best bet is to copy Vintage Story and adapt, rather than trying to use the online configurator, which is outdated and incomplete.