Self Hosting Foundry in the Cloud

Today we’re taking a look at hosting Foundry ourselves in the cloud using Docker, Portainer, and Traefik based on a guide from Ben Price with a small addition of using Filezilla to upload our files for a better user experience. If you want the easiest Foundry hosting check out my video on the Forge here:

A link to all of the COPYABLE text for pasting it into terminal:

SSH Guides:

Ben’s Guide:

Ben’s Patreon:

My DigitalOcean Referral Code:

Greg from HowToDrinks links:
YouTube –
Twitter –
Instagram –
Twitch –
Patreon –

Caeora Map/Asset Maker Extraordinaire:
Website –
Twitter –
Patreon –
Twitch –
YouTube –
Ko-Fi –
DeviantArt –
Tumblr –

00:00:00 – Overview/What You’ll Need
00:02:33 – Downloading the Software We’ll Use
00:04:16 – Setting up an SSH Key
00:05:36 – Setting up our DigitalOcean Server
00:07:35 – Pointing our Domain to our Server
00:08:59 – Connecting to/Updating our Server
00:10:53 – Adding a User Account
00:11:50 – Installing server utilities
00:13:32 – Securing our server
00:13:50 – Setting up Traefik
00:19:18 – Setting up Portainer
00:21:20 – Prepping to Add Foundry
00:24:00 – Adding Foundry to Portainer
00:28:04 – Enabling Audio/Video in Foundry
00:28:55 – IMPORTANT: How to Update
00:29:50 – Awesome Announcements!

32 thoughts on “Self Hosting Foundry in the Cloud

  1. This was a great guide! Everything beside the monitor work for me, I cannot for some reason log in to that. Any takers on what could be the problem? Everything else works perfectly

  2. Stupid question incoming: why would I choose some of those over the Forge? Forge seems much simpler to access..
    Am I missing something?

  3. Really great video, thanks! Can you provide some info on making use of docker to spin up separate instances? I'd like to have setup unique URLs for various games (all licensed of course) for my team. I've looked into the docs on the community wiki and I'm not sure which one applies. Any help would be great! Thanks

  4. One of the best tutorials on the Internet ever, it almost felt like I knew what I was doing. Everything is running and even though at the end it is more expensive than basic forge (I am hosting the jitsi server too), there are no limitations for file size and I don't need to worry if I can upload all of my worlds. Heck, I might give animated maps a try :D. Thanks Matt.

  5. If anyone is interested, I automated this, to an extent.

    This setup will configure both foundry and valheim. Potentially other things in the future if I decide to expand it. I prefer to have the foundry and valheim stacks editable in portainer vs having to login to the host and edit the docker configurations if need be. Anyway, the script will fill out a bunch of the values you need and print out the docker-compose files to copy and paste into portainer.

    One last word of warning, is that I didn't test out the user creation, though that should work. I've technically only tested from "Install Docker" on, but if it doesn't it's literally just 3 commands you need to run manually.

    The version of portainer used in this tutorial is also no longer maintained, so I switched to the portainer-ce branch as that's their new main branch.

    Here ya go:

  6. I have a problem, from the url manager I put stop to foundryVTT, portainer and Traefik and now I can't enter anything … I get the error ERR_CONNECTION_REFUSED

    how to restart portainer?

  7. So I got this working. But is it possible to somehow duplicate the portainer and run more than one container so i can have a test environment and a normal environment? I have the domains already set and all but the port is what's messing me

  8. As an entry level network engineer, I must say this was an impressive tutorial. I would be SO overwhelmed if I didn't know all I do before trying this lol.

  9. OK, followed the instructions, everything seems to work OK, except when I use the 'Links' for my player, they cannot connect.

    I can connect from an pc using the domain URL, eg, but using the link 'https://xxx.xx.xx.xx:30000' they get connection failed. Have I missed a step, such as unlocking the port? Side note, if I ping the domain, I get back the IP xxx.xx.xx.xx.

    I'm not network saivy, but do have a limited understanding…

  10. Hello, So I'm building my server. And though I've used different services to get there I am to the point that I've loaded foundry and it runs. I've copied my data folder over to the server. But when I go to load my world it lets me select game master and click join game session. Then putty goes through:

    FoundryVTT | 2021-02-09 03:58:23 | [info] User authentication successful for user Gamemaster

    FoundryVTT | 2021-02-09 03:58:36 | [info] Vending world data to User …………….. (actual foundry key)
    <— Last few GCs —>

    [12581:0x58de060] 3381499 ms: Scavenge 394.1 (439.3) -> 393.2 (439.3) MB, 1.2 / 0.0 ms (average mu = 0.987, current mu = 0.985) allocation failure

    [12581:0x58de060] 3381503 ms: Scavenge 394.1 (439.3) -> 393.5 (439.3) MB, 1.4 / 0.0 ms (average mu = 0.987, current mu = 0.985) allocation failure

    [12581:0x58de060] 3381516 ms: Scavenge 396.8 (439.3) -> 395.9 (439.3) MB, 1.3 / 0.0 ms (average mu = 0.987, current mu = 0.985) allocation failure

    <— JS stacktrace —>

    FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed – JavaScript heap out of memory

    1: 0xa04200 node::Abort() [node]

    2: 0x94e4e9 node::FatalError(char const*, char const*) [node]

    3: 0xb797be v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]

    4: 0xb79b37 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]

    5: 0xd343c5 [node]

    6: 0xd64f5e v8::internal::EvacuateNewSpaceVisitor::Visit(v8::internal::HeapObject, int) [node]

    7: 0xd70f96 v8::internal::FullEvacuator::RawEvacuatePage(v8::internal::MemoryChunk*, long*) [node]

    8: 0xd5d17f v8::internal::Evacuator::EvacuatePage(v8::internal::MemoryChunk*) [node]

    9: 0xd5d3f8 v8::internal::PageEvacuationTask::RunInParallel(v8::internal::ItemParallelJob::Task::Runner) [node]

    10: 0xd4fcd9 v8::internal::ItemParallelJob::Run() [node]

    11: 0xd72ef0 void v8::internal::MarkCompactCollectorBase::CreateAndExecuteEvacuationTasks<v8::internal::FullEvacuator, v8::internal::MarkCompactCollector>(v8::internal::MarkCompactCollector*, v8::internal::ItemParallelJob*, v8::internal::MigrationObserver*, long) [node]

    12: 0xd7378c v8::internal::MarkCompactCollector::EvacuatePagesInParallel() [node]

    13: 0xd73955 v8::internal::MarkCompactCollector::Evacuate() [node]

    14: 0xd85941 v8::internal::MarkCompactCollector::CollectGarbage() [node]

    15: 0xd41c68 v8::internal::Heap::MarkCompact() [node]

    16: 0xd43758 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]

    17: 0xd46784 v8::internal::Heap::AllocateExternalBackingStore(std::function<void* (unsigned long)> const&, unsigned long) [node]

    18: 0xe5a5d2 v8::internal::BackingStore::Allocate(v8::internal::Isolate*, unsigned long, v8::internal::SharedFlag, v8::internal::InitializedFlag) [node]

    19: 0xebddb0 v8::internal::JSTypedArray::GetBuffer() [node]

    20: 0xb96495 v8::ArrayBufferView::Buffer() [node]

    21: 0xac1e23 [node]

    22: 0xbe571b [node]

    23: 0xbe6cc6 [node]

    24: 0xbe7346 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]

    25: 0x14012d9 [node]


    Any thoughts as to why? I copied the folder over directly so there shouldn't be any differences. The world works just fine on my desktop foundry. Thanks for looking.

  11. Having the DNS active worked for Portainer and Traefik, but following the steps for foundry in portainer resulted in a 404 not found error. I've done these steps 4 or 5 times now and gone back to Ben's blog and tried there too. There's something wrong in step 6. What permissions does the foundry zip file need for docker / portainer to access it. The filezilla upload you use results in root:root ownership and I'm wondering if maybe those permissions are an issue? I'm new to these technologies, docker, portainer, traefik, so troubleshooting is very slow cause I have to learn them as I go. But there's something wrong here…I've retraced the steps carefully, checked all the files and every time I follow these steps a 404 not found on the foundry vtt "" is the result.

  12. Ok… I have run into every snag imaginable. I am at the point where I launch my fvtt container. However it crashes. giving me exit code 1 (error with application) when i look at the logs it tells me "exec format error" i need help please.

  13. I think these traefik setup instructions require DNS to configure correctly. I did this once with an IP prior to DNS updates, and even after DNS update went through, traefik would not respond properly…try it again on a new droplet after DNS and traefik responded. My guess right now is that for the docker compose command to work properly with a config file using a domain name, that domain name may need to be mapped.

  14. Thanks for the walkthrough, I got everything set up but I'm having an issues accessing the game. I moved all my files into their respective locations but when I try to change options, add world information, access the worlds, or look at modules it tells me that I lack administrative privileges. Anyone know what went wrong per se?

  15. I dont get it, I'm not very good with computer, for me it's super alien, I am a player on another campaign that use foundry vtt, I messaged the DM to give me some hint on how to do something… I want to play with my friend and the 2 links we have access to invite people are not working…

  16. Whenever I try to update a module (or open a world, since they are on a previous version of foundry) I get the following error message:

    Installation failed: EACCES: permission denied, open '/data/foundryvtt/Data/modules/MODULE/MODULE.css'

    Any idea?

    For the record, i did the install then used filezilla to move over my content, was that a mistake?

  17. This guide worked perfectly, you're awesome! One thing I found that was a snag was after I transferred all my local assets and worlds through filezilla, foundry couldn't access any files giving a permissions error. I had to go through filezilla and set public read/write permissions to all my asset, world, and module folders and cascade it down to all subfolders/files. Once that was done, it spun up without a single hitch, it's working beautifully.

  18. Hey Encounter Library – I went through the entire video and set up my docker exactly as you did, but I'm getting a Bad Gateway response when I go to the domain I set up. Worked entirely up to this point. Any idea what's going on? This is on a brand new droplet and all.

  19. I followed the instructions and Foundry is working well. I created a directory foundrydata/Data/images/characters/tokenizer, but when I try to get the Tokenizer to save its images there, the server returns a 502 error. I've tried it locally (not on the server) and it saves correctly. Tokenizer can also successfully save to the default location (foundrydata/Data/). Any clues on why the server is rejecting the POST here?

    It is actually happening to most uploads through foundry. I can only upload things by sending them through filezilla. But tokenizer can still save to the default /Data/ location.

Leave a Reply

Your email address will not be published. Required fields are marked *