OPNsense Forum

Archive => 21.1 Legacy Series => Topic started by: jason_saturn on May 24, 2021, 10:35:38 am

Title: Installation in AWS
Post by: jason_saturn on May 24, 2021, 10:35:38 am
Hi,

How do I install in an environment like AWS EC2 (not Lightsail) where you can't boot from USB/ISO? (community edition, not the paid support AMI image from the company).

is there any environment where you can install without booting? ie, installation media or package manager, etc?

I've reviewed the installation instructions at  https://opnsense.org/users/get-started/ but its not entirely clear.  I've also searched the forum and didn't find any info on this.


Title: Re: Installation in AWS
Post by: kya on May 24, 2021, 12:29:51 pm
I think you need to create AWS AMI. Hashicorp's Packer is a popular option. I found an old Github repository that seems to be a good starting point: https://github.com/remlabm/opnsense-packer
Title: Re: Installation in AWS
Post by: astuckey on May 24, 2021, 05:05:48 pm
Definitely agree with @kya.
You need to use something like VirtualBox / VMWare / KVM / Parallels etc to create an image. You need to configure everything perfectly, WAN interface, serial console output etc, be ready for 1:1 NAT that AWS puts on you with the public addresses / EIP.  Create an EC2 instance with the same disk size, use dd with ssh to copy your image over to clobber another EBS volume to boot off.  Horribly painful to get everything lined up without days of effort.  I ended up paying for the AMI from Deciso which saved me a lot of grief, well worth the cost.

If you aren't required to use AWS, look at Vultr or Linode or most other VPS providers which allow you to use a graphical console, so you can just install away as if it was local and get it running without fuss.