How to Deploy a RunPod Server
This guide is intended for developers who are developing custom nodes for ComfyUI on RunPod
Creating a new RunPod Account and SSH key pair
-
Create a RunPod.io account, and add some funds.
-
Start a Powershell or terminal of your choice, then run a command like the following:
This will generate a pair of files. For me, the files are ryanrunpod
, and ryanrunpod.pub
Add SSH public key to RunPod
-
Locate your public key file (the one that ends in .pub), open it in notepad, and copy the contents
-
Add the public key to your RunPod account Settings > SSH Public Keys.
-
From the RunPod dashboard, click Connect to obtain the username or port to connect to. There are two examples provided on the Connection Options tab. You can alternatively use the web console.
- Basic SSH Terminal: Uses a unique userid with port 22 (Recommended)
- SSH over exposed TCP: Uses
root
for the userid and a unique port
SSH is now set up for your RunPod account, so you can use it with any servers you provision.
Deploying a new RunPod server
- From the Pods page, click Deploy
- Select an appropriate GPU (ex: RTX 4090) and make the following changes:
- Click Storage, then Network Volume. Pick a suitable name, region, and size for the volume. You can add more size later if you run out. It is important to create a network volume, otherwise, your data will be lost when the server is stopped.
- Click Change Template, select
Torch 2.4.0
Alternatively, you can choose this RunPod template which is pre-configured with the settings below - Click Edit Template, set the ports:
- Expose HTTP Ports to
8888,8188
- Expose TCP Ports to
22,8889
- Expose HTTP Ports to
- Click Set Overrides to save the changes
- Click Storage, then Network Volume. Pick a suitable name, region, and size for the volume. You can add more size later if you run out.
- Click Deploy On-Demand
- Proceed to Install Conda, ComfyUI, and ComfyStream
Stopping a RunPod Server
Stopping pods helps lower costs on RunPod. Pods must also be stopped before making any port mapping changes.
To stop a RunPod server, you can run the following command from inside the pod: