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.

  1. Launch a new EC2 instance
  2. In the “Application and OS Images” section, select Ubuntu
    1. Look for 24.04 LTS in the list
  3. In the “Instance Type” section, select t2.xlarge
  4. In the “Configure Storage” section, set the size to 120 GiB, and make sure that “Volume Type” is set to gp3
  5. Click “Launch Instance”

1.2 Set Inbound Security Rules

1.2.1. Accessing the Security Group Settings

  1. Log into the AWS Management Console
  2. Navigate to the EC2 Dashboard
  3. Select your EC2 instance from the list
  4. Click on the “Security” tab
  5. Find the linked Security Group and click on it

1.2.2. Editing Inbound Rules

  1. In the Security Group details, locate the “Inbound rules” section
  2. 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 RangeSource
30010.0.0.0/0
800.0.0.0/0
30020.0.0.0/0
80000.0.0.0/0

Once complete, click “Save”.

1.3 Request Model Access on AWS Bedrock

1.3.1. Enable Amazon Bedrock

  1. Sign in to the AWS Management Console.
  2. Navigate to the Amazon Bedrock service.
  3. If you haven’t used Bedrock before, you’ll see a “Get started” page.
  4. Click on “Enable Amazon Bedrock”.
  5. Review the terms and conditions, then click “Enable” to confirm.

1.3.2. Request Access to Sonnet 3.5 Model

  1. In the Bedrock console, go to the “Model access” page.
  2. Find “Sonnet 3.5” in the list of available models.
  3. Click the checkbox next to “Sonnet 3.5”.
  4. Click “Request model access” at the top of the page.
  5. In the pop-up window, review the details and click “Submit request”.

1.3.3 Wait for Approval

  1. Your request will be reviewed by AWS.
  2. You’ll receive an email notification when your request is approved.

1.3.4 Verify Access

  1. Once approved, return to the Bedrock console.
  2. Go to the “Model access” page.
  3. Confirm that “Sonnet 3.5” shows as “Access granted”.

2 Configuring Third-Party Applications

Communication Providers

Slack

  1. Go to https://api.slack.com/apps
  2. Click “Create New App” and choose “From an app manifest”
  3. Select your workspace
  4. Paste the App Manifest JSON from below into the provided field
  1. Update the values for URIs and URLs using your EC2 Public IPv4 DNS
  2. Review the settings and click “Create”
  3. Install the app to your workspace

Discord

  1. Go to https://discord.com/developers/applications
  2. Click “New Application” and name your app
  3. In the “Bot” section, enable the bot and toggle on “Message Content Intent”
  4. In “OAuth2 > General”:
    • Add redirect: http://[ec2_dns]:3001/client/discord/callback
    • Enable “Requires OAuth2 Code Grant”
  5. 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
  6. Save changes

Ticketing Providers

Jira

  1. Go to https://developer.atlassian.com/console/myapps/
  2. Click “Create” and choose “OAuth 2.0 integration”
  3. Name your app and click “Create”
  4. In “Authorization”:
    • Set callback URL: http://[ec2_dns]:3001/client/jira/callback
  5. In “Permissions”:
    • Add “Jira platform REST API” scopes:
      • read:jira-work
      • write:jira-work
      • manage:jira-webhook
    • Add “OpenID Connect” scope:
      • offline_access
  6. Save changes

Linear

  1. Go to https://linear.app/duckie-demo/settings/api
  2. Click “Create Key” and select “OAuth2 Application”
  3. Fill in the details:
    • Name your application
    • Set Callback URL: http://[ec2_dns]:3001/client/linear/callback
  4. Click “Create” and note your Client ID and Client Secret
  5. In the “Webhooks” section:
    • Enable webhooks
    • Set Webhook URL: http://[ec2_dns]:3002/linear/webhook
    • Select event types:
      • Issues
      • Comments
  6. Click “Create Webhook”
  7. Save all changes

Documentation Providers

Confluence

  1. Go to https://developer.atlassian.com/console/myapps
  2. Click “Create” and choose “OAuth 2.0 integration”
  3. Name your app and click “Create”
  4. In “Authorization”:
    • Set callback URL: http://[ec2_dns]:3001/client/confluence/callback
  5. 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

Google Drive

  1. Go to https://console.cloud.google.com/
  2. Create a new project or select an existing one
  3. Enable the Google Drive API for your project
  4. Go to “Credentials” and click “Create Credentials” > “OAuth client ID”
  5. Choose “Web application” as the application type
  6. 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.

  1. Connect to your EC2 instance using SSH.
  2. Navigate to the root directory of your application.
  3. Create two new files named .backend.env and .frontend.env
  4. Using the templates below, complete the .env files
  5. 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:

  1. Connect to your EC2 instance using SSH.

  2. 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
    
  3. 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

  1. Connect to your EC2 instance via SSH.

  2. 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
    
  3. Press Enter to run the command

  4. It will take ~2 minutes for Duckie to start

4.3 Upgrading Existing Installation

  1. Connect to your EC2 instance via SSH.

  2. 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
    
  3. Press Enter to run the command

  4. 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.