# Certificate error when installing logstash plugin

**URL:** <https://discuss.elastic.co/t/certificate-error-when-installing-logstash-plugin/335391>\
**Category:** Logstash\
**Tags:** elastic-stack-security, docker\
**Created:** [June 7, 2023, 5:23am UTC](https://discuss.elastic.co/t/certificate-error-when-installing-logstash-plugin/335391 "2023-06-07T05:23:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fsaa](https://avatars.discourse-cdn.com/v4/letter/f/8c91f0/32.png) [@fsaa](https://discuss.elastic.co/u/fsaa)\
**Post date:** [June 7, 2023, 5:23am UTC](https://discuss.elastic.co/t/certificate-error-when-installing-logstash-plugin/335391/1 "2023-06-07T05:23:11Z")

</div>

I'm using a VPN because I'm using a company laptop, when I run the command `RUN bin/logstash-plugin install logstash-input-sftp.zip` in the `DockerFile` I get this error:

```auto
=> [6/7] RUN zip -r logstash-input-sftp.zip logstash 0.6s 
 => ERROR [7/7] RUN bin/logstash-plugin install logstash-input-sftp.zip 6.4s 
------
 > [7/7] RUN bin/logstash-plugin install logstash-input-sftp.zip:
#0 0.563 Using bundled JDK: /usr/share/logstash/jdk
#0 6.316 ERROR: Something went wrong when installing logstash-input-sftp.zip, message: certificate verify failed

```

My Dockerfile is:

```auto
FROM docker.elastic.co/logstash/logstash:7.16.2

COPY ./logstash-input-sftp/logstash-input-sftp/logstash-input-sftp.gemspec ./
# RUN apt-get install rubygems
user root 

# RUN yum install -y ruby ruby-devel rubygems
RUN yum install -y wget zip
RUN wget --no-check-certificate https://rubygems.org/downloads/net-ssh-5.0.2.gem \
 && wget --no-check-certificate https://rubygems.org/downloads/net-sftp-2.1.2.gem \
&& mkdir logstash 
RUN mv *.gem logstash/
RUN zip -r logstash-input-sftp.zip logstash 
RUN bin/logstash-plugin install logstash-input-sftp.zip

user logstash

# RUN gem build logstash-input-sftp.gemspec

```

My `docker-compose.yml` is:

```auto
version: '3.8'
services:

  logstash:
    # image: sebp/elk
    image: logstash-sftp:7.16.2
    environment:
      - "ES_JAVA_OPTS=-Xmx256m -Xms256m"
      - "ELASTICSEARCH_HOST=${ELASTICSEARCH_HOST}"
      - "ELASTICSEARCH_USERNAME=${ELASTICSEARCH_USERNAME}"
      - "ELASTICSEARCH_PASSWORD=${ELASTICSEARCH_PASSWORD}"
      - "CONFIG_RELOAD_AUTOMATIC=true"
      - "PIPELINE_WORKERS=1"
      # - "PIPELINE_BATCH_DELAY=1"
      - "xpack_monitoring_enabled=false"
    # ports:
    # - 5000:5000
    volumes:
      # - ./logstash/config:/usr/share/logstash/config
      - ./logstash/data:/usr/share/logstash/data
      - ./logstash/config/pipeline:/usr/share/logstash/pipeline
      # - ./logstash/logs:/usr/share/logstash/logs
    networks:
      - elastic

volumes:
  elasticsearch_data:

networks:
  elastic:

```

Does anyone know how to disable security check or add this to trusted certificates? I tried to install this custom [plugin](https://github.com/yuxuanh/logstash-input-sftp/tree/master)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2023, 5:23am UTC](https://discuss.elastic.co/t/certificate-error-when-installing-logstash-plugin/335391/2 "2023-07-05T05:23:28Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
