# The First Self Hosted Game

**URL:** https://discussion.scottibyte.com/t/the-first-self-hosted-game/94
**Category:** Uncategorized
**Created:** [May 30, 2022, 6:59am UTC](https://discussion.scottibyte.com/t/the-first-self-hosted-game/94 "2022-05-30T06:59:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![scott](https://discussion.scottibyte.com/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://discussion.scottibyte.com/u/scott)
#### Post date: [May 30, 2022, 6:59am UTC](https://discussion.scottibyte.com/t/the-first-self-hosted-game/94/1 "2022-05-30T06:59:49Z")

</div>

The video “The First Self Hosted Game” shows how to install the github vintage computing repository. This installs several programs. However, I focus on the program Zork, AKA Dungeon to show an example of one of the first ever text based adventure programs.

Read about the vintage computing Github repository here:

```auto
https://github.com/jgoerzen/vintage-computing

```

Zork was written in 1980 and originally coded for the Digital Equipment Corporation PDP-10/11 computers and later converted to Fortran 77.

In my example, I create a LXD image for the application. A virtual machine would also work just as well. On my channel, I have several videos discussing LXD containers and lxc command options and networking.

Here is how I created my container. Note that I used a custom image and a custom profile which may not exist on your system unless you have followed my LXD series:

```auto
lxc launch Ubuntu-20.04 zork --profile default --profile vlan80 -c boot.autostart=true 

```

I connect to the container and create a user account and grant it sudo privilege:

```auto
lxc exec zork bash
adduser scott
chmod -aG sudo scott
su - scott

```

Now install “git” and clone the github repository to the local machine:

```auto
sudo apt install git
git clone https://github.com/jgoerzen/vintage-computing

```

Move into the new folder and execute the setup:

```auto
cd vintage-computing/setup
sudo ./setup.sh

```

After installation, set the ownership of the files to the user and move back to the home folder:

```auto
sudo chown -R "`id -u`:`id -g`" /opt/vint
cd ~

```

Create a script to run the program:

```auto
nano zork.sh

```

Insert the following data into script and save it:

```auto
#!/bin/bash
# trap control-c
trap ctrl_c INT

function ctrl_c() {
        echo "** Goodbye"
        exit
}

cd ~/vintage-computing
vint zork-glk
exit

```

Set the execute bit on the script:

```auto
chmod +x zork.sh

```

Edit the .bashrc environment file for terminal sessions:

```auto
nano .bashrc

```

Go to the end of the file and add the following line:

```auto
source ./zork.sh && exit

```

Now, if you ssh to your server instance, Zork will run. If you exit normally or attempt to CTRL C, you will be logged out of the server.

I took this a step further by creating an entry in my Apache Guacamole to connect to my Zork instance. This allowed the terminal based program to be HTML5 hosted in a web page. Watch my Apache Guacamole tutorial to learn how to self host Apache Guacamole.
