| title | Dokploy Self-Hosting Guide |
|---|---|
| description | Deploy as a multi-service stack with automated Traefik SSL on Dokploy. |
Dokploy is a modern, lightweight, open-source alternative to Heroku, Netlify, and Portainer with built-in Traefik reverse proxy and SSL automation.
- Log in to your Dokploy Dashboard.
- Click Create Project (e.g.
InstaSave). - Click Add Service -> Select Compose.
- In the Compose Configuration editor, paste the contents of
dokploy-compose.yml:
version: "3.8"
services:
app:
image: ghcr.io/gitnasr/instagram-saved-posts:latest
pull_policy: always
restart: unless-stopped
ports:
- "5050:3000"
environment:
- DATABASE_URL=mongodb://mongo:27017/instagram?replicaSet=rs0&directConnection=true
- NODE_ENV=production
- PORT=3000
- HOSTNAME=0.0.0.0
# AI Vector Search is an optional beta add-on, off by default.
# To enable it, see ../features/ai-vector-search.md
- CLOUDINARY_CLOUD_NAME=${CLOUDINARY_CLOUD_NAME}
- CLOUDINARY_API_KEY=${CLOUDINARY_API_KEY}
- CLOUDINARY_API_SECRET=${CLOUDINARY_API_SECRET}
depends_on:
mongo:
condition: service_healthy
mongo:
image: mongo:7.0
restart: unless-stopped
command: ["--replSet", "rs0", "--bind_ip_all", "--port", "27017"]
volumes:
- mongo_data:/data/db
healthcheck:
test: >
mongosh --port 27017 --eval "
try {
rs.status().ok
} catch (e) {
rs.initiate({
_id: 'rs0',
members: [{ _id: 0, host: 'mongo:27017' }]
}).ok
}
" || exit 1
interval: 5s
timeout: 5s
retries: 10
start_period: 2s
volumes:
mongo_data:- In Dokploy, open the Domains tab for the
appservice. - Add your custom domain (e.g.
instagram.yourdomain.com). - Select Port
5050. - Enable HTTPS (Let's Encrypt).
Click Deploy at the top right. Dokploy will pull the container images, verify MongoDB health, and start the application automatically!
Want semantic image and face search? It is an optional beta add-on that is off by default — see AI Vector Search for the extra service and environment variable to add here.
If you wish to configure permanent Cloudinary media sync, go to the Environment tab in Dokploy and add:
CLOUDINARY_CLOUD_NAMECLOUDINARY_API_KEYCLOUDINARY_API_SECRET