You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sudo apt-get update
sudo apt-get install nginx
# This is where you add the a web server config for the proxy pass
sudo vim /etc/nginx/sites-available/foundryvtt
# Set proxyPort value to the port (either 443 or 80)
vim ~/foundrydata/Config/options.json
# Enable new site
sudo ln -s /etc/nginx/sites-available/foundryvtt /etc/nginx/sites-enabled/
# Test your configuration file
sudo service nginx conftest
# Start Nginx
sudo service nginx start
# Stop Nginx
sudo service nginx stop
# Restart Nginx
sudo service nginx restart
# This goes in a file within /etc/nginx/sites-available/. By convention,# the filename would be either "your.domain.com" or "foundryvtt", but it# really does not matter as long as it's unique and descriptive for you.# Define Server
server {
# Enter your fully qualified domain name or leave blank
server_name your.domain.com;# Listen on port 443 using SSL certificates
listen 443 ssl;
ssl_certificate "/etc/letsencrypt/live/your.domain.com/fullchain.crt";
ssl_certificate_key "/etc/letsencrypt/live/your.domain.com/private.key";# Sets the Max Upload size to 300 MB
client_max_body_size 300M;# Proxy Requests to Foundry VTT
location / {
# Set proxy headers
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;# These are important to support WebSockets
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";# Make sure to set your Foundry VTT port number
proxy_pass http://localhost:30000;
}
}
# Optional, but recommend. Redirects all HTTP requests to HTTPS for you
server {
if ($host = your.domain.com) {
return 301 https://$host$request_uri;
}
listen 80;
listen [::]:80;
server_name your.domain.com;return 404;
}
Start the server and use systemctl status nginx.service to check that there is an active reverse proxy to HTTPS.
Use SSLForFree to get certificates. You might get three files and need to merge 2 files (i.e. cat certificate.crt ca_bundle.crt >> cert2.crt && sudo cp cert2.crt /etc/letsencrypt/live/your.domain.com/fullchain.crt && sudo cp private.key /etc/letsencrypt/live/your.domain.com/private.key) before adding it to the NGINX site config for FoundryVTT.
Install Certbot, which you have to run when the SSL certificates expire (probably 90 days if using SSL For Free).
Installing FVTT-Witcher
Add foundryconfig.json to the base game. This file is usually git ignored by default.
Ensure that you run npm update instead of npm install, due to its use of its typings package being stored in GitLab instead of being registered on NPM.
Ensure the custom game system has dist/ not gitignored so that the distribution is available when pasting the game system system.json in the FoundryVTT Administrator panel.
Build and package it, ensure that the download is system.json points to the src .zip file
{
"dataPath": "$YOUR_DIR_WHERE_THIS_REPO_IS/foundrydata", // Where foundryvtt/ is on the same level"systemName": "$NAME_OF_THE_GAME_SYSTEM",
"repository": "https://github.com/$GITHUB_USERNAME/$GITHUB_REPO_NAME",
"rawURL": "https://raw.githubusercontent.com/$GITHUB_USERNAME/$GITHUB_REPO_NAME",
"downloadURL": "https://github.com/$GITHUB_USERNAME/$GITHUB_REPO_NAME/raw"
}
{ "dataPath": "$YOUR_DIR_WHERE_THIS_REPO_IS/foundrydata", // Where foundryvtt/ is on the same level "systemName": "$NAME_OF_THE_GAME_SYSTEM", "repository": "https://github.com/$GITHUB_USERNAME/$GITHUB_REPO_NAME", "rawURL": "https://raw.githubusercontent.com/$GITHUB_USERNAME/$GITHUB_REPO_NAME", "downloadURL": "https://github.com/$GITHUB_USERNAME/$GITHUB_REPO_NAME/raw" }