Docker-based Foundry VTT installation.
⚠️ Please not that when using a docker container for your Foundry installation you will not receive official support from Foundry VTT and will instead be directed to the container creator.
- Clone this repository on the server.
- Create a
.env.local
file to configure sensitive information (empty variables in.env
). - Run
make start
.
Foundry will be available at http://localhost:${EXPOSED_FOUNDRY_PORT}
. The container will also be restarted on server
restart unless you specifically stop it via make stop
.
Everything that can be configured for Foundry is configurable in this project. We use .env
files to do so, with a
specific loading order (next one overrides the previous one):
- .env
- .env.local
- .env.${ENV} (
ENV
being defined by the environment, for exampleENV=staging make start
) - .env.${ENV}.local
Whenever you want to override something, you can do so most of the time in .env.local
. .local
files are ignored, so
while information is still on the server itself, at least you're not committing sensitive information to the
cloud-hosted repository!
⚠️ Foundry will be stopped to execute the update.
- Make note of the current version (in
config/docker/docker-compose.yml
). - Backup your data
make backup-local-data
. - In
config/docker/docker-compose.yml
, change the version number of thefelddy/foundryvtt
image to the version you want to update to. - Run
make update
. - Restart the container (
make start
).
Foundry's data is kept in a local file volume that is, by default ./var/foundry/data
.
We provide a Makefile
will all the commands and utilities you might need to work with this project. Run make
to get
a list of available commands and a small description of that they do. You can also dig into the Makefile
for even more
insight.
⚠️ Backup your data: While 99.99% safe, this utility will overwrite your data. It's always safer to run a backup before using this utility. Runmake backup-local-data
to do so.
To save on disk space and provide faster load times, images can be easily compressed by running
make compress-local-images
.
The command will run two scripts. The first is fvttoptimizer (via a Docker container), which will convert all
non-webp images in foundry's Data
directory to webp. More details can be found in the project's README.md.
Once all images are converted to webp, we further compress by running them through TinyPNG. It's a bit overkill and you do need an API key, but it'll save on average a further 5% space.
You can skip the TinyPNG step by setting COMPRESS_WITH_TINY_PNG=false
in a .env.local
file. This is also where you
would want to set your own API key.