Docker
Learn how to setup Duckie directly in your enviornment
Video Tutorial
1. EC2 Instance Setup and Configuration
1.1 EC2 Configuration
Follow these instructions to create a new EC2 instance with Ubuntu 24.04, t2.xlarge
type, and 120 GiB gp3
storage.
- Launch a new EC2 instance
- In the “Application and OS Images” section, select
Ubuntu
- Look for
24.04
LTS in the list
- Look for
- In the “Instance Type” section, select
t2.xlarge
- In the “Configure Storage” section, set the size to
120 GiB
, and make sure that “Volume Type” is set togp3
- Click “Launch Instance”
1.2 Set Inbound Security Rules
1.2.1. Accessing the Security Group Settings
- Log into the AWS Management Console
- Navigate to the EC2 Dashboard
- Select your EC2 instance from the list
- Click on the “Security” tab
- Find the linked Security Group and click on it
1.2.2. Editing Inbound Rules
- In the Security Group details, locate the “Inbound rules” section
- Click the “Edit inbound rules” button
1.2.3. Adding New Rules
Add the following rules one by one using the “Add rule” button:
Port Range | Source |
---|---|
3001 | 0.0.0.0/0 |
80 | 0.0.0.0/0 |
3002 | 0.0.0.0/0 |
8000 | 0.0.0.0/0 |
Once complete, click “Save”.
1.3 Request Model Access on AWS Bedrock
1.3.1. Enable Amazon Bedrock
- Sign in to the AWS Management Console.
- Navigate to the Amazon Bedrock service.
- If you haven’t used Bedrock before, you’ll see a “Get started” page.
- Click on “Enable Amazon Bedrock”.
- Review the terms and conditions, then click “Enable” to confirm.
1.3.2. Request Access to Sonnet 3.5 Model
- In the Bedrock console, go to the “Model access” page.
- Find “Sonnet 3.5” in the list of available models.
- Click the checkbox next to “Sonnet 3.5”.
- Click “Request model access” at the top of the page.
- In the pop-up window, review the details and click “Submit request”.
1.3.3 Wait for Approval
- Your request will be reviewed by AWS.
- You’ll receive an email notification when your request is approved.
1.3.4 Verify Access
- Once approved, return to the Bedrock console.
- Go to the “Model access” page.
- Confirm that “Sonnet 3.5” shows as “Access granted”.
2 Configuring Third-Party Applications
Communication Providers
Slack
- Go to https://api.slack.com/apps
- Click “Create New App” and choose “From an app manifest”
- Select your workspace
- Paste the App Manifest JSON from below into the provided field
- Update the values for URIs and URLs using your EC2
Public IPv4 DNS
- Review the settings and click “Create”
- Install the app to your workspace
Discord
- Go to https://discord.com/developers/applications
- Click “New Application” and name your app
- In the “Bot” section, enable the bot and toggle on “Message Content Intent”
- In “OAuth2 > General”:
- Add redirect:
http://[ec2_dns]:3001/client/discord/callback
- Enable “Requires OAuth2 Code Grant”
- Add redirect:
- In “OAuth2 > URL Generator”:
- Select “bot” scope
- Select these bot permissions:
- Manage Webhooks
- Read Messages/View Channels
- Send Messages
- Send Messages in Threads
- Create Public Threads
- Create Private Threads
- Manage Messages
- Manage Threads
- Read Message History
- Save changes
Ticketing Providers
Jira
- Go to https://developer.atlassian.com/console/myapps/
- Click “Create” and choose “OAuth 2.0 integration”
- Name your app and click “Create”
- In “Authorization”:
- Set callback URL:
http://[ec2_dns]:3001/client/jira/callback
- Set callback URL:
- In “Permissions”:
- Add “Jira platform REST API” scopes:
read:jira-work
write:jira-work
manage:jira-webhook
- Add “OpenID Connect” scope:
offline_access
- Add “Jira platform REST API” scopes:
- Save changes
Linear
- Go to https://linear.app/duckie-demo/settings/api
- Click “Create Key” and select “OAuth2 Application”
- Fill in the details:
- Name your application
- Set Callback URL:
http://[ec2_dns]:3001/client/linear/callback
- Click “Create” and note your Client ID and Client Secret
- In the “Webhooks” section:
- Enable webhooks
- Set Webhook URL:
http://[ec2_dns]:3002/linear/webhook
- Select event types:
- Issues
- Comments
- Click “Create Webhook”
- Save all changes
Documentation Providers
Confluence
- Go to https://developer.atlassian.com/console/myapps
- Click “Create” and choose “OAuth 2.0 integration”
- Name your app and click “Create”
- In “Authorization”:
- Set callback URL:
http://[ec2_dns]:3001/client/confluence/callback
- Set callback URL:
- In “Permissions”:
- Add “Confluence API” scopes:
read:content-details:confluence
read:page:confluence
write:page:confluence
read:content:confluence
read:attachment:confluence
read:comment:confluence
read:template:confluence
read:label:confluence
read:content.property:confluence
read:whiteboard:confluence
write:whiteboard:confluence
read:blogpost:confluence
write:blogpost:confluence
write:content:confluence
read:space-details:confluence
read:space:confluence
- Add “OpenID Connect” scope:
offline_access
- Add “Confluence API” scopes:
Google Drive
- Go to https://console.cloud.google.com/
- Create a new project or select an existing one
- Enable the Google Drive API for your project
- Go to “Credentials” and click “Create Credentials” > “OAuth client ID”
- Choose “Web application” as the application type
- Set the authorized redirect URI:
http://[ec2_dns]:3001/client/google/callback
3. Deploying Duckie on Your EC2 Instance
3.1 Setting Up Your Environment Variables
To configure your application correctly, you need to set up environment variables using a .env
file. Follow these steps to create and populate your .env
file on your EC2 instance.
- Connect to your EC2 instance using SSH.
- Navigate to the root directory of your application.
- Create two new files named
.backend.env
and.frontend.env
- Using the templates below, complete the
.env
files - You can find your 3rd party Client IDs where you created the applications
3.2 Setting Up Your GitHub Access Token for Cloning
3.2.1. Obtain Your Cloning Access Token
- Reach out to the Duckie team for your
cloning_access_token
- You can contact us at founders@duckie.ai
3.2.2. Set Up the Token on Your EC2 Instance
Once you have received your cloning_access_token
, follow these steps to set it up:
-
Connect to your EC2 instance using SSH.
-
Once connected, enter the following command, replacing
your_cloning_access_token_here
with the actual token you received:export GITHUB_TOKEN=your_cloning_access_token_here
-
To verify that the token has been set correctly, you can echo the variable: This should display your token.
echo $GITHUB_TOKEN
4 Deploying Duckie on Your EC2 Instance
4.1 Prerequisites
- Ensure you have sudo access on your EC2 instance.
- Make sure you’ve set up your GitHub access token as described in the previous instructions.
- Fully complete both
.backend.env
and.frontend.env
4.2 Running the Deployment Script
-
Connect to your EC2 instance via SSH.
-
Once connected, copy and paste the following command into your terminal:
curl -sSL https://duckie-public-dist.s3.amazonaws.com/duckie-selfhost-deploy.sh | sudo -E bash -s install
-
Press Enter to run the command
-
It will take ~2 minutes for Duckie to start
4.3 Upgrading Existing Installation
-
Connect to your EC2 instance via SSH.
-
Once connected, copy and paste the following command into your terminal:
curl -sSL https://duckie-public-dist.s3.amazonaws.com/duckie-selfhost-deploy.sh | sudo -E bash -s upgrade
-
Press Enter to run the command
-
It will take ~2 minutes for Duckie to redeploy
5. Start Using Duckie
Once all of the steps above have been complete, Duckie will be up and running in your AWS environment.
To use the Duckie web app, go to http://[ec2_dns]:3001
.
To learn more about using Duckie, you can visit the Get Started page.