What this guide is
There are a lot of ways you can install Docassemble. This is one quick path that will help you get started quickly without having to make your own choices.
- Provision a full virtual machine in AWS Lightsail.
- Store a copy of backups and files on AWS S3 for safer and easier recovery
- Use an env.list file that contains all of the startup configuration that I keep a local copy of.
Larger deployments might consider using a multi-server configuration. But for most deployments, it is cheaper and more reliable to scale vertically. An 8 GB instance on Lightsail, which costs $40/month to run at this time, handles 10s of thousands of monthly sessions for the state of Massachusetts.
It typically takes about 1 hour to follow these steps from start to finish.
A video walkthrough of the full process
Create your AWS account
Choose a DNS name
Choose a short, readable name, like apps.example.com
, where example.com
is a domain that you own.
- Use a subdomain of the domain you own like
apps.example.com
, not a base (second level) domain likeexample.com
- Stick with the common subdomain names:
app
,apps
, orinterviews
unless you have a good reason to choose something different. - Avoid
www
as this is usually used for a landing page.
If you don't own a domain name yet
If you don't own a domain name yet, it may be simplest to register and manage it through AWS Lightsail
Reserve a static IPv4 address in Lightsail
Follow the AWS
Lightsail
instructions to create a static IP. Use the DNS name you chose earlier to label
the IP, with suffix to indicate that it is the IP. Like: apps.example.com-IP
.
Create an A
record that points to the reserved IP address in your DNS provider's website
You now need a new A
record that points your reserved IP address (like 127.0.0.1
)
to your chosen domain name (like apps.example.com
)
The steps for this depend on your DNS provider.
Here are some basic instructions about adding an A
record for common platforms:
If you need to, you can stop now and come back to the rest of the steps later. The rest will take about 30 minutes and should be done all together.
Create your Lightsail server
Create a Lightsail instance
Select these options on the "Create an instance" page:
- Select the closest "Instance location" or AWS region. (The default is probably fine if it is on your continent!)
- Select an "OS only" blueprint of "Linux".
- Select the latest long term support edition of Ubuntu Server (24.04 at this writing; avoid Amazon Linux)
- Select at least the 4 GB of memory plan (at this writing, it costs $20/month)
Label the new Lighsail instance with the DNS name you chose earlier. For
example: apps.example.com
.
Enable HTTPS traffic on your Lightsail server
- Click on your Lightsail instance, and then the Networking tab. (Note: make sure you click on the instance name first).
- Scroll down to IPv4 Firewall. Click + Add rule to add a new rule.
- Select "HTTPS" as the application, and then the green "create" button.
This should also create the matching IPv6 rule automatically for you.
Create an S3 Bucket to match your new DNS name
Follow the instructions to create an AWS S3 bucket using the AWS console.
You will make a new S3 bucket with these configuration options:
- Named the same as your DNS name. E.g.,
apps.example.com
- Matches the AWS region of your Lightsail instance (e.g., us-east-1a for Virginia).
- Use the default security policy, including
Block Public Access
.
Turn on S3 bucket versioning
To improve your ability to recover from disasters, we recommend that you turn on bucket versioning. This will keep a "shadow copy" of any deleted or modified files.
View AWS instructions (For simplicity, jump ahead to the instructions for "S3 console"--you can ignore the preamble).
Create an IAM user that has appropriate access to your S3 bucket
Create a new user with the same name as your DNS name. E.g.,
apps.example.com
. Give it access to S3.
View Amazon's up to date instructions, or keep reading for our more specific instructions. Note: these may change over time.
- Visit the Identity Access and Management (IAM) console in AWS
- Under "Access Management" in the left menu, click "Users"
- Click "Create user"
- Name the new user to match your server's name (e.g., apps.example.com)
- Under permission options, choose "Attach policies directly".
- Under "Permissions policies", type S3. Check the box next to AmazonS3FullAccess. The permissions boundary is not necessary.
- Click next and don't modify anything on the Tags page. Review and then Create user.
- Navigate back to "Users" under "Access Management" and select the one you just created. In the Summary, select the option to "Create Access Key".
For the use case, select "Command Line Interface (CLI)". Click next and add a description if desired. Create access key. (You may have to click through or ignore a warning).
Copy the Access key ID and Secret access key to a safe place, such as an open text editor window. This is your only chance to view the secret access key. But you can always make a new one later.
A note about S3 permissions
Your new user account has access to all of S3, not just the one bucket. If your AWS account is used for multiple servers, it is best to limit its access.
View AWS instructions to limit access to one bucket