nurdism / neko

A self hosted virtual browser (rabb.it clone) that runs in docker.
Apache License 2.0
2.03k stars 185 forks source link

[FEATURE] Detailed instructions on how to add clipboard sync to neko #73

Open cjcharles777 opened 4 years ago

cjcharles777 commented 4 years ago

What steps are needed to get clipboard sync working?

TiredSysOp commented 4 years ago

Modify or add the following in your compose file. This allows docker to access a folder called certs which could be in the same directory as the compose file and exposes it to the image. The key and cert variables "enable" the clipboard function if provided with appropriate certificate and key. Generate keys with certbot and copy them to a folder accessible to neko. You can try mounting them directly but I had permissions issues.

volumes: 
  - "./certs:/certs"
environment:
  NEKO_KEY: /certs/privkey.pem
  NEKO_CERT: /certs/fullchain.pem

Here's my full compose as an example: version: "2.0" services: neko: image: nurdism/neko:chromium environment: LANG: en_US.UTF-8 restart: always shm_size: "4gb" cap_add:

GigaFyde commented 4 years ago

Another method would be to let a reverse proxy take care of ssl

TiredSysOp commented 4 years ago

@GigaFyde Would that work? nginx may not communicate to neko over ssl if not configured to. I'm basing my assumptions on what I've read in the documentation. As I've configured neko and nginx to use ssl

GigaFyde commented 4 years ago

I have neko running without ssl behind my nginx reverse proxy and clipboard sync works without issues.

TiredSysOp commented 4 years ago

Even easier. Nice one

nurdism commented 4 years ago

clipboard sync is mainly a client feature, some browsers have certain requirements, ssl/https being one of them. Use chrome for best experience clipboard sync.