This guide provides easy to follow steps for a relatively simple installation of Foundry plus a reverse proxy using Caddy at the end of which you will have a functional cloud-hosted Foundry installation using Oracle Cloud with optional backups and S3 integration at no cost with no time limit.
You will end up with:
This guide assumes that you are not an existing customer with Oracle Cloud and that the services set up fall within the Oracle Always Free Tier resulting in no monthly charges. Potential pitfalls or notes to be aware of when using the Always Free Tier will be highlighted wherever appropriate.
The following is required to complete this guide:
If you get stuck on a particular step, please first ensure that all commands in black text quotes entered exactly as they appear.
Troubleshooting assistance for this guide can be found on the official Foundry Discord. Copy the link from the specific step number (ie: C31) you are having difficulty with and then post in the #install-and-connection channel on the Foundry Discord.
Was your A1 instance disabled or reclaimed?
Have you received an error message stating "instance is disabled and will not accept any actions or requests?"
See the archived information onward for an explanation and the Restore Disabled A1 Instance section for instructions on how to restore your Foundry instance.
While this guide is written to target the Always Free Tier and should not result in any charges if followed correctly, you are fully responsible for ensuring that no costs will be incurred. It is recommended to conduct a Cost Analysis and set a budget after this guide is complete to ensure that all services are Always Free.
All information in this guide is accurate as of the date it was written.
Oracle at its sole discretion may remove access to free tier accounts at any point without warning.
At the end of this section, you will have a registered account with Oracle Cloud that has access to the Always Free Tier services.
A valid credit or debit card is required to sign up for an account with Oracle Cloud in order to access the Always Free Tier services.
B1. Review the availability of Always Free services in your preferred region. At minimum, this guide targets the Compute VM, Block Storage, and optionally the Object Storage services. Ensure that they are available in the region you want to use.
B2. Sign up for an account at Oracle Cloud, entering your personal information as well as credit or debit card information when prompted. Ensure that you select the proper region to set as your Home Region. Once this is selected, it cannot be changed.
READ THIS WARNING: When choosing your home region, pay very special attention to any messages about Arm Ampere A1 Compute capacity. See example below. Do not choose regions listed in the warning message as you will not be able to continue with this guide until the A1 instances become available, which may take several days. Choose the next closest geographical region to you and your players and continue.
(Image for example only, check your warning very closely for the regions listed)
B3. Once your account is confirmed, a “Get Started” email will be sent to the registered email address providing access to the Oracle Cloud account. You are now ready to continue this guide!
Oracle Cloud Infrastructure Customer,
Oracle Cloud Infrastructure (OCI) will be reclaiming idle Always Free compute resources from Always Free customers. Reclaiming idle resources allows OCI to efficiently provide services to Always Free customers. Your account has been identified as having one or more compute instances that have been idle for the past 7 days. These idle instances will be stopped one week from today, January 30, 2023. If your idle Always Free compute instance is stopped, you can restart it as long as the associated compute shape is available in your region. You can keep idle compute instances from being stopped by converting your account to Pay As You Go (PAYG). With PAYG, you will not be charged as long as your usage for all OCI resources remains within the Always Free limits.
The definition of "idle" is found here: Always Free Tier Resources - Idle Instances
Oracle support has confirmed on January 31, 2023 that all the idle conditions above need to be met for the instance to be considered idle. With a 4GB RAM instance, Foundry will use more than 10% at all times. Thus, following this guide after January 31, 2023 should keep the instance safe from being reclaimed.
If you would like to be absolutely sure, you can upgrade your account to Pay As You Go in the Billing & Cost Management -> Upgrade and Manage Payment section. There is no charge to do so, however a temporary authorization must be placed on a credit card.
As of January 2022 (possibly earlier), Oracle changed their policy for A1 always free instances. They will no longer be disabled at the expiry of your free trial credits and any A1 instances set up as directed in this guide will not be disabled by Oracle at that time.
See the updated FAQ under the What happens when my Free Trial expires or my credits are used up? heading:
When you've reached the end of your 30-day trial or used all your Free Trial credits (whichever comes first), you’ll be notified and will have a grace period of 30 days, starting from the expiration date, to upgrade to paid.
...
Resources identified as Always Free will not be reclaimed. After your Free Trial expires, you'll continue to be able to use and manage your existing Always Free resources, and can create new Always Free resources according to tenancy limits.
(Emphasis added)
(Text quoted 2022-01-20)
A Pay As You Go account is no longer needed to prevent A1 always free instances from being disabled after the initial 30-days.
Some users in certain regions may require manual account verification which could take a few days of extra time.
If the services described in the next section are not listed, you may need to wait a few more minutes for the account to be fully provisioned. A status notification appears at the top of the page when logged in to Oracle Cloud if the account has not yet been fully provisioned.
At the end of this section, you will have set up a Compute VM (Virtual Machine) with Ubuntu 22.04 as well as a VCN (Virtual Cloud Network) required to host Foundry.
C1. From the Get Started page, click on Set up a network with a wizard.
C2. Choose VCN with Internet Connectivity and click Start VCN Wizard.
C3. Enter a VCN Name, such as foundry
.
C4. Ensure that USE DNS HOSTNAMES IN THIS VCN is unchecked
.
C5. Click Next to proceed to the Review page.
C6. Click Create to create the VCN.
C7. Once all steps here are marked "done" with a green checkmark , click View Virtual Cloud Network.
C8. In this next section, we will create a security policy to allow external connections to the VCN. This is required to make Foundry accessible to the internet. To start, click on the Public Subnet-foundry link.
C9. Click Default Security List for foundry.
C10. Click Add Ingress Rules.
C11. Ensure that Stateless is checked
.
C12. Enter 0.0.0.0/0
into the SOURCE CIDR field.
C13. Enter 80,443,30000
into the DESTINATION PORT RANGE field.
Ports 80 and 443 are required for HTTP and HTTPS, and 30000 is required for Foundry. Once a reverse proxy is set up (step D38 in this guide) you may optionally remove that port as it will no longer be needed.
C14. Click Add Ingress Rules.
This completes the creation of a VCN with the correct security rules to allow connections to the Foundry host.
C15. Click ORACLE Cloud at the top left to return to the Get Started page to continue.
C16. From the Get Started page, click Create a VM Instance.
C17. On the next screen, enter a name for the VM instance. The name foundry
is used for this guide.
C18. Leave the default Availability Domain.
C19. Click the Change Image button to select a new OS image.
C20. From the pop-out list, choose Ubuntu at the top, then check
Canonical Ubuntu 22.04. Ensure that the OS Version is 22.04.
C21. Click Select Image.
C22. To change the type of VM to an Always Free Tier VM, click Change Shape.
C23. In the pop-out window, click Ampere.
C24. Then, check
the VM.Standard.A1.Flex shape. Reduce the RAM to 4GB.
As of January, 2023 Oracle stated that thay may begin reclaiming "idle" instances. One measure of idleness is RAM usage. Foundry does not need more than 4GB of RAM, and not raising it higher will ensure that more than 10% of RAM will be used at all times.
For more information see: Always Free Tier Documentation
As of June 7, 2021 Oracle offers significant and flexible resources for their Always Free Tier instances. You can now have up to 4 Ampere cores and 24GB of RAM spread over up to 4 instances, for free. This guide recommends the selection of 1 core and 4GB of RAM as that is more than enough to run Foundry.
An additional core may help increase performance of Foundry slightly and a few more gigs of RAM could help in the most extreme cases for resource-intensive modules. You can flexibly edit the shape after creation if you want to adjust the resources after creation.
In the vast majority of cases, 1 core and 4GB is recommended for Foundry.
If you choose more resources, you may run the risk of having your instance reclaimed due to being idle. For more details, see Always Free Tier Documentation.
You may try switching to another Availability Domain (checking to ensure it is tagged always-free
) to see if there are A1 instances in other Availability Domains within your home region. The number of Availability Domains differs in each reagion, with some regions only having 1.
If no Availability Domains in your home region have A1 shapes available, you will have to check back periodically for new availability. This may happen at any time as others free up resources or Oracle adds more A1 resources to the region. It may take a few days, keep checking back regularly.
If this shape is not available to select, your account may still be provisioning. Wait until the provisioning banner at the top of the page disappears and try again. This may take a few hours in some cases. If your account is provisioned but you do not see the VM.Standard.A1.Flex shape, then you will have to contact Oracle Support to resolve the issue. Choosing other shapes may incur charges.
C25. Click Select Shape.
C26. Scroll down to Configure networking.
C27. Ensure that foundry is selected for Virtual cloud network in <compartment name>
. This should appear by default.
C28. Ensure that Public Subnet-foundry (Regional) is selected for Subnet in <compartment name>
. This should appear by default.
C29. Scroll down to Add SSH keys.
C30. Click on Save Private Key. Save this key file in an easily accessible and memorable folder. Rename this key to foundry.key
.
Due to security restrictions, in Windows it is recommended to save the foundry.key file in the Documents folder or similar user-specific folder.
In Linux or MacOS, you may need to
chmod 600
the keyfile if ssh reports an error due to the keyfile being too open.
You must download this key and keep it safe. This key is required to connect to your instance, and it will not be shown again.
C31. Scroll down to Boot Volume.
C32. Optionally, check
the Specify a custom boot volume size option and enter up to 200
in the Boot volume size (GB) box that appears.
Leaving the default boot volume size will provide you with roughly 40GB of storage for Foundry, which is usually more than enough for even the most asset-heavy campaigns.
By specifying a larger Boot Volume you will be able to have up to roughly 190GB of storage for Foundry assets. However, doing so will prevent the use of multiple Compute VM instances that are provided with the Always Free Tier (not used in this guide). Think carefully about your desired future usage for the Always Free Tier before making this change.
C33. All other options should be left at default. Click Create.
If you receive an
Out of capacity for shape VM.Standard.A1.Flex in availability domain
error, then there are no more Always Free Tier instances available at the moment. You can try selecting a different Availability Domain above (double check that it is always-free tagged). Otherwise, according to the FAQ, more should become available within a few days. Check back regularly to see when they become available.
C34. Once the large yellow square changes from Provisioning to Running, the instance is ready to be used.
C35. Copy the Public IP Address and save it somewhere for future reference. This IP address is needed to connect to your VM.
This page contains a lot of very useful information about your Computer VM, and is a central place where adjustments can be made later on if needed.
At the end of this section you will have a functional installation of Foundry using HTTPS and Caddy as a reverse proxy. Foundry will be set to restart any time the Compute VM is restarted, managed by pm2.
In this section, terminal is used to refer to whichever command line interface you may be using, either Windows Powershell or Linux/MacOS terminal. On Windows cmd will not work, it must be Powershell.
In many terminals, you can paste text with right-click or shift+insert.
D1. In your terminal, navigate to the folder where you saved foundry.key
.
In Windows, you can navigate to the folder in File Explorer. Then, hold the shift key and right click within the folder and choose Open Powershell window here.
D2. Run the ssh command where <public ip address>
is the Public IP Address (do not include the <>
brackets) of your Compute VM as noted in step C35 above.
ssh -i foundry.key ubuntu@<public ip address>
If you receive a
connection refused
error, the instance is probably still starting up and needs another minute or two before it can accept connections. Wait two minutes and try again.If you receive an error about the keyfile being too open, see the info at step C30.
D3. You will likely be prompted to accept the ECDSA key. Type yes
and hit enter to accept and continue.
D4. You should see a prompt showing ubuntu@foundry:~$.
All commands going forward are to be entered when you see the ubuntu@foundry:~$ prompt only. If you do not see the prompt then make sure the previous step is not still running. Some commands may take a minute or two to process.
D5. First, update the system by running the following commands (this may take a few minutes to complete):
sudo apt-get update
sudo apt-get upgrade -y
Blocks like the above with multiple lines of commands should be run a single line at a time. This avoids some issues with some SSH clients messing with newlines if one pastes a block of text in and lets you stop if one of the commands throws an error rather than immediately running the next command.
You may be prompted for choices during the
upgrade
command above. Simply hit enter to accept the defaults and continue.
D6. Once complete, the instance is ready to continue.
All further commands in this section should continue to be entered into this terminal in the order written. Do not close the terminal until the end of the guide.
The Ubuntu image from Oracle has blocked network traffic and requires adding a rule to iptables to allow HTTP, HTTPS, and Foundry traffic.
D7. We need to use iptables to open the ports within Ubuntu to allow network traffic on the needed ports. We can do that by:
sudo iptables -I INPUT 6 -m state --state NEW -p tcp --match multiport --dports 80,443,30000 -j ACCEPT
sudo netfilter-persistent save
D8. The instance is now ready to accept connections.
Nodejs is required to launch and run Foundry, and pm2 will be used to manage starting and stopping Foundry.
D9. Run the following commands to install nodejs:
sudo apt install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt update
sudo apt install -y nodejs
D10. Check that node was installed correctly by verifying these commands return versions:
node --version
npm --version
D11. Then install pm2:
sudo npm install pm2 -g
D12. Check that pm2 is installed correctly by running:
pm2 --version
D13. Allow pm2 to start and stop Foundry when the instance restarts:
pm2 startup
sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u ubuntu --hp /home/ubuntu
D14. Run the following command to install unzip:
sudo apt-get install nano unzip -y
D15. The software needed to launch and manage Foundry is now successfully installed.
D16. Login to FoundryVTT and navigate to the Purchased Licenses page.
D17. Select the recommended version and Linux/NodeJS in the downloads options. Click on the Timed URL
button to copy a download url.
Be sure to click the
Timed URL
and not the :download:Download
button to copy and authenticated temporary download link. This link will expire in 5 minutes, after which it will need to be copied again from the gear.
D18. Run the following commands, pasting the download url where you see <download url>
. In most terminals, you can right click to paste the copied url.
mkdir ~/foundry
wget --output-document ~/foundry/foundryvtt.zip "<download url>"
Make sure to include the quote symbols before and after the
<download url>
or the file may not download properly.
D19. Once downloaded, extract Foundry and cleanup the zip file:
unzip ~/foundry/foundryvtt.zip -d ~/foundry/
rm ~/foundry/foundryvtt.zip
If you get an error when unzipping Foundry, please ensure you've downloaded the Linux/NodeJS version and if not, repeat step D17.
D20. Create the User Data folder for Foundry to store data:
mkdir -p ~/foundryuserdata
D21. Test that Foundry runs successfully by running the following command:
node /home/ubuntu/foundry/resources/app/main.js --dataPath=/home/ubuntu/foundryuserdata
D22. You should see these info lines at the end of the output, indicating that Foundry is successfully running.
D23. Test the connection to Foundry by opening http://<public IP address>:30000
in a new browser tab, where <public IP address>
is the Public IP Address noted earlier in the guide.
You should see a Foundry screen asking for a license key at this point. If you do not see a Foundry screen at this point likely the steps taken in Create a VCN and Security Policy, or Open Ports in iptables were incorrect, or an incorrect IP address was used. Review the steps to ensure that no errors were made and try again.
D24. In the terminal window, press ctrl-c to stop the Foundry test. You should see the last few lines as below, and a blinking cursor at ubuntu@foundry:~$.
D25. We will now set Foundry to be managed by pm2 so that Foundry will always be running, even in the case where the instance has been restarted. To do so, run the following command:
pm2 start "node /home/ubuntu/foundry/resources/app/main.js --dataPath=/home/ubuntu/foundryuserdata" --name foundry
D26. Double check pm2 has launched Foundry correctly:
pm2 list
If the status column does not show online then review step D25 above before continuing.
D27. Check to see if Foundry is running correctly by again connecting a browser tab to http://<public IP address>:30000
.
If you don’t see a Foundry screen in the browser at this point, carefully check the pm2 command in step 25. You can use commands like
pm2 stop
,pm2 list
, andpm2 delete
to remove any extra entries in the list.
D28. If the connection to Foundry is successful, use the following command to save Foundry so that it will start automatically:
pm2 save
D29. Foundry is now launched and is fully functional. You can test the interface and functions within Foundry at the http://<public IP address>:30000
address as you like.
If you do not wish to set up a domain or reverse proxy, you can stop here and continue to use Foundry in this way.
This section assumes that you have a valid domain name with an A record pointing to
<public IP address>
. If you do not have a domain name. you can use a service like Duck DNS to get a free domain and point it to<public IP address>
. Having a domain name is required for this section.
D30. Install Caddy to use as a reverse proxy by running the following commands:
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
D31. Now that Caddy is installed and running, modify the Caddyfile to include a reverse proxy to Foundry. Open the Caddyfile:
sudo nano /etc/caddy/Caddyfile
D32. Delete all the text, and replace it with (making sure to replace the your.hostname.com
portion with your actual domain name, do NOT put http://
or https://
in front of it):
You can delete text in
nano
by using the arrow keys to move the cursor and pressing the delete or backspace keys to delete text.
# This replaces the existing content in /etc/caddy/Caddyfile
# A CONFIG SECTION FOR YOUR HOSTNAME
your.hostname.com {
# PROXY ALL REQUEST TO PORT 30000
reverse_proxy localhost:30000
encode zstd gzip
}
# Refer to the Caddy docs for more information:
# https://caddyserver.com/docs/caddyfile
D33. Press ctrl-x and then y, and then enter to save the changes to the file.
D34. Restart Caddy to pick up the new settings by:
sudo service caddy restart
Caddy handles all forwarding to HTTPS as well as the encryption certificates. No further configuration is needed to get those working.
D35. Tell Foundry that we are running behind a reverse proxy by changing the options.json
file. Open the file for editing by:
nano /home/ubuntu/foundryuserdata/Config/options.json
D36. Find the hostname
, proxySSL
and proxyPort
parameters, and change them as below (making sure to replace the your.hostname.com
portion with your actual domain name, do NOT put http://
or https://
in front of it).
Leave all other options as they are.
...
"hostname": "your.hostname.com",
...
"proxyPort": 443,
...
"proxySSL": true,
...
Make sure to not delete any commas or other JSON elements while editing this file. Ensure that the hostname still has the quotes around it, and change ONLY the values afer the
:
D37. Press ctrl-x then y and enter to save your changes.
D38. Test your site by opening a new browser tab to your domain name. If everything is working, you will see Foundry load and the site will have the encrypted lock icon. It is now ready for use and no further configuration is needed.
Sometimes DNS records can take a few minutes and up to a couple hours to be recognized across the internet. If you receive an error along the lines of
server IP address could not be found
orhaving trouble finding that site
then the DNS records may just need more time. Wait a few minutes and try again.
D39. Restart the instance in order to apply any potentialy pending updates that require a restart and to test pm2
's ability to restart Foundry correctly.
sudo shutdown -r now
Give the instance a few minutes to restart. You should be able to connect to Foundry without issue once it is fully restarted. You should also be able to
ssh
into instance as in D2. If Foundry has not started up after a good 10 minutes, please check yourpm2
startup command as in D13 as well as thepm2
commands in D26 to D28.
D40. It is good practice to keep your new instance up to date with security patches. To do so, log in to the instance periodically with ssh as in D2 and run the following command:
sudo apt update && sudo apt upgrade -y
D41.Then, restart the instance as in D39.
This concludes the portion of the guide that sets Foundry up and running. You may now continue using Foundry this way without issue going forward. However, if you want to set up backups or configure the S3 storage you can continue below.
At the end of this section you will have a policy that automatically retains 5 rotating backups, allowing you to seamlessly restore from backup should something ever go wrong and know how to restore from backup when needed.
E1. Sign into your Oracle Cloud account, and from the Get Started page click on the three bars on the top left to open the menu. Click on Block Storage -> Backup Policies.
E2. Click Create Backup Policy.
E3. Enter a name such as foundry-backup
. Leave all other options default.
E4. Click Create Backup Policy.
E5. Click Add Schedule.
E6. Enter the following options (or change as you see fit):
Weekly
Monday
03:00
5
Incremental
Regional Data Center Time
This schedule will set a rotating backup of 5 weeks, with the oldest week being deleted as a new one is created after 5 weeks. You are able to set your own schedule as desired, however the Always Free Tier only includes 5 backups. If you exceed 5 backups, the oldest will be deleted regardless of the retention period.
E7. Click Add Schedule.
E8. Assign the backup policy to the existing volume on our Compute VM by clicking the menu button, and choosing Compute -> Instances.
E9. Click the Foundry instance.
E10. Scroll down the page, and click Boot Volume unde the Resources menu on the left side.
E11. Click the instance-xxxxxxxxx (Boot Volume) link under the Boot Volume Name heading.
E12. Click the Edit button near the top of the page, just under the instance-xxxxxx (Boot Volume) title.
E13. Scroll down the pop-out pane to Backup Policies, and select the foundry-backup policy from the dropdown. Click Save Changes.
E14. You have now given your instance a backup policy that will run automatically.
Note: Following the steps below in order requires that you have enough Always Free Tier resources available to have two instances and two boot volumes active at the same time. If you followed the guide exactly as above, this will be the case. If you have increased the CPU/RAM or Volume size above 2CPUs/12GBs or 100GB then you may be prevented from creating a new instance or boot volume or be charged a small amount for the time they are both active.
You can terminate the existing instance before step E17 to continue in this case. Be absolutely sure that you have a working backup if you choose to terminate the instance in advance. You risk losing all data if you terminate the instance and boot volume without a working backup.
Instructions for terminating the instance start at E24.
Some regions have limited availability for the
VM.Standard.A1.Flex
shapes. If your region does not have A1 availability, you will not be able to create a new instance as in step E19. Check back periodicially for more resources to become available. It may take a few days.
E15. From the Oracle Menu, click Storage then Block Storage.
E16. From the side menu, click Boot Volume Backups.
E17. Find the backup you want to restore. Most recent backups should be at the top of the list. Click the three-dot menu on that backup and click Restore Boot Volume.
E18. In the popup window, enter a Name such as Foundry-restored
for the boot volume and then select the same Backup Policy to ensure this new boot volume will continue to be backed up. Leave all other options as default.
If you do not have enough Always Free Tier resources for the above step (ie: existing boot volume above 100GB) you may be prevented from completing E17-E18 entirely, or may be charged money while both boot volumes are active.
E19. In the new Boot Volume Details window, wait for the boot volume to become available and then click Create instance
.
E20. Give the instance a name, such as Foundry-restored
. Scroll down to verify the Shape indicates VM.Standard.A1.Flex
with 1 core OCPU and 6 GB memory. The Image should be the Boot Volume Name
set in step E18.
Do not modify the image.
E21. Scroll down to Add SSH Keys and click Save Private Key
. Save this key in a safe location, preferrably the same location as you previously saved the SSH key. You will need this key if you ever want to connect to your instance via SSH in the future.
E22. Click Create
. You now have a new Always Free
A1 instance running that should not be disabled again.
If you do not have enough Always Free Tier resources for the above step (ie: existing boot volume above 100GB) you may be prevented from completing E19-E22 entirely, or may be charged money while both boot volumes are active.
E23. If you set up a domain name, you will need to point the domain's A record to the instances <Public IP address>
. If you did not set up a domain name, you can now connect to Foundry directly, using a link like this: http://<Public IP Address>:30000
E24. Once you have verified the new instance works correctly and contains the restored data, use the Oracle Menu to navigate to Compute -> Instances.
E25. On the old instance that is no longer needed, click the three-dot menu and click Terminate.
E26. In the window that pops up, make sure that Permanently delete the attached boot volume is checked
. Click Terminate Instance.
Be absolutely sure that this is the old instance and that your restored backup is functioning correctly before terminating. Terminating the instance will permanently delete it and all the data contained.
You should now have a working restored backup.
If you would like to access the files in your userdata directory directly to move, delete, manage, or bulk upload, then we will need to set up Cyberduck, Nemo, Nautilus or VSCode to do so.
F1. Download and install Cyberduck for your platform from the Cyberduck website.
F2. Once installed, open Cyberduck and click Open Connection:
F3. In the Open Connection window, click the dropdown menu and select SFTP (SSH File Transfer Protocol)
F4. Enter the following information in the corresponding fields, replacing any values in <>
with the values as earlier in the guide:
<your.domain.name>
or <server IP address>
ubuntu
Browse
and select your foundry.key
file. You may need to change the file type to All Files.F5. Click Connect
F6. Double click on the foundryuserdata
directory, then the Data
directory.
F7. Click the Bookmark menu, then New Bookmark. Close the window that pops up.
You now have a bookmarked connection in Cyberduck to the location of your Foundry userdata directory. Simply launch Cyberduck and double click the bookmark to connect and manage your files.
Linux users won't be able to install CyberDuck, but they don't need to, because they can simply connect to their server within their File Browser.
This section is for Linux users only. Windows and MacOS users can use Cyberduck above.
F8. Move the foundry.key
file that you created earlier in this guide to your ~/.ssh
directory, then open a terminal there.
F9. Create a new .pem
file from it:
openssl rsa -in foundry.key -text > foundry.pem
F10. Edit your .ssh
config:
gedit ~/.ssh/config
Add this entry:
Host foundry
HostName <public ip address>
User ubuntu
Port 22
IdentityFile ~/.ssh/foundry.pem
Compression yes
F11. Update the permissions of the new .pem
file and the .ssh
folder:
sudo chmod 600 foundry.pem
sudo chmod 755 ~/.ssh
F12. Open your File Browser.
Go to "Other Locations" and enter ssh://foundry
in the the text field on the bottom.
Go to File -> Connect to Server... and then enter foundry
where it says server
:
Visual Studio Code is a full featured, free IDE from Microsoft. With the support of the remote coding extension (also from Microsoft), you gain a full remote editor and file transfer platform. This allows you to remotely edit files and is a more complete service for power-users who may also be developing modules or wish to run services in addition to Foundry on the server.
F13. Download and install VSCode for your platform from the Microsoft VSCode website.
If on Windows you will also need to install the OpenSSH Client:
Open Settings, select Apps, then select Optional Features
At the top of the page select Add a feature, then findOpenSSH Client
, and select Install
F14. Install the free "Remote - SSH" extension from the VSCode Marketpace Page, ensuring you click the blue Install button.
F15. Press Ctrl + Shift + P to open the command palette and search for Open SSH Configuration File
, selecting the one for your user account.
F16. Fill in the config file with a name for your Server (Host), the public IP address of your server (HostName), your username (Ubuntu by default). Add a new line with an IdentityFile
followed by the path to your ssh key file.
Make sure to save the config file either with Ctrl + S or through a menu.
F17. For convenience we will store the key in the same folder as the configuration file, get there by right clicking on the config file name and selecting "Reveal in File Explorer" / "Reveal in Finder".
F18. Now that the connection is setup, go to the Remote Explorer tab in the sidebar and click the folder icon next to your server. If you get a popup asking you to chose the Operating system of the server choose Linux.
F19. A new window will open with the name of your server in the bottom left hand corner. Use the Open Folder button to open your foundrydata
folder. Congratulations, you now have access to a file editor, a file tree you can drag and drop files into and out of, and a terminal connected to your server.
At the end of this section you will confirm that your instance will not incur any charges and optionally set up a warning if charges do occur.
All resources mentioned and configured in this guide are Always Free
and should never incur any costs over the lifetime of the account. If all steps were followed carefully, the Cost Analysis below should always show no costs projected.
In the case that the Cost Analysis shows some cost projected either a non-free resource was created, or the A1 instance was created above the Always Free tier limits, or there is some kind of error on Oracle's end.
If you see a projected cost from the Cost Analysis and are within 30 days of account creation then contact Oracle Support by clicking the Help button at the top-right of the screen, and starting a chat or creating a support request.
G1. Open the Navigation Menu and click Governane & Administration -> Cost Management -> Cost Analysis
G2. On the Cost Analysis page, click to check the Show Forecast
option. This enables displaying future costs.
Accounts must be at least 10 days old to access the
Show Forecast
feature and may only forecast into the future the age of the account. For example, an account that is 11 days old can only forecast 11 days into the future.You may still conduct a Cost Analysis to confirm no costs have been incured in the recent past witout forecasting into the future.
G3. Choose the Granularity
, either Daily or Monthly.
G4. If forecasting, set a date many days or months into the future under End Forecast Date (UTC)
.
G5. Click Apply.
Note that it may take a few moments for the Cost Analysis to generate.
G6. Once it has finished generating, review the Cost Details. You should see a completely empty chart and a table with only zeroes, indicating no costs incured at any point including in the projected future.
If you see any projected costs here, please review all the services you've set up to ensure they have an
always-free
tag. If you are within 30 days of your account creation, please contact Oracle Support for further assistance.All steps in this guide have been carefully written to ensure that only
always-free
tagged resources are used and should not have any costs associated with them.
G7. On the same Cost Management page as above, click Budets.
G8. Click Create Budget.
G9. Enter foundry_budget
in the Name field.
G10. Enter Budget warning for Foundry cost forecast
in the Description field.
G11. Under Target Compartment choose your root
compartment.
G12. Under Monthly Budget Amount enter 1
.
G13. Under Budget Alert Rule (Optional) -> Threshold Metric choose Forecast Spend
to warn on upcoming charges.
G14. Under Threshold % enter 1
to warn on minimum forecast charges.
G15. Enter any Email Recipients where you would like to receive these warnings.
G16. Click Create.
You now have a warning that will send you an email on the first of the month if there are any projected costs whatsoever.
If you have a message from Foundry telling you that you must updated your NodeJS version, this section will walk you through how to do that. At the end of this section you'll have the latest NodeJS version installed and Foundry up and running.
H1. Reconnect to your Oracle instance, as in step D2.
H2. Once successfully connected, follow the the updating steps as outlined in the Recommended Linux Install Guide.
Once completed, you are good to go!
At the end of this section, you will have a functional S3 storage bucket that Foundry can access to store assets under the “Amazon S3” tab in the file picker. This allows you to have extra storage beyond that provided by the instance volume and serve large assets more efficiently.
S3 storage can provide a way for large assets to be served to players in a more efficient way than from the instance created earlier in this guide. In most cases, Foundry scenes should load quickly without using S3. Setting up an S3 store is only recommended in cases where faster loading speeds or more storage space is required.
This section has been removed since reports of it not playing well within Foundry. Once a fix has been found, it will be modified and updated. If an S3 store is desired/needed, please look into setting up an AWS S3 store.
This section helps users who have had their A1 Ampere instances disabled at the end of the trial account period. These instances are still Always Free
and can continue to be used. Once restored as described below, the instances should remain running without issue or fear of being disabled.
To see why the instance has been disabled, check step B4 in the archived information.
To create a new instance that retains all data up to the point it was disabled:
J1. To be safe, create a backup of your Boot Volume by going to Compute -> Instances -> <Instance Name>
J2. Scroll down to Boot Volume -> Click the <Boot Volume Name>
J3. Scroll down to Boot Volume Backups and click Create Boot Volume Backup
. Enter a name for the backup, and click Create Boot Volume Backup
. This backup is not technically needed, but is good to have just in case.
J4. Go to Compute -> Instances and click on the Foundry
instance. Click More Actions and choose Terminate
. Make absolutely sure that Permanently delete the attached boot volume
is NOT CHECKED.
J5. Wait for the instance status to change from Terminating
to Terminated
. You may need to refresh the page.
J6. Scroll down to Boot Volume and click the <Boot Volume Name>
.
J7. At the top of the page, click Create Instance
.
J8. Give the instance a name, such as Foundry
. Scroll down to verify the Shape indicates VM.Standard.A1.Flex
with 1 core OCPU and 6 GB memory. The Image should be the Boot Volume Name
.
Optionally, you can edit the shape to be up to 4 core OCPU and 24GB memory. As part of the
Always Free
services, you get up to 4 core OCPU and 24GB of member spread over up to 4 A1 instances. Please allocate accordingly.Do not modify the image.
J9. Scroll down to Add SSH Keys and click Save Private Key
. Save this key in a safe location, preferrably the same location as you previously saved the SSH key. You will need this key if you ever want to connect to your instance via SSH in the future.
J10. Click Create
. You now have a new Always Free
A1 instance running that should not be disabled again.
J11. If you set up a domain name, you will need to point the domain's A record to the instances <Public IP address>
. If you did not set up a domain name, you can now connect to Foundry directly, using a link like this: http://<Public IP Address>:30000
This section contains the instructions needed to remove the current installation, and replace it with a cleanly installed new version. It does not touch your userdata in any way.
K1. Reconnect to your Oracle instance, as in step D2.
K2. Once successfully connected, follow the the updating steps as outlined in the Recommended Linux Install Guide.
This section contains outdated information, left here for reference only. This information is outdated and should only be used to reference previous instructions for informational purposes.
The section below is reproduced as it was written before January 20th, 2022.
B4. Added September 2021: Due to changes in the way trial accounts work, accounts must be upgraded to Pay As You Go accounts to retain services long-term without interruption. This guide is specifically written to use only Always Free
services that will not incur any charges on a Pay As You Go account.
As of September 2021 (possibly earlier), Oracle terminates the Always Free
A1 Ampere instances used in this guide after roughly 60 days unless an account has been upgraded to Pay As You Go. This is confirmed in their FAQ under the What happens when my Free Trial expires or my credits are used up? heading:
Resources identified as Always Free will not be reclaimed. After your Free Trial expires, you'll continue to be able to use and manage your existing Always Free resources, and can create new Always Free resources according to tenancy limits.
However, Ampere A1 Compute instances are disabled when your trial ends and then deleted (terminated) after 30 days, unless you upgrade to a paid account. To continue using Arm-based compute instances as an Always Free user, you must delete your existing Ampere A1 Compute instances and create new Ampere A1 Compute instances.
(Text quoted 2021-09-14)
In order to avoid data loss and service interruption, the upgrade to Pay As You Go must be done before the A1 instance is disabled.
If you use only resources tagged with the Always Free
tag, you will never be charged for them regardless if you have a trial account or a Pay As You Go account. This guide has been written to only use those specific resources.
See What are Always Free services? and Always Free Resources.
When upgrading your account to Pay As You Go, you may see temporary authorization charges on your credit card (depending on region). These charges should be released within a few days once the authorization is complete.
We recommend conducting a Cost Analysis after completing this guide for peace of mind. The account must be a minimum of 10 days old to conduct a cost analysis forecast.
If you see any other charges on the credit card, contact Oracle support.
You can continue to use this guide and set up all the services without upgrading to Pay As You Go. As per the Oracle Always Free FAQ, your A1 instance (the cloud server you set up that runs Foundry) may be disabled and eventually deleted if you don't upgrade to Pay As You Go. See What happens when my Free Trial expires or my credits are used up?
You can set everything up in this guide without upgrading to Pay As You Go immediately, however if you don't do so before your A1 instance is disabled you risk losing data and would need to re-set up your server.
We recommend upgrading your account now so that you do not risk having services disabled, however you are free to choose when/if you upgrade your account.
We highly recommend setting up backups in Section E Backup Policy Setup to minimize potential data loss.
You can continue to follow this guide without upgrading to Pay As You Go. All the services will work without issue for at least the first 30 days since your account creation.
After the first 30 days, your A1 instance will be disabled. This instance is what Foundry is running on. Your Foundry will become inaccessible and it will look like your Foundry installation is down.
After an additional 30 days, the Foundry A1 instance will be deleted (terminated) including any data that is not backed up.
After that point, you must delete the existing A1 instance, and recreate a new A1 instance (pending availability in your region) and attach it to your existing Boot Volume (or a volume restored from backup).
Instructions on how to restore from backup can be found in the Oracle Documentation.
If you'd like to continue without setting up a Pay As You Go account, skip ahead to Compute and Networking Setup.
If your instance has been disabled, you must create a new A1 instance to continue using the Always Free Tier. You can keep the same boot volume and all data on it.
Please follow the steps in the Restore Disabled A1 Instance section.
B5. Open the navigation menu and click Governance & Administration -> Cost Management -> Payment Method.
B6. Under Account Type, select Pay As You Go.
If you get a message that
this account is manage by enterprise agreement
andupgrade operation is not available
then your account has not finished provisioning. Please wait a few minutes until your account has finished provisioning.If your account does not complete provisioning after 30 minutes, please contact Oracle support
B7. If present, Edit your current credit card information or Add a new credit card. Click Finish when completed.
B8. Read the terms and conditions and check
the check box to indicate your agreement.
Read carefully. Starting a Pay As You Go account may require temporary authorization charges to be made against your credit card.
B9. Click Start Paid Account.
B10. Once you complete the remainder of this guide, be sure to review a Cost Analysis to ensure that no costs will be incured. The account must be at least 10 days old to forecast costs into the future, but you may view past costs before that date as confirmation.
The text above this point is archived text from before January 20, 2022.