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.
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.
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.
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.
- 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.
- Open your VPS in the ZapX dashboard and go to the One-Click Apps tab.
- Search the app catalog for Foundry, then click Install app on the Foundryvtt card.
- Use a custom subdomain or zap.cloud is already selected with a random name. Leave it enabled or enter your own name, such as
vttorroleplaying. - 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_USERNAMEandFOUNDRY_PASSWORD. The app will retrieve your license key automatically. - Option B: Enter a download link from your Foundry account in
FOUNDRY_RELEASE_URLand your license key inFOUNDRY_LICENSE_KEY. This way, you don’t share your account password. The link is only valid for a few minutes, so install immediately afterward.
- Option A: Enter your Foundry account username (or email address) and password in
- Leave the remaining fields at their default values.
FOUNDRY_PROXY_SSLis set totrueandFOUNDRY_PROXY_PORTto443, 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 asSERVICE_PASSWORD_FOUNDRYADMIN(see below for details). - 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.
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.
- Open your app using the Access link.
- 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.
- 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. - In Setup, install game systems and modules and create worlds, as described in Foundry Virtual Tabletop: Worlds, Systems & Modules.
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.
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.
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.
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.
| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 1 vCPU | 2 vCPU |
| RAM | 2 GB | 4 GB |
| Storage space | 1 GB plus worlds and media | 20 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.
Foundry itself shouldn’t be accessible directly from the internet, only through the reverse proxy. So only open SSH, HTTP, and HTTPS:
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.
Create a directory and add a .env file containing your credentials:
mkdir -p /opt/foundryvtt && cd /opt/foundryvtt
nano .env
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:
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:
imagespecifies the Foundry version. The number corresponds to the Foundry version (here, version 14, build 370).hostnamemust remain fixed. Foundry binds the license to the container’s hostname; changing the name may trigger another license check.FOUNDRY_HOSTNAME,FOUNDRY_PROXY_SSL, andFOUNDRY_PROXY_PORTensure invitation links use your domain with HTTPS.127.0.0.1:30000:30000makes Foundry accessible only on the server itself; the reverse proxy forwards requests to it.foundry-datais 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:
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.
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.
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:
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.
All data is stored in the foundry-data volume. To create a complete backup, briefly stop the container and archive the volume:
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.
Back up your data first. Then enter the new image version in compose.yaml and restart:
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.
After installation, you’ll work in Foundry itself. Here are the most important steps to get started:
- In Setup, install a game system, create a world, and start it.
- Sign in as the Gamemaster. The account initially has no password: immediately set one for the Gamemaster under User Management in the world.
- Create a separate account with a password for each player there.
- 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.
- 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.
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.
