> ## Documentation Index
> Fetch the complete documentation index at: https://docs.revolte.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Web Service

> Configure repository preferences and environment settings for a web service.

This guide explains how to configure a Web service as your next service in Revolte, covering both Repo Preference and Environment Settings. Visual references are provided for each step.

<Steps>
  <Step title="Choose a Preset">
    <img src="https://mintcdn.com/poddle-54594c3d/q0Rk3K5lGk3vHIWm/image-v2/guides/web-service/web-service-1.png?fit=max&auto=format&n=q0Rk3K5lGk3vHIWm&q=85&s=9e63b0b48499f8de516fe981466f8af5" alt="Choose Webservice Preset" width="2734" height="1436" data-path="image-v2/guides/web-service/web-service-1.png" />

    The preset chooser shows a grid of service options. The **Webservice** tile is highlighted for standard APIs or microservices.

    > **Note:** If your service requires a database, you can select the **Web Service + Database** preset to configure both resources simultaneously.
  </Step>

  <Step title="Repo Preference">
    The Repo Preference tab is identical across all service presets. See [Repository Preference](/yaml/repo-preferences/overview) for a full walkthrough of each setting.
  </Step>

  <Step title="Webservice — Environment Settings">
    <img src="https://mintcdn.com/poddle-54594c3d/q0Rk3K5lGk3vHIWm/image-v2/guides/web-service/web-service-2.png?fit=max&auto=format&n=q0Rk3K5lGk3vHIWm&q=85&s=3e1faf96ff277a26a46816cbdf972569" alt="Webservice tab — QA environment" width="2752" height="1284" data-path="image-v2/guides/web-service/web-service-2.png" />

    The **QA** environment tab is selected. Similar to Web Apps, you can define independent resource specifications and properties for **Preview**, **QA**, **Staging**, and **Production**. This allows you to use lighter resources for development and testing while scaling up for production workloads.

    The center panel shows the Webservice form for the active environment:

    * **Service Name** — Enter a unique identifier for this service (e.g., `web_service`).
    * **Entry Point** — The main file that starts the service (e.g., `index.js`).
    * **Specifications**
      * **CPU & Memory** — Choose a compute tier for this service. Available options:
        * `1 CPU and 1 GB Memory`
        * `1 CPU and 2 GB Memory`
        * `2 CPU and 1 GB Memory`
        * `2 CPU and 2 GB Memory`
        * `2 CPU and 4 GB Memory`
        * `2 CPU and 8 GB Memory`
      * **Storage value** — Disk space in GB allocated to the service (e.g., `30`).
    * **Properties**
      * **Health EndPoint** — The URL path Revolte checks to confirm the service is running (e.g., `/health`).
      * **Port** — The port your service listens on (e.g., `8080`).
      * **Pre Script** — Commands to run before the main service starts (e.g., database migrations).
      * **Load Balancer Mode** — Choose between **Shared** (cost-effective) or **Dedicated** (high performance) traffic handling.
    * **Insights** — Select system metrics to monitor for this environment:
      * **Cpu** — `CPU Idle Time`, `CPU User Time`, `CPU System Time`.
      * **Swap** — `Swap Usage`.
      * **Memory** — `Total Memory Used`, `Free Memory`.
      * **Disk** — `Disk Used`, `Disk Total`, `Disk Free`.
  </Step>

  <Step title="Variables & Secrets">
    Configure environment variables and encrypted secrets for your service. See [Variables & Secrets](/yaml/environment-settings/resource-specifications/variables) for a detailed guide on managing environment-specific configurations.
  </Step>

  <Step title="Commit">
    At the bottom of the panel, fill in the **Commit Details**:

    * **File Name** — The configuration file to create or update in your repository (e.g., `revolte.yml`).
    * **Commit Message** — A short description of what you configured (e.g., `Add web service`).
    * **Choose Branch** — The branch where the configuration file will be committed.

    Click **Commit** to save the configuration to your repository, or **Skip & deploy** to deploy immediately without committing.
  </Step>
</Steps>

> **Tip:** Always commit with a clear message before deploying to keep a traceable configuration history.
