Skip to content

How to get HTTPS working locally? #302

Closed

Description

@abrichr

Hello,

Thank you for putting this template together.

We are using it to build a mobile web app. This web app needs to connect to the device's camera. We would like to accomplish this using VinceG/vue-web-cam#45, but as per that issue, the page needs to be running in https in order for this to work.

It seems to me that the documentation for getting this to run with https assumes that this is happening on a VPS. What is the simplest way to get this to run with https locally?

Activity

  1. lesourcil commented on Oct 29, 2020

    @lesourcil

    Im not using Swarm and I'm exactly trying to figure out the samething. No matter what i change in docker-compose for treafik, it doesn't work.

    Still searching ...

  2. abrichr commented on Oct 29, 2020

    @abrichr
    Author

    Here's an extremely hacky workaround using https://github.com/rchampourlier/tunnelss. Assuming your development server's LAN IP is 192.168.0.98, and you want to access it with https on iOS:

    sudo gem install tunnelss
    touch ~/.pow/192.168.0
    echo "export POW_DOMAINS=98" > ~/.powconfig 
    sudo tunnelss 192.168.0.98:443 localhost:80
    

    Now https://192.168.0.98 proxies to http://localhost, and serves a certificate that is good enough for iOS Safari.

    (You will also need to set VUE_APP_DOMAIN_DEV=192.168.0.98 in frontend/.env.)

    The main drawback of this is that you need to restart the frontend via docker-compose every time you make a change, since vue-cli-service serve --https only generates a certificate for localhost, which won't work if you're accessing it over a LAN. To work around this, we can use tunnelss again:

    sudo tunnelss 192.168.0.98:8080 localhost:8080
    

    (This will also require adding https://192.168.0.98:8080 to BACKEND_CORS_ORIGINS in .env.)

    Now you can access https://192.168.0.98:8080 on iOS Safari with hot reloading.

    It would be great if there was a supported way to get https working locally!

  3. haviduck commented on Nov 2, 2020

    @haviduck

    tried setting https true in vue config?

  4. abrichr commented on Nov 2, 2020

    @abrichr
    Author

    @haviduck can you please clarify what you are referring to more specifically? Which vue config?

  5. haviduck commented on Nov 3, 2020

    @haviduck
  6. locked and limited conversation to collaborators on Jan 22, 2026
  7. converted this issue into a discussion #2124 on Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions