-
Notifications
You must be signed in to change notification settings - Fork 161
Description
Overview
The best way to learn about Dokploy is through hands-on practice. This issue walks you through the complete workflow: setting up a VPS using Google Cloud's free credits and deploying a Next.js application using Dokploy. You'll gain practical experience with hosting and deployment from start to finish.
Part 1: Create a VPS on Google Cloud
Prerequisites
- Google Account
- Google Cloud free credits (new accounts get $300 free credits)
Steps
-
Setup Google Cloud Console
- Navigate to Google Cloud Console
- Create/Login to your Google Account
- Set up billing account (required for free credits)
-
Create Compute Engine Instance
- Search "Compute Engine" and click Create Instance
- Enable Compute Engine API if prompted (~1 minute)
-
Configure Instance Settings
Machine Configuration:
- Instance Name:
[YOUR-NAME]-codepath-dokploy-vps - Region:
us-central1(Iowa) or any region
Machine Type:
- Select
e2-medium
Boot Disk:
- Operating System:
Ubuntu - Version:
Ubuntu 22.04 LTS x86/64 (jammy) - Boot disk type:
SSD persistent disk
Firewall:
- ✅ Allow HTTP traffic
- ✅ Allow HTTPS traffic
- Instance Name:
-
Launch Instance
- Click Create to finalize settings
- Wait for instance to be running
- Click SSH button to open terminal
- Authorize SSH key when prompted
Part 2: Configure Firewall for Dokploy
Create Firewall Rule
-
Navigate to VPC Networks
- Search "VPC Networks" in Google Cloud Console
- Select Firewall > Create Firewall Rule
-
Configure Rule Settings
- Name:
allow-dokploy-tcp-3000 - Targets:
All instances in the network - Source IPv4 ranges:
0.0.0.0/0 - Specified protocols and ports:
TCP, port3000 - Click Create
- Name:
Part 3: Install Dokploy on VPS
Installation
-
Run Installation Command
curl -sSL https://dokploy.com/install.sh | sudo sh- Wait for installation to complete
- Note the IP link displayed in console
-
Access Dokploy UI
- Navigate to the provided IP link (format:
http://[EXTERNAL-IP]:3000) - Create new user account (use different credentials than local setup)
- Important: Save your login credentials!
- Navigate to the provided IP link (format:
Note: If you lose the link, find it at: Compute Engine dashboard → External IP:3000
Part 4: Deploy Next.js Application
Prepare Repository
- Fork Example Repository
- Fork [Dokploy Examples Repository](https://github.com/dokploy/dokploy-examples) to your GitHub account
- Rename it to something descriptive (optional)
- Clone the forked repository to your local machine
Configure Dokploy Deployment
-
Create Project
- In Dokploy UI (VPS instance), create project:
[YOUR-NAME]-codepath-unit-1
- In Dokploy UI (VPS instance), create project:
-
Create Application
- Create service → Application
- Name:
DokployNextJSApp(or similar descriptive name)
-
Setup GitHub Provider
- Under provider section, click GitHub settings
- Install and authorize the GitHub app
- Address "Action required" by clicking dropdown arrow
- Authorize in popup
-
Configure Source Repository
- Select GitHub as source
- GitHub Account: Your authorized account
- Repository: Your forked
dokploy-examples - Branch:
main - Build Path:
/nextjs - Click Save
-
Deploy Application
- Click Deploy button
- Wait for deployment to complete
- Monitor logs to ensure successful deployment
Configure Domain Access
-
Add Domain
- Go to Domains tab
- Add domain with settings:
- Host: Your VPS external IP (e.g.,
34.63.1xx.1xx) - Path:
/ - Port:
3000 - HTTPS:
No
- Host: Your VPS external IP (e.g.,
-
Test Deployment
- Navigate to your VPS IP address
- Verify Next.js app is running successfully
Note: You may see DNS warnings (queryA ENOTFOUND), but if the app loads, it's working correctly.
Bonus Challenge
- Customize the App: Modify the Next.js homepage to display your name and a fun fact about yourself
Submission Requirements
Submit a screen recording demonstrating:
- Your deployed Next.js application running in browser
- Your VPS instance in Google Cloud Console
- Include the URL of your deployed application in the recording or description
Additional Submission Details
- Deployed App URL:
http://[YOUR-VPS-IP]:3000 - Google Cloud Project Name:
- VPS Instance Name:
Troubleshooting Tips
- If Dokploy UI is inaccessible, verify firewall rule is properly configured
- If deployment fails, check the logs in the Dokploy interface
- Ensure your GitHub repository is accessible and the build path is correct
- Double-check that your VPS instance is running
Acceptance Criteria
- Successfully created and configured a Google Cloud VPS instance
- Installed Dokploy on the remote server
- Set up GitHub integration with Dokploy
- Successfully deployed a Next.js application end-to-end
- Configured domain routing for web access
- Application is accessible via browser at VPS IP address
- Submitted screen recording showing deployed app and VPS instance
- Included deployed application URL in submission