|
| 1 | +--- |
| 2 | +title: Cloud Templates – Installation & Usage |
| 3 | +description: Set up, connect to, and use Cloud Templates inside Factory sessions |
| 4 | +--- |
| 5 | + |
| 6 | +A **cloud template** is a fully-configured, on-demand development environment that lives in the cloud. Cloud templates give you the same tools and dependencies you'd expect locally, so you can build, test, and run code directly from Factory. |
| 7 | + |
| 8 | +<Note> |
| 9 | + To get the most out of cloud templates, configure environment variables and a setup script during template creation. The setup script installs dependencies and prepares your development environment automatically, ensuring every team member has an identical setup. |
| 10 | +</Note> |
| 11 | + |
| 12 | +## System Requirements |
| 13 | + |
| 14 | +- A repository enabled in Factory |
| 15 | +- Manager role or higher to create cloud templates |
| 16 | + |
| 17 | +<Steps> |
| 18 | + |
| 19 | + <Step title="Open Session Settings"> |
| 20 | + 1. In Factory, click the **Settings** icon from the left sidebar. |
| 21 | + 2. Select **Session**. |
| 22 | + 3. Scroll down to **Cloud Templates**. |
| 23 | + </Step> |
| 24 | + |
| 25 | + <Step title="Create a New Cloud Template"> |
| 26 | + 1. Click **Create Template**. |
| 27 | + 2. Enter the repository you want to use. |
| 28 | + 3. Give your template a friendly name (e.g., “frontend-template”). |
| 29 | + 4. (Optional) Configure a setup script to run during template initialization. |
| 30 | + 5. Click **Create**. |
| 31 | + <Note> |
| 32 | + Factory clones your repo and prepares the environment—this can take a minute for large projects. |
| 33 | + </Note> |
| 34 | + </Step> |
| 35 | + |
| 36 | + <Step title="Verify Template Ready"> |
| 37 | + The new template appears in the list with a status indicator. Once it shows **Ready**, you can use it from any session. |
| 38 | + </Step> |
| 39 | + |
| 40 | +</Steps> |
| 41 | + |
| 42 | +--- |
| 43 | + |
| 44 | +## Launching a Cloud Template inside a Session |
| 45 | + |
| 46 | +<Steps> |
| 47 | + |
| 48 | + <Step title="Open or Start a Session"> |
| 49 | + Join any Factory session as usual. |
| 50 | + </Step> |
| 51 | + |
| 52 | + <Step title="Connect to Cloud Machine"> |
| 53 | + 1. On the session start page, click the Machine Connection button. |
| 54 | + 2. Choose **Remote** tab. |
| 55 | + 3. Select the template you created earlier. |
| 56 | + 4. Factory attaches the cloud template to your session. |
| 57 | + |
| 58 | + <Frame> |
| 59 | +  |
| 60 | + </Frame> |
| 61 | + </Step> |
| 62 | + |
| 63 | + <Step title="Confirm Connection"> |
| 64 | + A green indicator and remote working directory appear on the top-right next to your profile dropdown menu. You’re now interacting with the cloud template. |
| 65 | + </Step> |
| 66 | + |
| 67 | +</Steps> |
| 68 | + |
| 69 | +--- |
| 70 | + |
| 71 | +## Everyday Usage |
| 72 | + |
| 73 | +<CardGroup cols={2}> |
| 74 | + |
| 75 | + <Card title="Run CLI Commands" icon="terminal"> |
| 76 | + Use the **Terminal** toolkit to execute commands like: |
| 77 | + <pre>npm run dev |
| 78 | +pytest |
| 79 | +git status</pre> |
| 80 | + Output streams live into chat and logs. |
| 81 | + </Card> |
| 82 | + |
| 83 | + <Card title="Edit & Save Files" icon="file-code"> |
| 84 | + Open files from the repo, make changes, and save. |
| 85 | + Files persist in the cloud template and can be committed upstream when ready. |
| 86 | + </Card> |
| 87 | + |
| 88 | + <Card title="Auto-Save Controls" icon="save"> |
| 89 | + Auto-save is disabled by default—enable it from the **Session Settings** panel whenever you want live file syncing. |
| 90 | + </Card> |
| 91 | + |
| 92 | +</CardGroup> |
| 93 | + |
| 94 | +--- |
| 95 | + |
| 96 | +## Troubleshooting & Help |
| 97 | + |
| 98 | +<AccordionGroup> |
| 99 | + |
| 100 | + <Accordion title="Can't connect from session"> |
| 101 | + Ensure you: |
| 102 | + 1. Selected **Remote Machine** (not Local). |
| 103 | + 2. Refresh the page, or try again in a different session |
| 104 | + </Accordion> |
| 105 | + |
| 106 | +</AccordionGroup> |
| 107 | + |
| 108 | +<Card title="Need More Help?" icon="life-ring" href="/web/machine-connection/cloud-templates/troubleshooting"> |
| 109 | + Visit the full Cloud Template Troubleshooting Guide |
| 110 | +</Card> |
0 commit comments