Skip to content

How to Set Up Foundry VTT on a Linux Server – Your Own Virtual Tabletop for Your Roleplaying Group

Run Foundry VTT on a Linux VPS as a One-Click App or with Docker Compose. Set up your license, generated admin password, player accounts, and first world.

1 December 20269 min read1 Views0 helpful

Introduction

Foundry Virtual Tabletop (Foundry VTT for short) is a virtual tabletop for pen-and-paper roleplaying games such as Dungeons & Dragons, Pathfinder, or The Dark Eye. Maps, character sheets, dice, music, and combat rounds all run in the browser, and your players only need the link to your server. You buy Foundry once and then host it yourself.

In this guide, we’ll show you two ways to run Foundry VTT on your Linux VPS: as a One-Click App directly from the ZapX dashboard, or manually with Docker Compose. Then you’ll set up your license, administrator password, and first world.

Info: Foundry VTT or the game Foundry?

This guide covers the virtual tabletop Foundry Virtual Tabletop. For the factory-building game “Foundry,” see its own guides, such as Foundry: Set Up a Server on Your VPS.

When Foundry VTT Makes Sense on a VPS

We also offer a ready-to-use Foundry VTT game server as a separate product. A VPS is especially useful if:

  • You run other services, such as a Discord bot, a wiki for your campaign, or file storage for maps, and want everything on one server.
  • You want full control: your own domain, reverse proxy, backups, and SSH access to all files.
  • Your group wants to play around the clock, even when your own PC is off. Foundry runs continuously on the VPS and is available to all players at the same address.
  • You use lots of modules and media: you choose the storage space and RAM yourself.

A VPS is less suitable if you don’t want to manage anything yourself. In that case, a Foundry VTT server is the easier option: Foundry is preinstalled, and you manage the license, updates, and backups directly in the dashboard. Learn more in Foundry Virtual Tabletop: Server Configuration.

The Easy Way: Foundry VTT as a One-Click App

Use your VPS’s One-Click Apps to install Foundry VTT in just a few clicks. The app is accessible directly over HTTPS using a domain, so you don’t need to set up a reverse proxy or certificate yourself. When it starts for the first time, the app downloads Foundry using your Foundry account.

Requirements

  • A Linux VPS (Debian or Ubuntu) with One-Click Apps set up. See Set Up One-Click Apps for instructions.
  • A purchased Foundry license and an account at foundryvtt.com. Your players don’t need their own licenses.
  • At least 1 vCPU core and 2 GB RAM; 2 vCPU cores and 4 GB RAM are recommended. Allow extra storage space for worlds, modules, and media.

Install

  1. Open your VPS in the ZapX dashboard and go to the One-Click Apps tab.
  2. Search the app catalog for Foundry, then click Install app on the Foundryvtt card.
  3. Use a custom subdomain or zap.cloud is already selected with a random name. Leave it enabled or enter your own name, such as vtt or roleplaying.
  4. Open App configuration and enter your credentials. The form marks all fields as optional, but the app can’t download Foundry or start without one of the two options below:
    • Option A: Enter your Foundry account username (or email address) and password in FOUNDRY_USERNAME and FOUNDRY_PASSWORD. The app will retrieve your license key automatically.
    • Option B: Enter a download link from your Foundry account in FOUNDRY_RELEASE_URL and your license key in FOUNDRY_LICENSE_KEY. This way, you don’t share your account password. The link is only valid for a few minutes, so install immediately afterward.
  5. Leave the remaining fields at their default values. FOUNDRY_PROXY_SSL is set to true and FOUNDRY_PROXY_PORT to 443, so invitation links and audio/video work behind the HTTPS proxy. You don’t need to set an administrator password: the installation generates one automatically as SERVICE_PASSWORD_FOUNDRYADMIN (see below for details).
  6. Click Queue installation.

When it starts for the first time, the app downloads Foundry from foundryvtt.com and extracts it. Depending on your connection, this takes a few minutes. The address will show an error page while this is happening; try reloading it after a short while.

Info: Adding or correcting credentials

If you left out your credentials during installation or entered them incorrectly, the app won’t start. A reminder saying “License and admin password” will appear on the app card. Enter the values in the app settings (gear icon), under App environment > App configuration, then click Save. The app will restart with the new values.

First Visit: License and Setup

  1. Open your app using the Access link.
  2. The license is already configured with either option. If Foundry still asks for a License Key, enter your license key and accept the license agreement.
  3. Foundry displays the Setup page and asks for the Administrator Password. You can find the password in the app settings (gear icon), under App environment > Automatically generated values, listed as SERVICE_PASSWORD_FOUNDRYADMIN. Click the eye icon to reveal it or the icon next to it to copy it.
  4. In Setup, install game systems and modules and create worlds, as described in Foundry Virtual Tabletop: Worlds, Systems & Modules.
Info: Multiple licenses in your account

If your Foundry account has multiple licenses, the app randomly selects one when you use Option A. To use a specific one, enter the license number in FOUNDRY_LICENSE_KEY (1 for the first license) or enter the key itself.

Updates and Backups

The One-Click App installs a specific version of Foundry. To install a new version, go to the app settings (gear icon), under App update: click Check for updates, then Apply update. If it says the app is up to date, there isn’t a newer version in the app catalog yet. Don’t use the update button in Foundry’s own Setup for Foundry updates; the app determines the version.

Warning: Back up before updating

New major versions of Foundry update worlds the first time you open them, and not every game system or module is compatible right away. Back up your VPS beforehand, for example under Backups in the dashboard, and check in Foundry that your most important systems and modules support the new version.

Worlds, systems, modules, uploaded media, and settings are stored in the app’s data volume and are retained during updates. You can also create a backup of an individual world in Setup. If you uninstall the app with Also delete data volumes selected, your worlds and modules will be deleted too.

Manual Installation

Without One-Click Apps, you can run Foundry with Docker Compose and your own reverse proxy. We use the same container image as the One-Click App, felddy/foundryvtt. This is a community image that downloads and starts Foundry using your account.

Requirements

ResourceMinimumRecommended
CPU1 vCPU2 vCPU
RAM2 GB4 GB
Storage space1 GB plus worlds and media20 GB or more

These figures are based on the official system requirements. You’ll also need Debian or Ubuntu with Docker and the Compose plugin installed (see Set Up Docker), a domain whose A record points to your VPS, and your Foundry license.

Prepare the Firewall

Foundry itself shouldn’t be accessible directly from the internet, only through the reverse proxy. So only open SSH, HTTP, and HTTPS:

Code
sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable

Don’t open port 30000. In the next step, the container will listen only on 127.0.0.1, making it inaccessible from outside.

Install with Docker Compose

Create a directory and add a .env file containing your credentials:

Code
mkdir -p /opt/foundryvtt && cd /opt/foundryvtt
nano .env
Code
FOUNDRY_USERNAME=dein-foundry-konto
FOUNDRY_PASSWORD=DEIN_KONTO_PASSWORT
FOUNDRY_ADMIN_KEY=LANGES_ADMIN_PASSWORT

Protect the file with chmod 600 .env. Then create compose.yaml:

yaml
services:
  foundryvtt:
    image: felddy/foundryvtt:14.370.0
    hostname: foundryvtt
    restart: unless-stopped
    env_file: .env
    environment:
      - FOUNDRY_HOSTNAME=vtt.example.com
      - FOUNDRY_PROXY_SSL=true
      - FOUNDRY_PROXY_PORT=443
      - FOUNDRY_TELEMETRY=false
    ports:
      - "127.0.0.1:30000:30000"
    volumes:
      - foundry-data:/data

volumes:
  foundry-data:

The most important lines:

  • image specifies the Foundry version. The number corresponds to the Foundry version (here, version 14, build 370).
  • hostname must remain fixed. Foundry binds the license to the container’s hostname; changing the name may trigger another license check.
  • FOUNDRY_HOSTNAME, FOUNDRY_PROXY_SSL, and FOUNDRY_PROXY_PORT ensure invitation links use your domain with HTTPS.
  • 127.0.0.1:30000:30000 makes Foundry accessible only on the server itself; the reverse proxy forwards requests to it.
  • foundry-data is a Docker volume for all data under /data: Foundry itself, worlds, modules, and settings.

Replace vtt.example.com with your domain and start the container:

Code
docker compose up -d
docker compose logs -f

The logs show Foundry being downloaded and started. Instead of a username and password, you can also set FOUNDRY_RELEASE_URL and FOUNDRY_LICENSE_KEY in .env.

First Visit

While the reverse proxy isn’t running yet, you can access Foundry through an SSH tunnel: ssh -L 30000:127.0.0.1:30000 root@SERVER_IP, then open http://localhost:30000 in your browser. Foundry displays the Setup page and asks for the administrator password from FOUNDRY_ADMIN_KEY.

Access over HTTPS Through a Reverse Proxy

Set up nginx as a reverse proxy as described in Set Up a Reverse Proxy, then add this server block. Foundry uses WebSockets, so the Upgrade lines are important:

nginx
server {
    listen 80;
    server_name vtt.example.com;

    client_max_body_size 300M;

    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_pass http://127.0.0.1:30000;
    }
}

client_max_body_size allows uploads of larger maps and music files. Then obtain a certificate with Certbot; see Set Up an SSL Certificate. You and your players can then access Foundry at https://vtt.example.com.

Back Up Your Data

All data is stored in the foundry-data volume. To create a complete backup, briefly stop the container and archive the volume:

Code
cd /opt/foundryvtt
docker compose stop
docker run --rm -v foundryvtt_foundry-data:/data -v "$PWD":/backup alpine tar czf /backup/foundry-backup.tar.gz -C /data Data Config
docker compose start

The volume name consists of the directory name and foundry-data; check it with docker volume ls. Store the backup somewhere off the server.

Update Foundry VTT

Back up your data first. Then enter the new image version in compose.yaml and restart:

Code
docker compose pull
docker compose up -d

The image downloads the matching Foundry version when it starts. Before switching to a new major version, check whether your game systems and modules are supported.

Invite Players and Manage Worlds

After installation, you’ll work in Foundry itself. Here are the most important steps to get started:

Start a World and Create Player Accounts

  1. In Setup, install a game system, create a world, and start it.
  2. Sign in as the Gamemaster. The account initially has no password: immediately set one for the Gamemaster under User Management in the world.
  3. Create a separate account with a password for each player there.
  4. Give your players your app address or domain. When they log in, they select their name and enter their password.

Learn more about game systems, modules, and roles in Foundry Virtual Tabletop: Worlds, Systems & Modules.

Limitations

  • One world at a time: Foundry runs only one world per installation at a time. If multiple groups want to play at the same time, they need separate installations. Check the license terms at foundryvtt.com to see what your license allows.
  • Audio and video: The built-in audio/video connection runs directly between players’ browsers and only works over HTTPS. If it doesn’t work on a particular network, a Discord voice channel is often an easier option.

Conclusion

With Foundry VTT on your VPS, you have your own virtual tabletop that your group can access from your domain at any time. The fastest way to get started is with the One-Click App: enter your credentials, open Setup using the generated administrator password, and create your first world within minutes. Manual installation with Docker Compose is a good option if you don’t use One-Click Apps or want to run Foundry behind your own reverse proxy.

Free tools

Related tools for servers and developers

View all

FAQ

Frequently asked questions

The One-Click App is the fastest option: enter your Foundry credentials, and the app downloads Foundry, generates the administrator password, and makes it available directly over HTTPS with your domain. Install updates from the dashboard under App update. Manual installation with Docker Compose is a good choice if you don’t use One-Click Apps on your server, want to run Foundry behind your own reverse proxy, or want to control the version yourself.
Yes. Foundry Virtual Tabletop is paid software and runs using your own license from foundryvtt.com. The app can’t download Foundry or start without a Foundry account or download link. Your players don’t need their own licenses; they simply connect to your server in their browser.
The administrator password protects Foundry’s Setup area, where you manage worlds, game systems, and modules. The One-Click App generates it during installation. Find it in the app settings (gear icon), under App environment > Automatically generated values, as SERVICE_PASSWORD_FOUNDRYADMIN. For a manual installation, set it yourself with FOUNDRY_ADMIN_KEY in the .env file.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.