Skip to main content
Archil disks provide infinite, shareable storage for servers running in the AWS or GCP clouds. This guide walks you through creating a disk backed by an Amazon S3 bucket and mounting it on a Linux server.
This quickstart uses the Linux CLI on a server in AWS or GCP. To mount disks on your Mac instead, see Archil for macOS. For serverless functions, containers, or edge compute, see the TypeScript SDK or the compute guides.

Create your first disk

1

Create a disk and add a data source

Navigate to the New Disk page in the Archil console.
  1. Select a region — pick the same region as the servers that will access the disk for the best performance.
  2. Add a data source — choose an existing S3 bucket as the data source for read and write synchronization.
  3. Grant Archil access — update your bucket’s permissions policy to allow Archil to reach it. The console provides the exact policy to add. It will look something like this:
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "AllowArchilAccess",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::123456789:role/archil-s3.prod.us-east-1"
            },
            "Action": "s3:*",
            "Resource": [
                "arn:aws:s3:::YOUR-BUCKET-NAME",
                "arn:aws:s3:::YOUR-BUCKET-NAME/*"
            ],
            "Condition": {
                "StringLike": {
                    "aws:userid": "*:YOUR-FILESYSTEM-ID"
                }
            }
        }
    ]
}
  • Login to your Google Cloud Storage console
  • Click Settings then Interoperability
  • Under Service account HMAC, click Create a key for another service account
  • Grant the Cloud Storage - Storage Object Admin role to the new service account
  • Record the Access key and Secret provided for the new service account HMAC key
Endpoint: https://storage.googleapis.com
Access key: GOOG1EABCD1234567890
Secret: 1234567890abcdef1234567890ABCD/EF
2

Authorize your server

Configure which servers can connect to the disk.
On the disk’s Details page, click Generate Token and copy the disk token. You’ll need it when mounting the disk. (A disk token is a per-disk credential, separate from any Control Plane API keys.)
3

Install the client and mount the disk

SSH into your server and install the Archil client:
curl -s https://archil.com/install | sh
Then mount the disk. The Archil console shows the exact command for your disk:
export ARCHIL_MOUNT_TOKEN="<disk-token>"
sudo --preserve-env=ARCHIL_MOUNT_TOKEN archil mount <disk-name> /mnt/data --region <disk-region>
If you are using IAM role authentication, no disk token is needed:
sudo archil mount <disk-name> /mnt/data --region <disk-region>
4

Start using your disk

Your disk is ready. Archil provides full POSIX access to your data — reads, writes, overwrites, renames, and permissions all work as expected.
ls /mnt/data

Important notes

Files on a newly mounted disk are owned by root. Either change ownership (chown -R <user> /mnt/data) or use sudo when working with the data.
Always use archil unmount to unmount your disks, not the built-in umount command. archil unmount waits for all pending writes to flush to the backing store before exiting. This is especially important during system shutdown, where the kernel’s default umount will not wait for Archil writes to sync.

Create an Archil disk

Get started by creating a new disk in the Archil console

Pricing

View Archil pricing and plan details