Fans of Cards Against Humanity fans might be aware of the online clone, Pretend You’re Xyzzy. What they may not know is that website is completely open source. Anyone can run their own version of the website, which I did.

Check it out

I first got the idea when PretendYoureXyzzy was overloaded. Presumably from all the quarantined college kids trying to maintain their game night. You too can lighten their load by hosting your own instance. See their github

The easiest setup involves docker. So step 0: install docker. This tutorial assumes you’re using a Linux box, but docker will run on any OS, and I’m sure you can adapt it for whatever your OS is. See the docker site installation instructions

Step 1 is to get the PretendYoureXyzzy container: docker pull emcniece/dockeryourxyzzy

Step 2 is to run the container

docker run -d -p 80:8080 emcniece/dockeryourxyzzy:run

After a minute booting up, the image will be running, just enter your IP in your browser. If hosting at home, you’ll need port forwarding on your router.

Now you have a working version of Cards Against Humanity running on your computer, accessible online for all your friends.

Optional Steps

If port 80 is unavailable for whatever reason, like an existing Apache server, you can do whatever port you want, I did port 6969, because I’m immature.

docker run -d -p 6969:8080 emcniece/dockeryourxyzzy:run

To make it more convenient to access from the browser, you can reconfigure apache to selectively forward traffic from port 80 to another port, depending on the subdomain in the request. Here is my apache config file.

<VirtualHost *:80>
    ProxyPass / http://localhost:6969/
    ProxyPassReverse / http://localhost:6969/

Copy it into a file named cah.conf in /etc/apache2/sites-available, then run sudo a2ensite cah.conf. Now, will resolve the exact same as

Legal Note:

I host this in a separate subdomain and machine for a reason: you aren’t allowed to monetize it. Cards Against Humanity is released under a Creative Commons License, meaning you can copy and plagiarize it, but you can’t make money off of it. Keep that in mind.