Question: How to self-host RenPy games and play them remotely?

hyde231

Registered
Lewd
Feb 11, 2024
106
236
LC COIN
15
Hi, soon I will be on business trip for a longer period and I already know I will miss my games. Now I do have a docker host running 24/7 and wondered if I could host my RenPy games behind a reverse proxy somehow and access them via a browser from anywhere. Does anybody here know how to do or aproach that?
Any hints would be nice, because all my searches braught up tips how to compile RenPy games for the web only, but this is for devs only and not applicable for games already packaged for Windows or Linux.
Thanks in advance
 
  • Like
Reactions: 1 user

sb112592

Registered
Lewd
Apr 24, 2022
28
18
LC COIN
15
Not what your asking about nor am i tech savvy but at least for Android there is an emulation app called joiplay which works for renpy and rpgm games so you would just have to transfer your game files to your phone and use that
 

draslimeil

Registered
Jun 3, 2022
38
33
LC COIN
45
Have you checked out Moonlight? People have used it to stream all sorts of games, Renpy should be no different.

 

hyde231

Registered
Lewd
Feb 11, 2024
106
236
LC COIN
15
Thanks all for the replies.

I could just download the Android ports, or make use of this emulator, but I don't want to play on a tiny screen and flood my phone with GBs of games.

Yes, remotly accessing my desktop would be the easiest way, however, I don't want to keep my main rig to run idle for a few weeks. This rules out this Moonlight streaming thingy as well. My server runs anyway, and is quite hardened and secured, so I wanted to make use of it. Considering that RenPy games can in principle be packaged for the web it seemed to be a suitable target. I found this old and propably outdated repo but wanted to get some more input before trying this.
 

Cornfapper

Registered
Lewd
Dec 25, 2022
4
8
LC COIN
-494
You'd unfortunately have to recompile the games to run on a webbrowser.

Or try to use a converter like you linked (since you don't have the source files to compile), but I have no Idea how well that works.
 
  • Like
Reactions: 1 user

dez666

Prestige 1
Registered
Lewd
Dec 16, 2022
7
9
LC COIN
181
you can mount your linux server's filesystem remotely using ssh with FUSE (called sshfs in most linux distros). there's also a client that can mount ssh for windows as well at . with this you can either access the files on a windows machine or on a linux machine (or vm) remotely as long as you have SSH accessible from the internet.

two caveats:

you should only use SSH public key authentication and not password authentication to limit your expose, as public key auth is much less likely to be brute forced.

most games will leave state/save files in your user home directory (on linux or windows). if you're worried about someone else browsing files in your machine you use for remote access, then you should either use a VM you can easily clear/reset or delete the save files when you're done.

the benefit of this setup would be that you're not going to have to figure out how to get every game running in a browser, and locally executing them will have better graphics performance than trying to do remote screensharing.
 
  • Like
Reactions: 1 users

bigtopia

Registered
Lewd
Apr 19, 2023
42
81
LC COIN
221
Create a Dockerfile in the root of your RenPy project.
It should look something like this:

Code:
FROM ubuntu:latest

# Install necessary packages
RUN apt-get update && apt-get install -y \
    wget \
    unzip \
    xorg \
    libsdl1.2debian \
    libjpeg62 \
    libpng16-16 \
    libgtk2.0-0 \
    libgl1-mesa-glx \
    && rm -rf /var/lib/apt/lists/*

# Set the working directory
WORKDIR /app

# Copy the Ren'Py game files into the container
COPY . /app

# Run the Ren'Py game
CMD ["renpy.sh"]
You will have to modify the 'Copy' command to ensure it copies all the necessary files and folder from your RenPy project.

Then you will have to build the docker image, which you can do in terminal

Code:
docker build -t my-renpy-game
You don't actually have to call it 'my-renpy-game', you can call it whatever you want.

Next run your container
Code:
docker run -it -p 8000:8000 my-renpy-game

Now test it in localhost. Open a browser and go to `

If it works, you should be able to hit it at your public IP. If not, check to make sure you named everything the same in each config step.
Hope that helps.
 
  • Like
  • Heart
Reactions: 1 users

dez666

Prestige 1
Registered
Lewd
Dec 16, 2022
7
9
LC COIN
181
Create a Dockerfile in the root of your RenPy project.
It should look something like this:
how's that suppose to serve a renpy project as a webapp? renpy doesn't serve a http interface by default and i don't see anything here that would..
 

bigtopia

Registered
Lewd
Apr 19, 2023
42
81
LC COIN
221
how's that suppose to serve a renpy project as a webapp? renpy doesn't serve a http interface by default and i don't see anything here that would..
It won't, it will just execute the game in a container if he connects to his main box through tunneling. So this will allow exactly 1 person to play a single instance of his game from his remote box on his main box. To set up a web app is much more complicated than a docker file. You would need a web server, scripts to make requests and process responses, content hosts for the game files, something to manage session and server state. However, I think the 1 dude accessing 1 instance of the game is his use case.
 

hyde231

Registered
Lewd
Feb 11, 2024
106
236
LC COIN
15
Create a Dockerfile in the root of your RenPy project.
It should look something like this:

Code:
FROM ubuntu:latest

# Install necessary packages
RUN apt-get update && apt-get install -y \
    wget \
    unzip \
    xorg \
    libsdl1.2debian \
    libjpeg62 \
    libpng16-16 \
    libgtk2.0-0 \
    libgl1-mesa-glx \
    && rm -rf /var/lib/apt/lists/*

# Set the working directory
WORKDIR /app

# Copy the Ren'Py game files into the container
COPY . /app

# Run the Ren'Py game
CMD ["renpy.sh"]
You will have to modify the 'Copy' command to ensure it copies all the necessary files and folder from your RenPy project.

Then you will have to build the docker image, which you can do in terminal

Code:
docker build -t my-renpy-game
You don't actually have to call it 'my-renpy-game', you can call it whatever you want.

Next run your container
Code:
docker run -it -p 8000:8000 my-renpy-game

Now test it in localhost. Open a browser and go to `

If it works, you should be able to hit it at your public IP. If not, check to make sure you named everything the same in each config step.
Hope that helps.
Ooooh that looks interesting. I need to test this.

But to clarify, what would be the content of ./app ? Would it be the extracted game package for Linux?

Edit: And I understand why a webserver would be difficult, but wouldn't some dockerized guacamole gui be possible in this case?
 
Last edited:

bigtopia

Registered
Lewd
Apr 19, 2023
42
81
LC COIN
221
But to clarify, what would be the content of ./app ? Would it be the extracted game package for Linux?
Yeah its just the game files. I am not sure if this is the benefit that the OP was looking for, but some folks like to encrypt folders for reasons. This way you can keep your stuff encrypted, have the app hosted in docker, and if your kids/SO start snooping on your computer, unless they are studying computer science or something, they probably won't find any content not meant for them.
 

Ciferat

Registered
Lewd
Nov 20, 2023
97
36
Location
Floor 2
LC COIN
67
Hi, soon I will be on business trip for a longer period and I already know I will miss my games. Now I do have a docker host running 24/7 and wondered if I could host my RenPy games behind a reverse proxy somehow and access them via a browser from anywhere. Does anybody here know how to do or aproach that?
Any hints would be nice, because all my searches braught up tips how to compile RenPy games for the web only, but this is for devs only and not applicable for games already packaged for Windows or Linux.
Thanks in advance
You don't have to be clever if there's a GNOME visual shell or others. You just need a tool that will allow you to get a picture from your desktop. For example, VNC can be easily configured only by NAT forwarding.
 
Back
Top Bottom