Skip to content

Latest commit

 

History

History
57 lines (47 loc) · 2.31 KB

README.md

File metadata and controls

57 lines (47 loc) · 2.31 KB

NixOS Foundry VTT

Host Foundry VTT on your NixOS server using NodeJS and Caddy. Caddy will take care of setting up and updating an SSL certificate automatically.

Prerequisites

Setup

  1. Log in to your account on https://foundryvtt.com, go to Purchased Licenses, select Linux/NodeJS as your Operating system, and click on Download.

  2. Copy the .zip file over to your server using e.g. scp or rsync and run the following (edit the version number).

    mkdir -p /opt/foundry/vtt /opt/foundry/data/Config /opt/livekit
    unzip FoundryVTT-xx.xxx.zip -d /opt/foundry/vtt
  3. Copy the contents of options.json to your server and replace the two mentions of domain.tld with your own domain name.

    nano /opt/foundry/data/Config/options.json
  4. Copy the contents of config.yaml to your server and replace the API key and secret with your own.

    nix-shell -p livekit --command "livekit-server generate-keys" > /opt/livekit/config.yaml
    nano /opt/livekit/config.yaml
  5. Copy the contents of caddy.nix to your server and replace domain.tld with your own domain name.

    nano /etc/nixos/caddy.nix
  6. Copy the contents of foundry.nix to your server.

    nano /etc/nixos/foundry.nix
  7. Add the two new .nix files to your configuration.nix file's import section.

    nano /etc/nixos/configuration.nix
    imports = [
        ./caddy.nix
        ./foundry.nix
    ];
  8. Rebuild NixOS to enable the new caddy, foundryvtt, and livekit services and your new Foundry VTT server should now be online and accessible!

    nixos-rebuild switch
  9. Lastly, when configuring your Foundry server, be sure to install the LiveKit AVClient module and enable it to use LiveKit instead of the built-in A/V client. The LiveKit Server Address will be your-domain.tld/livekit.