> For the complete documentation index, see [llms.txt](https://docs.flashback.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flashback.tech/guides/private-node-setup/install-via-script.md).

# Install via Script

## Quick Start

Download and run the installation script:

```bash
# Download the script
curl -fsSLo rollout_node.sh https://raw.githubusercontent.com/flashgatenetwork/flashgate_installer/refs/heads/main/rollout_node.sh

# Make it executable
chmod +x rollout_node.sh

# Run the installation
sudo ./rollout_node.sh \
  -r eu-central-1 \
  -d mycompany.com \
  -p gcp \
  -o 00000000-0000-0000-0000-000000000000 \
  -k /path/to/private_key.pem \
  -b https://backend.flashback.tech
```

> **Note**: Ensure you have completed all [prerequisites](/guides/private-node-setup/prerequisites.md) before running the installation script.

## Required Arguments

* `-r <region>` - AWS region (e.g., `eu-central-1`, `us-east-1`)
* `-d <root-domain>` - Your root domain (e.g., `mycompany.com`)
* `-o <org-id>` - Your organization ID
* `-k <private-key-path>` - Path to your RSA private key file

## Optional Arguments

* `-p <provider>` - Cloud provider (e.g., `aws`, `gcp`, `azure`)
* `-b <backend-url>` - Backend URL (default: `https://backend.flashback.tech`)
* `-n <network-json-path>` - Path to `flashgate-network-delegated.json`

## Domain Convention

The script will create these domains:

* `s3-<region>[-<provider>].<root-domain>`
* `gcs-<region>[-<provider>].<root-domain>`
* `blob-<region>[-<provider>].<root-domain>`

## SSL Certificates

You need three certificate pairs that support:

* S3: `s3-<region>[-<provider>].<root-domain>` and `*.s3-<region>[-<provider>].<root-domain>`
* GCS: `gcs-<region>[-<provider>].<root-domain>`
* BLOB: `blob-<region>[-<provider>].<root-domain>` and `*.blob-<region>[-<provider>].<root-domain>`

## Examples

### Using GCP with Let's Encrypt certificates (.crt, .key files)

```bash
sudo ./rollout_node.sh -r eu-central-1 -d mydomain.com -p gcp \
   -o 00000000-0000-0000-0000-000000000000 \
   -k private_key.pem -b https://backend.flashback.tech \
  -1 ~/s3-eu-central-1-gcp.mydomain.com.crt \
  -2 ~/s3-eu-central-1-gcp.mydomain.com.key \
  -3 ~/gcs-eu-central-1-gcp.mydomain.com.crt \
  -4 ~/gcs-eu-central-1-gcp.mydomain.com.key \
  -5 ~/blob-eu-central-1-gcp.mydomain.com.crt \
  -6 ~/blob-eu-central-1-gcp.mydomain.com.key
```

### Using GCP with PFX certificates

```bash
sudo ./rollout_node.sh -r eu-central-1 -d mydomain.com -p gcp \
   -o 00000000-0000-0000-0000-000000000000 \
   -k private_key.pem -b https://backend.flashback.tech \
   -s3pfx ~/s3-eu-central-1-gcp.mydomain.com.pfx \
   -gcspfx ~/gcs-eu-central-1-gcp.mydomain.com.pfx \
   -blobpfx ~/blob-eu-central-1-gcp.mydomain.com.pfx
```

### Using AWS with separate certificate files

```bash
sudo ./rollout_node.sh \
  -r us-east-1 \
  -d mycompany.com \
  -p aws \
  -o 12345678-1234-1234-1234-123456789012 \
  -k ~/private_key.pem \
  -1 ~/s3-us-east-1-aws.crt \
  -2 ~/s3-us-east-1-aws.key \
  -3 ~/gcs-us-east-1-aws.crt \
  -4 ~/gcs-us-east-1-aws.key \
  -5 ~/blob-us-east-1-aws.crt \
  -6 ~/blob-us-east-1-aws.key
```

### Custom backend URL

```bash
sudo ./rollout_node.sh \
  -r eu-central-1 \
  -d mycompany.com \
  -p gcp \
  -o 12345678-1234-1234-1234-123456789012 \
  -k /home/ubuntu/private_key.pem \
  -b https://custom-backend.example.com \
  -s3pfx ~/s3.pfx \
  -gcspfx ~/gcs.pfx \
  -blobpfx ~/blob.pfx
```

## What the Script Does

The `rollout_node.sh` script automates the complete setup of your private Flashgate node:

1. **System Preparation** - Updates system packages and installs Docker with Docker Compose
2. **Directory Setup** - Creates the necessary directory structure under `/opt/flashgate`
3. **Certificate Processing** - Handles SSL certificates in both separate (.crt/.key) and PFX formats
4. **Configuration Generation** - Creates Nginx configuration for reverse proxy and SSL termination
5. **Service Deployment** - Sets up Docker containers for S3, GCS, and Blob APIs
6. **Backend Integration** - Fetches encrypted configuration from the Flashgate backend
7. **Node Registration** - Registers your node with the Flashgate platform
8. **Service Startup** - Starts all services and verifies they're running correctly

The script handles all the complex configuration automatically, ensuring your node is properly integrated with the Flashgate ecosystem.

## Verification

After installation, check that services are running:

```bash
sudo docker ps
sudo docker logs
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.flashback.tech/guides/private-node-setup/install-via-script.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
