---
title: Working with Compute services
summary: null
url: >-
  https://www.fastly.com/documentation/guides/getting-started/services/working-with-compute-services
---

You can [create a Compute service](https://www.fastly.com/documentation/guides/getting-started/services/working-with-compute-services#creating-a-new-compute-service) and connect it to a Compute project directly from the Fastly control panel. Once you create your service, you can make refinements and updates to your configuration through the [CLI](https://www.fastly.com/documentation/reference/tools/cli/) or by [editing the service](https://www.fastly.com/documentation/guides/getting-started/services/working-with-compute-services#editing-and-activating-versions-of-services) in the Fastly control panel, depending on the task you're trying to complete.

The Fastly control panel also allows you to do [other things](https://www.fastly.com/documentation/guides/getting-started/services/working-with-compute-services#other-things-you-can-do) to manage existing Fastly services, like [deactivate](https://www.fastly.com/documentation/guides/getting-started/services/working-with-compute-services#deactivating-a-service) or [reactivate](https://www.fastly.com/documentation/guides/getting-started/services/working-with-compute-services#reactivating-a-service) them and [delete](https://www.fastly.com/documentation/guides/getting-started/services/working-with-compute-services#deleting-a-service) them.

## Before you begin

Before you create your first Fastly service, be sure you understand [how services and versions work](https://www.fastly.com/documentation/guides/getting-started/services/about-services) and [service creation limits](https://www.fastly.com/documentation/guides/getting-started/services/about-services#service-creation-limits). You'll also need to understand the Fastly [web interface controls](https://www.fastly.com/documentation/guides/getting-started/navigating-fastly/about-the-web-interface-controls) before using them to work with your Fastly services.

Some steps require using the [Fastly CLI](https://www.fastly.com/documentation/reference/tools/cli/). If you haven't already, follow the steps for [creating an API token](https://www.fastly.com/documentation/guides/account-info/user-and-account-management/using-api-tokens#creating-api-tokens), making sure it has `global` scope. Then, download and install the [Fastly CLI](https://www.fastly.com/documentation/reference/tools/cli/) and use that token to [authenticate](https://www.fastly.com/documentation/guides/compute/getting-started-with-compute/#generate-an-api-token) your account before continuing.

## Creating a new Compute service

There are several ways to create a Compute service:

- Use one of our **starter kits**, which provide the basic set up for a Compute project.
- Upload an **existing project** from your computer.
- Create an **empty service** and finish setting up things later.

### Starter kit

Our Compute starter kits provide you with a simple project that demonstrates basic Compute behavior. When creating a Compute service from a starter kit, all you need to provide is service name and domain information before deploying your project.

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2. Go to **[Compute](https://manage.fastly.com/compute)**.
3. Click **Create a Compute service** to start the Compute service setup.
4. Click **Use starter kit** to create a new Compute service from a starter kit.
5. Fill out the service name and domain information:
   - In the **Service name** field, enter a descriptive name for your service (e.g., `My Example Compute Service`).
   - _(Optional)_ Fastly automatically generates a domain name for you using the `.edgecompute.app` extension. If you want Fastly to [route requests to your personal domain](https://www.fastly.com/documentation/guides/getting-started/domains/working-with-domains/working-with-domains), enter the domain in the **Domain** field. You can also add additional domains after set up.
   - _(Optional)_ Leave the checkbox selected to issue a TLS certificate for the domain you entered.
6. Click **Next**.
7. Select from one of our starter kits. We recommend choosing the default starter for your chosen language. You can learn more about these languages and core feature differences in our [developer guide](https://www.fastly.com/documentation/guides/compute/getting-started-with-compute/#choose-a-language-to-use).
8. Click **Finalize and deploy**.

   The final page of the Compute service setup includes the status of your deployment, a command to set up your local environment, information for pointing your personal domain at Fastly, and high-level service details.

### Checking deployment status

It takes a few minute for your service to deploy globally in our network. Once deployed, a success message appears on the Compute service setup page. If your deployment fails, a failure message appears along with the reason for the failure and option to re-try or re-start.

### Setting up your local environment

While you wait for the service to deploy, you can set up your local development environment. This allows you to work with your Compute project. Copy the `fastly compute init` command from the Compute service setup page and run it in your terminal, making sure you're in the directory where you want to store the project. Follow the onscreen prompts to complete set up.

### Pointing your domains at Fastly

If you elected to automatically issue a TLS certificate for your domain, use the provided DNS records to [create records and verify domain ownership](https://www.fastly.com/documentation/guides/getting-started/domains/working-with-domains/working-with-cname-records-and-your-dns-provider).

### Viewing service details

The Service Details section provides a high-level overview of the details and status of your service creation. You can view the service name, Fastly domain, and service ID. You can also see a status indicating if you've finished deploying and connected to your local machine.

 From here, you can [edit your service configuration](https://www.fastly.com/documentation/guides/getting-started/services/working-with-compute-services#editing-and-activating-versions-of-services). You can also open the Fastly-assigned domain in your browser to verify your service is working.

### Bring your own code

If you already have a Compute project started on your local machine, you can use the Fastly control panel to create a new Compute service then upload your project to the service.

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2. Go to **[Compute](https://manage.fastly.com/compute)**.
3. Click **Create service** to start the Compute service setup.
4. Click **Upload from my computer**.
5. Fill out the service name and domain information:
   - In the **Service name** field, enter a descriptive name for your service (e.g., `My Example Compute Service`).
   - _(Optional)_ Fastly automatically generates a domain name for you using the `.edgecompute.app` extension. If you want Fastly to [route requests to your personal domain](https://www.fastly.com/documentation/guides/getting-started/domains/working-with-domains/working-with-domains), enter the domain in the **Domain** field. You can add additional domains after set up.
   - _(Optional)_ Leave the checkbox selected to issue a TLS certificate for the domain you entered.
6. Click **Next: Upload your project**.
7. From the **Deploy your project** area, copy the `fastly compute publish` command containing your service ID details.
8. On your computer run the command to build and deploy your project in the directory containing your project.

### Checking deployment status

It takes a few minutes for your service to deploy globally in our network. Once deployed, a success message appears on the Compute service setup page. If your deployment fails, a failure message appears along with the reason for the failure and option to retry or restart.

### Pointing your domains at Fastly

If you elected to automatically issue a TLS certificate for your domain, use the provided DNS records to [create records and verify domain ownership](https://www.fastly.com/documentation/guides/getting-started/domains/working-with-domains/working-with-cname-records-and-your-dns-provider).

### Empty service

You can create an empty Compute service, which is a service without a project or domains attached. You can explore the different service configurations and add your Compute project and domain when ready.

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2. Go to **[Compute](https://manage.fastly.com/compute)**.
3. Click **Create service** to start the Compute service setup.
4. Click **Create empty service**.

### About the Service summary and Service configuration tabs

After you create your service, you'll see three tabs: Service summary, Service configuration, and Learn.

The **Service summary** tab lets you review general service details including the [event log](https://www.fastly.com/documentation/guides/account-info/user-and-account-management/reviewing-service-activity-with-the-event-log), duplicate (clone) service versions so you can edit them, and [purge content](https://www.fastly.com/documentation/guides/full-site-delivery/purging). The Service summary tab also allows you to [compare differences](https://www.fastly.com/documentation/guides/getting-started/services/working-with-compute-services#comparing-different-service-versions) between two configuration versions.

The **Service configuration** tab contains the main controls for [editing](https://www.fastly.com/documentation/guides/getting-started/services/working-with-compute-services#editing-and-activating-versions-of-services) your service configuration to define exactly how each instance of your Compute services should behave and interact with its data sources. Specifically, you can:

- manage the [domains](https://www.fastly.com/documentation/guides/getting-started/domains/working-with-domains/working-with-domains) used to route requests to a Compute service
- manage the [hosts](https://www.fastly.com/documentation/guides/getting-started/hosts/working-with-hosts) used as backends for a site and how they should be accessed
- manage the [health checks](https://www.fastly.com/documentation/guides/getting-started/hosts/working-with-health-checks) that monitor backend hosts
- enable certain Fastly products for the service, if you are [assigned the role of superuser or engineer](https://www.fastly.com/documentation/guides/account-info/user-and-account-management/about-user-roles-and-permissions/#user-roles-and-what-they-can-do). Note that this will result in changes to your monthly bill.
- specify how [logging](https://www.fastly.com/documentation/guides/integrations/logging-endpoints) should be performed and where server logs should be sent
- upload your Compute compatible Wasm packages once you've built them with [the Fastly CLI](https://www.fastly.com/documentation/reference/tools/cli/)
- view the metadata of your Compute Wasm package

The **Learn** tab provides resources for using Fastly's edge serverless computing platform including [language guides](https://www.fastly.com/documentation/guides/compute/developer-guides/), deployment and workflow methods, and [CLI reference](https://www.fastly.com/documentation/reference/cli/).

## Editing and activating versions of services

With the appropriate permissions, you can activate configuration changes immediately and roll back those changes just as quickly should they not have the intended effect. Fastly locks versions of services you've already activated to make rollbacks safer and provide version control. You can duplicate (_clone_) any existing service version and edit that cloned version. You must _activate_ new versions of services to deploy their configurations. Configuration changes are never automatically activated.

To clone a service version, follow these steps::

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2.   From the [**Home**](https://manage.fastly.com/home) page, select the appropriate service. You can use the search box to search by ID, name, or domain.

3. From the **Service configuration** tab, click **Clone**.

A new version of the service is created and appears in the [event log](https://www.fastly.com/documentation/guides/account-info/user-and-account-management/reviewing-service-activity-with-the-event-log). You can immediately start making edits to this service.

You can also clone a service or select a service version to edit from the Service summary tab:

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2.   From the [**Home**](https://manage.fastly.com/home) page, select the appropriate service. You can use the search box to search by ID, name, or domain.

3. From the **Edit configuration** menu, select the appropriate service configuration action:
   - Select **Clone version _[version number]_ (active)** to clone the active version of the service for editing.
   - Select **Edit version _[version number]_ (latest draft)** to edit the latest draft of the service.

To activate a service version, follow these steps:

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2.   From the [**Home**](https://manage.fastly.com/home) page, select the appropriate service. You can use the search box to search by ID, name, or domain.

3. From the **Activate** menu on the **Service configuration** tab, click **Activate on Production**. The new version of the service is activated and appears in the [event log](https://www.fastly.com/documentation/guides/account-info/user-and-account-management/reviewing-service-activity-with-the-event-log).

## Switching between services and service versions

To switch between services associated with your account, follow these steps:

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2.   From the [**Home**](https://manage.fastly.com/home) page, select the appropriate service. You can use the search box to search by ID, name, or domain.

3. From the **Service summary** or **Service configuration** page, click the switcher <span class="inline-icons"><img src="/img/icons/chevron-down.png" alt="Chevron down icon" /></span> to the right of the service name.

   ![The service switcher](/img/service-switch-selection.png)

4. Select the appropriate service from the list that appears.

To switch between versions of a specific service, follow these steps:

1. From the **Service configuration** page, click the switcher <span class="inline-icons"><img src="/img/icons/chevron-down.png" alt="Chevron down icon" /></span> to the right of the version number.

   ![The service version switcher](/img/service-version-selection.png)

2. Select the appropriate version from the list that appears.

## Deleting a service

Fastly allows you to delete any service you create, along with all of its versions. Fastly does not offer a way to delete specific versions of a service, however. Service versions are meant to be a historic log of the changes that were made to a service. To undo changes introduced by a particular service version, you can always go back to a previous version and [reactivate](https://www.fastly.com/documentation/guides/getting-started/services/working-with-compute-services#reactivating-a-service) or clone a new service version based on any old version.

To delete any service along with all of its versions, follow the steps below:

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2.   From the [**Home**](https://manage.fastly.com/home) page, select the appropriate service. You can use the search box to search by ID, name, or domain.

3. From the **Options** menu, select **Deactivate**.
4. Click **Confirm and deactivate** to confirm you want to deactivate your service and acknowledge that you no longer want to serve traffic with it.
5. From the **Options** menu, select **Delete** and then click **Confirm and delete** to delete the service.

> **WARNING:** To minimize the risk of unauthorized use of your domains, we strongly recommend modifying or deleting any [DNS CNAME records](https://www.fastly.com/documentation/guides/getting-started/domains/working-with-domains/working-with-cname-records-and-your-dns-provider) pointing to the Fastly hostname associated with the deleted service. Follow the instructions on your DNS provider's website.

## Other things you can do

In addition to [creating](https://www.fastly.com/documentation/guides/getting-started/services/working-with-compute-services#creating-a-new-compute-service) or [editing](https://www.fastly.com/documentation/guides/getting-started/services/working-with-compute-services#editing-and-activating-versions-of-services) services, you can [rename](https://www.fastly.com/documentation/guides/getting-started/services/working-with-compute-services#renaming-services) them and [delete](https://www.fastly.com/documentation/guides/getting-started/services/working-with-compute-services#deleting-a-service) them. You can also [stage](https://www.fastly.com/documentation/guides/getting-started/services/working-with-compute-services#staging-service-versions), [deactivate](https://www.fastly.com/documentation/guides/getting-started/services/working-with-compute-services#deactivating-a-service), or [reactivate](https://www.fastly.com/documentation/guides/getting-started/services/working-with-compute-services#reactivating-a-service) specific versions of them.

### Renaming services

To rename your service, follow the steps below:

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2.   From the [**Home**](https://manage.fastly.com/home) page, select the appropriate service. You can use the search box to search by ID, name, or domain.

3. From the **Options** menu, select **Edit service name**.
4. In the **Service name** field, enter a new service name.
5. Click **Apply**. The newly renamed service name appears.

### Staging service versions

Our [Staging documentation](https://www.fastly.com/documentation/guides/getting-started/services/working-with-staging) provides more information on testing changes to service configurations on a staging network before deploying them to production.

### Adding comments to service versions

Service versions can include comments to label them (e.g., to identify reasons for changes in that version). You can add and update version comments on both locked and activated service versions.

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2.   From the [**Home**](https://manage.fastly.com/home) page, select the appropriate service. You can use the search box to search by ID, name, or domain.

3.   Click **Edit configuration** and then select the option to clone the active version.

4. From the Service configuration tab, click **Add version comment**.

   ![the add comment link](/img/add-version-comment.png)

5. In the **Comment** field, enter a meaningful comment for the version.

6. Click **Save**. The truncated version of the comment appears where the Add comment link used to be.

   ![the service version](/img/version-comment-text.png)

You can view service version comments at any time by clicking the version switcher to the right of the version number. Version comments also appear in the [event log](https://www.fastly.com/documentation/guides/account-info/user-and-account-management/reviewing-service-activity-with-the-event-log) to help with account activity monitoring.

### Comparing different service versions

To compare two versions of a service, follow the steps below:

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2.   From the [**Home**](https://manage.fastly.com/home) page, select the appropriate service. You can use the search box to search by ID, name, or domain.

3. Click **Diff versions**. The Diff versions page appears.

   Removals are highlighted in red and the additions and changes are highlighted in green. Any large blocks of unaffected configuration lines can be expanded and viewed or collapsed and hidden by clicking on the plus <span class="inline-icons"><img src="/img/icons/plus.png" alt="Plus icon" /></span> sign to the left of the actual changes, next to the line numbers.

   ![an example comparison of two service versions](/img/diff-versions-example.png)

   > **HINT:** You can change the compared service versions by clicking **Switch versions** and selecting a different version number in the menu that appears.

### Deactivating a service

To deactivate a service, follow the steps below:

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2.   From the [**Home**](https://manage.fastly.com/home) page, select the appropriate service. You can use the search box to search by ID, name, or domain.

3. From the **Options** menu, select **Deactivate**.
4. In the **Enter service name** field, enter the exact service name to deactivate.
5. Click **Confirm and deactivate** to confirm you want to deactivate your service and acknowledge that you no longer want to serve traffic with it.

> **WARNING:** To minimize the risk of unauthorized use of your domains, we strongly recommend modifying or deleting any [DNS CNAME records](https://www.fastly.com/documentation/guides/getting-started/domains/working-with-domains/working-with-cname-records-and-your-dns-provider) pointing to the Fastly hostname associated with the deactivated service. Follow the instructions on your DNS provider's website.

You can also [activate or deactivate a service via the API](https://www.fastly.com/documentation/reference/api/services/version/). Did you accidentally delete a service? [We can help](https://www.fastly.com/documentation/guides/getting-started/services/working-with-compute-services#getting-help-with-accidental-service-deletions).

### Reactivating a service

To reactivate a service, follow the steps below:

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2.   From the [**Home**](https://manage.fastly.com/home) page, select the appropriate service. You can use the search box to search by ID, name, or domain.

3.   Click **Edit configuration** and then select the option to clone the active version.

4. From the **Activate** menu, select **Activate on Production**. The service is reactivated.
5. If you removed the DNS CNAME records for the service's domains when you deactivated the service, you should [add new DNS CNAME records](https://www.fastly.com/documentation/guides/getting-started/domains/working-with-domains/working-with-cname-records-and-your-dns-provider) now.

### Getting help with accidental service deletions

Services can be [deactivated](https://www.fastly.com/documentation/guides/getting-started/services/working-with-compute-services#deactivating-a-service) or [deleted](https://www.fastly.com/documentation/guides/getting-started/services/working-with-compute-services#deleting-a-service). Deactivated services can be reactivated at any time, but once they've been deleted you must [contact Customer Support](https://support.fastly.com) to have them restored. When sending your request, remember to include:

- your [customer ID](https://www.fastly.com/documentation/guides/account-info/user-and-account-management/changing-company-profile-details)
- your company name
- your service ID (the name of the service you want restored)

Customer Support will notify you when your service has been restored.

## What's next

Learn more about working with [Compute services](https://www.fastly.com/documentation/guides/compute/getting-started-with-compute/).

## Related content

- [About services](https://www.fastly.com/documentation/guides/getting-started/services/about-services)
- [Compute documentation](https://www.fastly.com/documentation/guides/compute/)
- [Service API documentation](https://www.fastly.com/documentation/reference/api/services/service/)
