webtrees
Overview
webtrees is a mature, open source, online collaborative genealogy application. It gives you and your family interactive family trees, pedigree and descendancy charts, individual and family records, reports, media galleries and per-user accounts through a clean web interface.
This SecureAnyCloud image installs webtrees 2.2 on nginx, php-fpm 8.3 and MySQL 8.0, all from the Ubuntu 24.04 noble universe with no third-party APT repositories. The database schema is built and the first administrator is created for you. A small demo family tree is imported, so the pedigree charts are populated the moment you sign in.
What you get:
- webtrees 2.2.6 from the official release at
/var/www/webtrees(front controllerindex.php) - nginx serving on port 80, with the writable
data/folder never exposed to the web - php-fpm 8.3 with the mysqli, mbstring, xml, intl, gd, curl and zip extensions
- MySQL 8.0.x with a
webtreesdatabase andwtuserapplication user (per-VM password) - MySQL root, application database and administrator passwords rotated per instance at first boot
- Database-backed authentication, with a single
adminaccount created at first boot - A demo family tree imported from GEDCOM, so the tree and pedigree views are populated
- Public self-registration disabled by default
webtrees-firstboot.servicebuilding the schema, rotating passwords, creating the administrator and importing the demo tree- A host-only session cookie, so signing in works over a bare IP address (RFC 6265 safe)
- nginx, php-fpm and MySQL enabled and starting automatically on boot
- 24/7 SecureAnyCloud support
Prerequisites
You need an active Azure subscription, an SSH key, and a VNet with a subnet.
Standard_B2s (2 vCPU, 4 GB RAM) is a comfortable starting size for most family trees. Move up to a D2s or D4s size for very large trees or many concurrent users.
On the network security group, open inbound ports 80 and 443, and open 22 to your management network only. MySQL listens only on loopback and is never exposed.
Deploy and connect
Launch the image from the Azure Marketplace, then connect over SSH as azureuser:
ssh azureuser@<vm-ip>Within a few seconds of the instance starting, the first-boot service builds the database schema, generates the per-VM credentials and imports the demo family tree.
Verify the services
Confirm that nginx, php-fpm and MySQL are active and listening. MySQL is bound to loopback only:
sudo systemctl is-active nginx.service php8.3-fpm.service mysql.service
sudo ss -ltn | grep -E ':80|:3306'Check the versions
The webtrees release is the VERSION constant in the application file. Check it, along with the PHP, MySQL and nginx versions:
grep -o "VERSION = '[^']*'" /var/www/webtrees/app/Webtrees.php php -v | head -1 mysql --version nginx -vInspect the database
The schema is built and a single administrator account exists, stored with a bcrypt password hash, so there is no default or shared login. Read the application database password from the root-only credentials file. Then inspect the administrator account and the imported genealogy records:
DB_PASS=$(sudo grep '^WEBTREES_DB_PASSWORD=' /stage/scripts/webtrees-credentials.log | cut -d= -f2-) sudo mysql -uwtuser -p"$DB_PASS" webtrees -e "SELECT u.user_name, LEFT(u.password,7) AS password_hash, s.setting_value AS canadmin FROM wt_user u JOIN wt_user_setting s ON s.user_id=u.user_id AND s.setting_name='canadmin' WHERE u.user_id>0"
sudo mysql -uwtuser -p"$DB_PASS" webtrees -e "SELECT (SELECT COUNT(*) FROM wt_individuals) AS individuals, (SELECT COUNT(*) FROM wt_families) AS families"Read the administrator password
The per-VM credentials are written to a root-only file. Read the file to get the WEBTREES_ADMIN_USER and WEBTREES_ADMIN_PASSWORD values for signing in:
sudo cat /stage/scripts/webtrees-credentials.logKeep this file secure. After your first sign-in, change the administrator password from within webtrees.
Sign in
Confirm that webtrees is serving the demo tree locally:
curl -s -o /dev/null -w 'HTTP %{http_code}\n' http://127.0.0.1/tree/demoThen browse to http://<vm-ip>/. The home page redirects to the demo family tree. Choose Sign in and enter admin with the password from Step 5.
Explore an individual record
Click any person to open their record page. It lists their facts and events, with a Family navigator that walks through parents, spouses and children. The demo tree spans three generations of a fictional family, so you can explore the relationships straight away.
View a family and its tree
A family page shows a couple, their marriage and their children, with the surrounding family tree drawn as connected boxes. Follow the links to move up and down the generations. Or open the Charts menu for pedigree, descendancy, fan and hourglass views.
The control panel
Sign in as the administrator to reach the control panel. There you manage family trees, import and export GEDCOM files, configure privacy and modules, and manage user accounts. The panel lists your trees with their individual and family counts.
Import your own family tree
To replace the demo tree with your own research, open the control panel and create a new family tree. Then import your GEDCOM file from your computer or the server. Once your own tree is in place, you can keep the demo tree for reference or delete it from the control panel.
Components
These are the key components and their paths:
- webtrees install: /var/www/webtrees/
- Front controller: /var/www/webtrees/index.php
- webtrees config: /var/www/webtrees/data/config.ini.php
- Data folder (never served to the web): /var/www/webtrees/data/
- nginx vhost: /etc/nginx/sites-available/webtrees.conf
- nginx logs: /var/log/nginx/{access,error}.log
- MySQL data: /var/lib/mysql/
- First-boot script: /usr/local/sbin/webtrees-firstboot.sh
- Credentials: /stage/scripts/webtrees-credentials.log (mode 0600 root:root)
Security and next steps
- Change the administrator password after your first sign in. In webtrees, open My pages, then Account.
- Enable HTTPS by installing certbot and requesting a certificate: run
sudo apt-get install -y certbot python3-certbot-nginx, thensudo certbot --nginx. webtrees uses a secure session cookie automatically once it is served over HTTPS. - Set your site address in the control panel under Website preferences once you point a domain at the instance, so links in emails and feeds use it.
- Review privacy for living people in the control panel before you make a real tree public. The demo tree is fictional and visible to visitors.
- Restrict the network security group. Open ports 80 and 443 only to your users or load balancer, and port 22 only to your management network.
- Patch the OS regularly: run
sudo apt-get update, thensudo apt-get upgrade.
Licensing
webtrees is distributed under the GPL-3.0 license and is free to use commercially. SecureAnyCloud packages and supports the image, with 24/7 support at sales@secureanycloud.com.
All product and company names are trademarks or registered trademarks of their respective holders. Their use does not imply affiliation or endorsement.
Deploy on Azure
Launch webtrees on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.
View this image
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com
Overview
webtrees is a mature, open source, online collaborative genealogy application. It gives you and your family interactive family trees, pedigree and descendancy charts, individual and family records, reports, media galleries and per-user accounts through a clean web interface. Relatives can explore and contribute to a shared family history from any browser.
This SecureAnyCloud image delivers webtrees fully installed and security hardened. nginx with PHP 8.3 fronts the application and MySQL 8.0 holds the data. The setup wizard is run to completion at build time, so no open installer ships, and a small demo family tree is imported so the pedigree charts are populated the moment you sign in.
What you get:
- webtrees 2.2.6 served by nginx on port 80 with PHP 8.3 (
php8.3-fpm) - MySQL 8.0 holding the genealogy database, bound to the loopback interface only
- The schema built, the first administrator created and a demo family tree imported for you, so no open setup wizard is reachable
- A unique MySQL password, application database password and webtrees administrator password generated on the first boot of every instance and recorded in a root-only file, so no shared or default credential ships in the image
- A dedicated data volume for the database at
/var/lib/mysqland one for the application and its data at/var/www - Public self-registration disabled by default
nginx.service,php8.3-fpm.serviceandmysql.serviceas systemd units, enabled and active- 24/7 SecureAnyCloud support
Prerequisites
You need an AWS account, an EC2 key pair in the target region, and a VPC with a public subnet.
m5.large (2 vCPU / 8 GiB RAM) is the recommended instance type.
In the security group, allow inbound 22/tcp from your management network for SSH and 80/tcp for the web interface.
Step 1 - Launch the AMI
Subscribe to the listing in AWS Marketplace and choose Continue to Launch. Launch through the EC2 console or the AWS CLI. Select the m5.large instance type, your key pair, and a security group that opens ports 22 and 80.
aws ec2 run-instances \
--image-id <ami-id> \
--instance-type m5.large \
--key-name <your-key-pair> \
--security-group-ids <security-group-id> \
--subnet-id <subnet-id> \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=webtrees}]'Step 2 - Connect to your instance
Connect over SSH as the default login user for the OS variant you launched. This listing may ship more than one OS variant, so use the matching login user below.
- Ubuntu 24.04 LTS: SSH login user ubuntu, connect with ssh ubuntu@<instance-public-ip>
Step 3 - Confirm the services are running
nginx and PHP serve webtrees, backed by MySQL. A one-shot first-boot service generates the per-instance credentials and drives the setup. Confirm that the three long-running services are healthy:
systemctl is-active nginx.service php8.3-fpm.service mysql.serviceEach service reports active.
Step 4 - Verify the stack and endpoints
Run these commands to confirm the deployed webtrees version, that MySQL is bound to the loopback interface only, that the site answers, and that the privileged setup wizard is no longer reachable:
grep -oE "VERSION = '[0-9.]+'" /var/www/webtrees/app/Webtrees.php ss -tln | grep 127.0.0.1:3306 curl -s -o /dev/null -w 'tree page: HTTP %{http_code}\n' http://127.0.0.1/tree/demo curl -s http://127.0.0.1/ -o /dev/null -w 'home: HTTP %{http_code}\n'webtrees reports version 2.2.6 and MySQL listens on 127.0.0.1:3306 only. The demo tree page returns 200. The home page returns 302 and redirects to the default tree, which shows that the setup wizard is closed.
Step 5 - Read your per-instance credentials
The image ships no shared or default login. On first boot, a unique administrator password is generated for this instance, along with the MySQL and application database passwords, and written to a root-only file. Confirm the file permissions and read the non-secret fields:
sudo stat -c '%a %U:%G' /stage/scripts/webtrees-credentials.log
sudo grep -E '^WEBTREES_(ADMIN_USER|URL)=' /stage/scripts/webtrees-credentials.logThe file is 600 root:root. WEBTREES_ADMIN_USER is the admin user name, and WEBTREES_URL is the address to open in your browser. Run sudo cat /stage/scripts/webtrees-credentials.log to see the passwords as well.
Step 6 - Prove the login round-trip from the command line
Run the helper script below. It confirms that the per-instance password for the admin account authenticates against webtrees exactly as your browser does, that a guessable default admin/admin login is rejected, and that the imported genealogy records are present in the live database:
sudo bash /usr/local/sbin/webtrees-cred-roundtrip.shThe helper reports OK. The per-instance password authenticates, the default admin/admin is rejected, and the demo tree's individuals and families are persisted in the database.
Step 7 - Sign in and explore your family tree
Browse to http://<instance-public-ip>/, the value of WEBTREES_URL. Sign in with the administrator username and password from the credentials file.
The tree home page shows a Statistics block that summarises the imported demo tree: the number of individuals and families, the earliest birth and recent changes.
Step 8 - Browse the pedigree charts
Open the Charts menu and choose Pedigree, or any of the ancestor, descendant, fan, hourglass or family-book charts, to view a family visually. The demo tree is pre-populated, so the pedigree chart renders immediately with birth and death details for each ancestor.
Step 9 - View an individual's record
Click any person to open their individual page. It shows names, sex, birth and death facts, sources, notes and media, plus a family navigator linking to parents, spouses and children. Every person in your tree has a full record like this.
Step 10 - Import your own GEDCOM
The demo tree is only a starting point. To load your own family history, sign in as the administrator and open the control panel at http://<instance-public-ip>/admin-control-panel. Choose Family trees, create a new tree and import your GEDCOM file.
You can keep, rename or delete the Demo Family Tree at any time.
Maintenance
- Data volumes: the MySQL database lives on the dedicated data volume at
/var/lib/mysql. The webtrees application and its writable data (config, caches, uploaded media, tree store) live on/var/www. You can resize either volume independently of the OS disk as your data grows, and back them up with EBS snapshots or AWS Backup. - Credentials: the per-instance administrator, application database and MySQL passwords are in
/stage/scripts/webtrees-credentials.log(600 root:root). You can change the administrator password from the control panel at any time. - Ports: nginx serves the web interface on port 80. MySQL is bound to the loopback interface only and is never exposed to the network. To serve HTTPS, terminate TLS with your own domain and certificate in front of nginx.
- Registration: public self-registration is disabled by default. Invite users or create accounts from the control panel.
- Restart: run
sudo systemctl restart nginx.service php8.3-fpm.service mysql.serviceto restart the stack. - Security patches: unattended-upgrades remains enabled, so the OS continues to receive security updates automatically.
Support
SecureAnyCloud provides 24/7 expert support for this image. Contact sales@secureanycloud.com.
This image packages the open source webtrees software (GNU General Public License v3.0) for deployment on AWS. SecureAnyCloud is not affiliated with, endorsed by, or sponsored by the webtrees project.
Deploy on AWS
Launch webtrees with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com