Prepare a VM for PlayTelly
Use this guide to build the Debian 13 virtual machine that PlayTelly runs on, when you don't have a physical server. When you finish, continue with Install PlayTelly on your own server.
Before you begin¶
- A host computer (Windows, an Intel Mac or an Apple Silicon Mac) with enough spare resources for the VM: 8 GB of RAM, 4 CPUs and 60 GB of disk at minimum. Give the VM no more than about 75% of the host's RAM and CPUs.
- Administrator rights on the host.
Install VirtualBox 7.2.12¶
PlayTelly is tested with VirtualBox 7.2.12. The general download page serves a newer version, so use the old-builds page.
- Open
https://www.virtualbox.org/wiki/Download_Old_Builds_7_2and find VirtualBox 7.2.12. - Download the installer for your host: Windows hosts, macOS / Intel hosts, or macOS / Apple Silicon hosts (an M1 to M4 chip; the Apple menu, About This Mac, tells you which).
- Run the installer with the default options. On a Mac, if the installer is blocked, open System Settings, Privacy & Security, select Allow Anyway, and run it again.
-
Open VirtualBox, then Help, About VirtualBox (on a Mac, the VirtualBox menu, About VirtualBox).
The version is 7.2.12.
Download Debian 13¶
Download the network installer for your host. Check that the file name says 13.6.0. If Debian has moved to a newer
point release, get 13.6.0 from cdimage.debian.org/cdimage/archive/.
| Host | Image |
|---|---|
| Windows or Intel Mac | https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-13.6.0-amd64-netinst.iso |
| Apple Silicon Mac | https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/debian-13.6.0-arm64-netinst.iso |
Create the VM¶
- In VirtualBox, select New.
- Enter a Name, for example
playtelly. Under ISO Image, choose Other and select the Debian file. Type and Version fill in by themselves (Linux, Debian (64-bit)). Select Next. - On Unattended Guest OS Installation, enter the username and password you will log in with. Leave the other fields as they are. Select Next.
- Set Base Memory to at least 8192 MB and Processors to at least 4. Select Next.
- Set Disk Size to at least 60 GB (80 GB is more comfortable). Leave Pre-allocate Full Size unticked.
- Select Next, then Finish.
The VM appears in the list, powered off.
Choose the network¶
Before you start the VM, right-click it and open Settings, Network. You can change this only while the VM is powered off.
- Bridged Adapter (try this first): set Attached to to Bridged Adapter and choose the host's network adapter. The VM gets its own address on your network, and devices reach it directly.
-
NAT (only if bridged is too slow or not allowed): set Attached to to NAT, open Advanced, Port Forwarding, and add these rows with Host IP and Guest IP blank:
Name Protocol Host port Guest port Used for DNS-UDP UDP 53 53 Name lookups DNS-TCP TCP 53 53 Name lookups HTTP TCP 80 80 The site HTTPS TCP 443 443 The site Wizard TCP 8800 8800 The setup wizard, during setup only SSH TCP 2222 22 Logging in from another computer: ssh -p 2222 <USER>@<HOST_LAN_IP>With NAT, devices reach the host computer, not the VM. The install guide explains what to enter in the wizard.
Install Debian¶
- Select the VM and select Start. The Debian installer starts. Some screens below may not appear: skip to the next.
- Choose the language, location and keyboard. Enter any Hostname (for example
debian) and leave Domain name empty. - Leave Root password empty (press Enter twice). Your user then gets
sudo, which the installer needs. - Enter your name, a username and a password.
- Partitioning: choose Guided - use entire disk, the only disk, All files in one partition, then Finish partitioning and write changes to disk, and Yes.
- Choose No for extra installation media and Yes for a network mirror in your country. Leave the proxy empty.
- On Software selection, untick Debian desktop environment and GNOME. Keep SSH server and standard system utilities.
- Install the GRUB boot loader on the only disk, then select Continue.
The VM restarts to a text login prompt.
Log in and check¶
- Log in with your username and password. The password does not show while you type.
-
Check
sudo:It returns with no error. If it says not in the sudoers file (for example, because the installer set a root password anyway), fix it as root, then log out and in again:
-
Find the VM's address:
Under the adapter that is not
lo(for exampleenp0s3), theinetline shows the address. A bridged VM has an address in your network's range, such as192.168.1.45. A NAT VM shows10.0.2.15.
If pages load very slowly later with a bridged VM over Wi-Fi, use a wired connection or switch to NAT.
The VM is ready. Continue with Install PlayTelly on your own server.
Mac mini hosts only: restart after a power cut¶
Do this after the install has finished, on a Mac mini host that runs the VM in VirtualBox. After a power cut, the Mac and the VM must come back with nobody touching them. The VM side is set up by the installer.
-
On the Mac mini, in Terminal, from the repository folder you cloned in Install PlayTelly on your own server and as the macOS account that owns the VM, run:
<VM_NAME>is the VM's name in VirtualBox (VBoxManage list vmslists them). The script stops the Mac from sleeping, restarts it after a power failure, turns off automatic macOS update installs, and adds a service that starts the VM headless at boot and shuts it down cleanly. -
Check by hand: FileVault is off (otherwise the Mac waits at a password screen after a power cut), the Mac uses Ethernet with a reserved IP, and ideally a UPS.
- Test, in order:
- Inside the VM, run
sudo poweroff. The VM starts again within about 30 seconds. - Reboot the Mac and don't log in. A few minutes later the VM is up.
- Unplug the Mac's power and plug it back in. The VM comes up again.
- Inside the VM, run
To check the state, run sudo host/macos/setup-host.sh --status. To stop the VM for maintenance without it restarting,
run sudo touch /usr/local/var/ibc-vm/maintenance, and remove that file to allow it to start again. To remove the
service, run sudo host/macos/setup-host.sh --uninstall.