❗ Work in Progress |
---|
Note that this is a work in progress. It will have rough edges |
- Install podman
- Setup variables (ONLY WORKS UNTIL YOU LOGOUT - IF YOU LOGOUT AND NEED THEM AGAIN, YOU WILL NEED TO RUN THIS STEP AGAIN)
foundry_version="11-309" image_version="11.309"
- Create data directory
mkdir {{ /path/to/data }}
- Create pod
TODO: Find out how to work around the license acceptance - custom container image build?podman create \ --env FOUNDRY_USERNAME='{{ username }}' \ --env FOUNDRY_PASSWORD='{{ password }}' \ --env CONTAINER_PRESERVE_CONFIG=true \ --publish 30000:30000/tcp \ --volume {{ /path/to/data }}:/data \ --name foundry$foundry_version \ --hostname foundry$foundry_version \ felddy/foundryvtt:$image_version
- Generate SystemD unit files
TODO: What does the -t flag do and should it be 1?podman generate systemd --new --files --restart-policy=always -t 1 --name foundry$foundry_version
- Move the unit file in to place and rename it to something more human-readable
mkdir foundryUnitFiles mv container-foundry$foundry_version.service ~/foundryUnitFiles/foundry$foundry_version.service
- Enable the service
systemctl enable --user ~/foundryUnitFiles/foundry$foundry_version.service
- Automatic HTTPS (requires a working Caddy installation)
- Edit /etc/caddy/Caddyfile to add your service. You can do this with Nano, VI, etc.
sudo nano /etc/caddy/Caddyfile
. Example Caddyfile:foundry.your.domain { reverse_proxy localhost:30000 encode zstd gzip }
- Restart Caddy
sudo service caddy restart
- Edit /etc/caddy/Caddyfile to add your service. You can do this with Nano, VI, etc.
- Reboot or start the service
sudo reboot now # or systemctl start --user foundry$foundry_version.service
If you want to shutdown your Foundry server for any reason:
- (Recreate the variables if required)
- Disable the service
systemctl disable --user foundry$foundry_version.service
- Shutdown the container
systemctl stop --user foundry$foundry_version.service # podman stop foundry$foundry_version podman rm foundry$foundry_version