Skip to main content

Prepare a Server on AWS

This guide gets an EC2 instance ready for Bring Your Own Server, with its firewall, fixed IP and backup storage. Skysize installs everything else on the server.

Each step has two tabs: click through the Console, or paste from Command line. Your choice applies to the whole page.

Commands run in CloudShell, the terminal icon at the top of the AWS console, so there is nothing to install. Keep the same tab open: each block reuses the values from step 1.

1. Choose your values​

Pick the Region closest to your users, and the size for your use.

UseInstance typevCPURAMDisk
One production and one stagingm7i.large28 GB100 GB
Production with staging and development branchesm7i.xlarge416 GB200 GB

Avoid Graviton types such as m7g or t4g: they are ARM, and the installer refuses to run on them. Avoid t3 for production: it runs out of CPU credits under sustained load.

Select your Region at the top right of the AWS console. Use the same one in every step.

2. Create the security group​

The server needs these inbound rules, and no others:

TypePortSourceWhy
HTTP80Anywhere (0.0.0.0/0)Certificates and redirects
HTTPS443Anywhere (0.0.0.0/0)Your Odoo sites

Skysize itself needs no inbound port. There is no SSH rule because you connect with Session Manager in step 6. Leave PostgreSQL (5432) closed unless you use read-only database access. Keep the default outbound rule, which allows everything: the server needs it.

  1. Open EC2 → Security Groups → Create security group.
  2. Set the name and description to skysize-odoo, and keep the default VPC.
  3. Under Inbound rules, add the two rules above.
  4. Click Create security group.

3. Create the backup bucket and the server's role​

Skysize makes no backups until a project has a backup target. This creates a private bucket and a role that lets the server use it, with no secret to store.

Bucket

  1. Open S3 → Create bucket.
  2. Enter a name that is unique across AWS, such as skysize-odoo-backups- followed by your account ID.
  3. Keep Block all public access on, and click Create bucket.

Role

  1. Open IAM → Roles → Create role.
  2. Choose AWS service, then EC2, and click Next.
  3. Select the policy AmazonSSMManagedInstanceCore, and click Next.
  4. Name the role skysize-odoo, and click Create role.
  5. Open the role, then Add permissions → Create inline policy → JSON.
  6. Paste this, with your bucket's name in place of YOUR_BUCKET, and name the policy backups:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:ListBucket", "s3:GetBucketLocation"],
"Resource": "arn:aws:s3:::YOUR_BUCKET"
},
{
"Effect": "Allow",
"Action": ["s3:PutObject", "s3:GetObject", "s3:DeleteObject", "s3:AbortMultipartUpload", "s3:ListMultipartUploadParts"],
"Resource": "arn:aws:s3:::YOUR_BUCKET/*"
}
]
}

4. Launch the instance​

Use Ubuntu 24.04 for x86. On AWS, use Ubuntu or Debian: Amazon Linux, the image the console offers by default, is not supported and the installer refuses it. The commands here are written for Ubuntu.

Open EC2 → Instances → Launch instances, and set:

SettingValue
Nameskysize-odoo
Application and OS ImagesUbuntu, then Ubuntu Server 24.04 LTS, architecture 64-bit (x86)
Instance typeThe type from step 1
Key pairProceed without a key pair
Network settingsSelect existing security group: skysize-odoo. Keep Auto-assign public IP enabled.
Configure storageThe disk size from step 1, type gp3
Advanced details → IAM instance profileskysize-odoo

Then click Launch instance.

5. Give it a fixed IP​

An instance's public IP changes when it stops and starts, which would break your DNS records. Note this IP: your DNS records will point to it.

  1. Open EC2 → Elastic IPs → Allocate Elastic IP address, and click Allocate.
  2. Select the new address, then Actions → Associate Elastic IP address.
  3. Pick your instance, and click Associate.

6. Connect to the server​

In the EC2 console, select the instance and choose Connect → Session Manager → Connect. This opens a terminal in your browser, with no SSH key or open port. It can take a minute or two to become available after launch. This is where you paste the Skysize install command.

7. Set the backup target​

Once your project exists, open its Settings → Backup Target, click Add Target, and fill in:

FieldValue
TypeAWS S3
BucketYour bucket's name
RegionYour Region, such as us-east-2
PrefixThe project name
AuthenticationIAM role

Click Test to check it from your server.

Sending email from Odoo​

AWS blocks outgoing port 25 by default. Use an SMTP relay on port 587, such as Amazon SES. See Configure Outgoing Email.

Connect the server to Skysize​

Your server is ready. Follow Set Up Your Own Server, starting at the step that registers the server. In short: register it in the dashboard, connect to it over SSH, and paste the install command. The status changes to Online within a minute of the installer finishing.

Once your first project runs, add your domain.

If something goes wrong​

The dashboard says ports 80 and 443 are not reachable. Check the firewall rules above, and that the public IP in the server's settings is the one you noted. Then click Check again.

The server stays Offline. The server connects out to Skysize, so no inbound rule fixes this. Run these on the server:

sudo systemctl status skysize-agent
sudo journalctl -u skysize-agent -n 50
nc -zv cp.skysize.io 50051

If the installer did not finish, or the join token was already used, use Regenerate join token on the server's page and run the install command again.

Still stuck? Open Support in the dashboard and include the output of those commands.