Giving FoundryVTT Another Chance (thanks to SSH)

A few years ago, during peak COVID, I was playing role-playing games (like Deadlands and Dungeons & Dragons) 3-5 times a week. I was glad to reconnect with my favorite hobby as a kid, and also to reconnect with friends with whom I’d lost touch.

Initially, I played on Roll20.com because that was where my D&D friends were. But some time later, my Savage Worlds (mostly Deadlands) friends introduced me to FoundryVTT.com. I was blown away at how polished the UI was, and the great support for Savage Worlds that Roll20 lacks to this day.

But Foundry was not without its drawbacks. I won’t go into a comparison of the two platforms – there are dozens of those just a Google or YouTube search away if you want them. The one drawback that Foundry had which Roll20 could not claim was simple: every time I tried to upgrade Foundry from version 9.something to 9.something+1, it broke my games. I reached out to Foundry’s “support” on Discord, which was a complete joke. I was told by one lurker in the channel that he could not help because I was running on Windows. So I backed up my configuration, ported it over to a Linux server, and… reproduced the problem. Still no help was to be found.

Eventually, I gave up. Despite having invested hundreds of dollars and – more importantly – dozens of hours configuring Foundry to my and my friends’ liking, I gave up and went back to Roll20.

And almost immediately questioned my decision. Sigh. After a few months on Roll20, and seeing more Savage Worlds games and modules available for Foundry, I decided to give it one more shot. After all, there was a Mac version now, and I could hack at it locally on my MacBook, so why not?

It took a couple hours, but I eventually successfully migrated my old Foundry 9.x installation and worlds to version 11. I was thrilled to see that – somewhere between 9.x and 11.x, the bug I experienced which broke my worlds during upgrades – had been fixed!

But I had one lasting problem – I like having my Foundry server local on my laptop (especially when working offline on an airplane or in Vermont when the power goes out), but I need a way to let my friends play on it too. And I don’t want to have to remember to back up and restore and move my world around from my Mac laptop to a Linux or Windows server, having to deal with path differences, and re-licensing it every time I start the server.

The solution? I set up SSH forwarding to redirect traffic sent to my Foundry server on to my Macbook.

ssh -i my_ssh_key.pem -R my.foundry.server:30000:localhost:30000 -p 2222 [email protected]

This command allows you to access a server running on your local machine via port 30000 on the remote server my.foundry.server, by creating a reverse SSH tunnel through the remote server.

  1. ssh: The command to initiate an SSH connection.
  2. -i my_ssh_key.pem: Specifies the private key file (my_ssh_key.pem) to use for authentication. This key should correspond to a public key that’s authorized on the remote server.
  3. -R my.foundry.server:30000:localhost:30000: This creates a reverse tunnel that forwards connections to port 30000 on the remote server (my.foundry.server) to port 30000 on your local machine (localhost). This is useful if you’re running a Foundry Virtual Tabletop server on your local machine and want to make it accessible from the remote server’s address.
  4. -p 22: Specifies that the SSH connection should be made to port 22 on the remote server. This is useful if the SSH server on my.foundry.server is configured to listen on a non-standard port.
  5. [email protected]: Specifies the username (ubuntu) and hostname (my.foundry.server) of the remote server. You should replace ubuntu with the appropriate username for your remote server.

Now, as long as I can reach my foundry server (on port 22 in this example) and have a decent speed connection, my friends can play on my server while I have the convenience of having it local with me wherever I go.

Leave a Reply