-
-
Notifications
You must be signed in to change notification settings - Fork 377
How to setup LinkStack with ssl through reverse_proxy with caddy #838
-
Hello,
I am having trouble setting up LinkStack on docker alongside with Caddy for reverse proxy.
Here is my yml:
services:
caddy:
image: caddy:latest
restart: unless-stopped
container_name: caddy
ports:
- "80:80"
- "443:443"
volumes:
- caddy_data:/data
- ${DATA_FOLDER}/caddy_config:/config
- ${DATA_FOLDER}/caddy_config/Caddyfile:/etc/caddy/Caddyfile
n8n:
image: docker.n8n.io/n8nio/n8n
container_name: n8n
restart: always
environment:
- N8N_HOST=${N8N_SUBDOMAIN}.${DOMAIN_NAME}
- N8N_PORT=5678
- N8N_PROTOCOL=https
- NODE_ENV=production
- WEBHOOK_URL=https://${N8N_SUBDOMAIN}.${DOMAIN_NAME}/
- GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
- N8N_LOG_OUTPUT=console
- N8N_LOG_LEVEL=debug
volumes:
- n8n_data:/home/node/.n8n
- ${DATA_FOLDER}/local_files:/files
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
ports:
- "9000:9000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
restart: unless-stopped
linkstack:
container_name: linkstack
hostname: linkstack
environment:
- HTTP_SERVER_NAME=links.***.it
- HTTPS_SERVER_NAME=links.***.it
- TZ=Europe/Rome
- PHP_MEMORY_LIMIT=512M
- UPLOAD_MAX_FILESIZE=8M
ports:
- "8190:443"
restart: unless-stopped
volumes:
- linkstack:/htdocs
image: linkstackorg/linkstack:latest
volumes:
caddy_data:
external: true
n8n_data:
external: true
portainer_data:
linkstack:
external: true
To be noted: I edited the HTTP_SERVER_NAME and HTTPS_SERVER_NAME using the third level domain I would like to use to navigate to LinkStack.
Since ports 80/443 are used by caddy, I assigned 8190:443.
Here is my Caddy Config section related to LinkStack:
links.***.it {
reverse_proxy linkstack:8190 {
transport http {
tls_insecure_skip_verify
}
}
}
What I am doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments
-
You exported the port 8190 externally.
Since all of these containers are in the same docker compose file, they all share the same network and you can access the port of the container directly:
links.***.it {
reverse_proxy linkstack:443{
transport http {
tls_insecure_skip_verify
}
}
}
You don't even need to export ports since you're using caddy.
Beta Was this translation helpful? Give feedback.
All reactions
-
@giacomolanzi did you get it working? I am having a similar issue.
Beta Was this translation helpful? Give feedback.