- The Connect API container (
1password/connect-api) - The Connect sync container (
1password/connect-sync)
Requirements
Before you can configure your 1Password Connect Server, you must:Environment variables
The following table lists the available environment variables, their description, and the containers that support them. Most of the environment variables apply to the Connect API and Connect sync containers, but some only apply to the Connect API container.Data volume
The default location of the shared volume is/home/opuser/.op/data. If you set the XDG_DATA_HOME environment variable to a path other than /home/opuser/, make sure you mount your data volume at the same path.
TLS
By default, 1Password Connect Server is configured for use within a trusted network. If you plan to use Connect outside a trusted network, consider configuring Transport Layer Security (TLS) . You can configure TLS for the connection between your application and Connect by providing your own certificate or letting Connect request a certificate using Let’s Encrypt. Connect listens on the port defined by theOP_HTTPS_PORT environment variable (default 8443) when you use TLS.
Use your own certificate
Connect can use a PEM-encoded private key and certificate by setting the following two environment variables for the Connect API container:- Set
OP_TLS_KEY_FILEto the path to the private key file. - Set
OP_TLS_CERT_FILEto the path to the certificate file. This should be the full certificate chain.
Use Let’s Encrypt
Connect can also request a certificate from the Let’s Encrypt Certificate Authority (CA). For this, you must set two environment variables for the Connect API container:- Set
OP_TLS_USE_LETSENCRYPTto any value. - Set
OP_TLS_DOMAINto the (sub-)domain for which to request a certificate. The DNS records for this domain must point to the Connect server.
443 (either by setting OP_HTTPS_PORT=443 or by forwarding traffic at port 443 to the Connect server’s OP_HTTPS_PORT value). This makes sure the Connect server can refresh its Let’s Encrypt certificate.
Manual bus configuration
By default, the two containers (Connect API and Connect sync) automatically discover and connect to the shared bus. This discovery mechanism requires theNET_BROADCAST capability, which you can’t always grant to containers. However, it’s possible to manually configure the shared bus.
To manually configure the shared bus:
- Assign a static port for the bus by setting the
OP_BUS_PORTenvironment variable to a free port for both containers. - Set the
OP_BUS_PEERSenvironment variable for the Connect API container to[hostname]:[bus port], wherehostnameis the name of the Connect sync container andbus portthe value ofOP_BUS_PORTfor the Connect sync container. - Set the
OP_BUS_PEERSenvironment variable for the Connect sync container to[hostname]:[bus port], wherehostnameis the name of the application container andbus portis the value ofOP_BUS_PORTfor the Connect API container.
- Connect API container
- Connect sync container
The following example sets environment variables for a Connect API container called
op-connect-api.