Skip to main content

Rentals

This guide will walk you through creating, configuring, and connecting to your first Rental.

What is a Rental?

A Rental is a dedicated, persistent container that provides the experience of a traditional virtual private server. While it runs as a lightweight and fast-starting container, it gives you a stateful environment with full root access and SSH connectivity. This makes Rentals ideal for long-running tasks, interactive development environments, and any workload that requires the control and stability of a dedicated machine.

Before you begin

To get the most out of Rentals, you should be familiar with:

  • The command-line terminal: Basic shell commands and navigation.
  • SSH: You'll need an SSH key to securely connect to your rental.
  • Docker (recommended): While you can start with pre-configured templates, a basic understanding of Docker images, containers, and volume mounting will be helpful.

Creating a Rental

  1. Navigate to the Rentals Page:

    • Go to the Dashboard, go to the Rentals section and click on Create Rental.
  2. Select Server Configuration:

    • Start by choosing your desired hardware type, either GPU or CPU. Based on your selection, a list of available server configurations will be displayed.
  3. Choose Configuration:

    • Public Template: Use a pre-configured public template to quickly set up your environment. These templates come with popular software and libraries pre-installed.
    • Private Template: If you have saved your own custom configurations, you can use a private template to launch a new rental with the same setup.
    • Custom: This allows you to specify everything from the Docker image to environment variables.
  4. Custom Configuration Details:

    • Image: Specify the image to be used for your rental. You can use public images from Docker Hub, GitHub Container Registry, and Quay.io, or use your own private images.
    • Commands: Specifies the program(s) that run when your rental starts. For example, use python to run a Python script. If you leave this empty, it will use the default command defined in the image.
    • Arguments: Provide any inputs or options for the command(s). Similarly, if your command is python, the argument could be the script you want to run, like my_script.py.
    • Service Ports: Expose a service port for your container.
    • Environment Variables: Add any environment variables required by your application.
  5. Mount Storage (Optional): To save data, you can attach a pre-existing volume, or add a new volume to your rental.

  6. Set Default Shell: Choose the default shell for your rental (e.g., /bin/bash, /bin/zsh).

  7. Add SSH Key: To access your rental, you need to add an SSH key. You can add a new key or use an existing one.

  8. Rental Name: Give your rental a descriptive name.

  9. Deploy: Click Create Rental to deploy your new server. Your rental will be available in a few seconds.

Connecting to your Rental

Once your Rental is running, you can connect to it using SSH.

  1. Copy the SSH Command: The easiest way to connect is to go to your Rental's detail page in the Targon dashboard. You will find the complete SSH command ready to be copied.

  2. Open Your Terminal: Launch a terminal or command prompt on your local machine.

  3. Paste and Run: Paste the command into your terminal. If you're using an private key that is not being used by default you'll need to add an additional flag.

    Understanding the Command
    The command will look similar to this:

    ssh <YOUR_RENTAL_ID>@ssh.deployments.targon.com

    <YOUR_RENTAL_ID>: This is the unique ID for your Rental, which is used as the SSH username.

    Example: If your rental ID is rentals-abc123 the command would be:

    ssh rentals-abc123@ssh.deployments.targon.com