§2024-09-01

試作機器:n2Jammy.yushei.net could be readched by yushei.net(59.126.118.194)

  1. requiremets
$ sudo apt update && sudo apt install gnupg2 nginx-full apt-transport-https
  1. On Ubuntu systems, Jitsi requires dependencies from Ubuntu's universe package repository.

To ensure this is enabled, run this command:

sudo apt-add-repository universe
sudo apt update
  1. Set up the Fully Qualified Domain Name
$ sudo hostnamectl set-hostname n2Jammy.yushei.net

alexlai@n2Jammy:~$ cat  /etc/hosts
127.0.0.1       localhost
59.126.118.194  n2Jammy.yushei.net      n2Jammy    <-- public ip

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
  1. Add the Prosody package repository
$ curl -sL https://download.jitsi.org/jitsi-key.gpg.key | sudo sh -c 'gpg --dearmor > /usr/share/keyrings/jitsi-keyring.gpg'

$ echo "deb [signed-by=/usr/share/keyrings/jitsi-keyring.gpg] https://download.jitsi.org stable/" | sudo tee /etc/apt/sources.list.d/jitsi-stable.list

$ sudo apt update
  1. Setup and configure your firewall

The following ports need to be open in your firewall, to allow traffic to the Jitsi Meet server:

80 TCP => For SSL certificate verification / renewal with Let's Encrypt. Required 443 TCP => For general access to Jitsi Meet. Required 10000 UDP => For General Network Audio/Video Meetings. Required 22 TCP => For Accessing your Server using SSH (change the port accordingly if it's not 22). Required 3478 UDP => For querying the stun server (coturn, optional, needs config.js change to enable it). 5349 TCP => For fallback network video/audio communications over TCP (when UDP is blocked for example), served by coturn. Required

  1. TLS Certificate

Install Cerbot

sudo certbot certonly --standalone -d h2jammy.yushei.net --email alexlai@munetaka.me

alexlai@n2Jammy:~$ sudo certbot certonly --standalone -d n2jammy.yushei.net 
[sudo] password for alexlai: 
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Enter email address (used for urgent renewal and security notices)
 (Enter 'c' to cancel): rai.sousuke@mac.com

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.4-April-3-2024.pdf. You must agree in
order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Yes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, to
share your email address with the Electronic Frontier Foundation, a founding
partner of the Let's Encrypt project and the non-profit organization that
develops Certbot? We'd like to send you email about our work encrypting the web,
EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: No
Account registered.
Requesting a certificate for n2jammy.yushei.net

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Could not bind TCP port 80 because it is already in use by another process on
this system (such as a web server). Please stop the program in question and then
try again.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(R)etry/(C)ancel: R

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/n2jammy.yushei.net/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/n2jammy.yushei.net/privkey.pem
This certificate expires on 2024-11-30.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
 * Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
 * Donating to EFF:                    https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  1. Install Jitsi Meet

$ sudo apt install jitsi-meet


Add telephony to your Jitsi meetings?  --> select  <No>                 
...
Created symlink /etc/systemd/system/multi-user.target.wants/coturn.service → /lib/systemd/system/coturn.service.
Setting up jq (1.6-2.1ubuntu3) ...
Setting up jitsi-meet-prosody (1.0.8091-1) ...
The host 'focus.n2Jammy.yushei.net' is not configured for this server.
The given hostname does not exist in the config
dpkg: error processing package jitsi-meet-prosody (--configure):
 installed jitsi-meet-prosody package post-installation script subprocess returned error exit status 1
Setting up jicofo (1.0-1090-1) ...
Updating /etc/jitsi/jicofo/config to use jicofo.conf
Generating an empty jicofo.conf file
useradd: warning: the home directory /usr/share/jicofo already exists.
useradd: Not copying any file from skel directory into it.
dpkg: dependency problems prevent configuration of jitsi-meet-turnserver:
 jitsi-meet-turnserver depends on jitsi-meet-prosody; however:
  Package jitsi-meet-prosody is not configured yet.

dpkg: error processing package jitsi-meet-turnserver (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of jitsi-meet:
 jitsi-meet depends on jitsi-meet-prosody (= 1.0.8091-1); however:
  Package jitsi-meet-prosody is not configured yet.

dpkg: error processing package jitsi-meet (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          No apport report written because the error mes
sage indicates its a followup error from a previous failure.
                                                            Processing triggers for ufw (0.36.1-4ubuntu0.1) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.8) ...
Errors were encountered while processing:
 jitsi-meet-prosody
 jitsi-meet-turnserver
 jitsi-meet
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)