This guide describes how to configure a fully self-signed HTTPS setup for the Firefox Accounts (FxA) server, which is useful for local LAN environments where HTTPS is required. The process involves generating certificates on the host machine and configuring the client (user machine) to trust the self-signed Root CA.
Host Machine Setup
- Generate Certificates: Modify the certificate parameters (Common Name, Subject Alternative Name, days) in
./examples/full_selfsign/generate-cert.sh and execute it. - Configure Domain: Edit the
domain.name field in config.yml to match your environment. - Configure Nginx/Reverse Proxy:
- If using a reverse proxy: Use the certificates generated by
generate-cert.sh in your reverse proxy configuration. Refer to ./examples/reverse_proxy_nossl/reverse_proxy.conf or ./examples/reverse_proxy_ssl/reverse_proxy.conf for reference. - If not using a reverse proxy: Modify
config.yml to make Nginx listen on port 443 and use the certificates generated by generate-cert.sh. See ./examples/full_selfsign/config.yml for the configuration template.
User Machine Setup (Client)
Note: All steps are critical for successful connection.
- DNS/Hosts Mapping: Update the
/etc/hosts file on the user machine to point all required subdomains to the Host Machine's IP address (e.g., 192.168.100.101). - Firefox Configuration: Update the Firefox configuration settings based on the output provided by the
init.sh script. - Import Root CA: Import
RootCA.crt into Firefox:- Navigate to
about:preferences#privacy. - Go to
View certificates -> import. - Ensure you check the box
Trust this CA to identify websites.
- Authentication: Attempt to sign in.
# Example Host Machine Steps
./examples/full_selfsign/generate-cert.sh
# Example User Machine Steps
# Update /etc/hosts with Host IP
# Import RootCA.crt in Firefox (about:preferences#privacy)