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

Mr. Hyde's iconMr. Hyde

🤘🏻
Prestige 1
Prestige 2
Prestige 3
Prestige 4
Registered
Away on vacation
Lewd
Joined
Feb 11, 2024
Threads
3
Messages
605
Reaction score
4,200
LC COIN
65
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
 
This User is on vacation. Response time may be delayed. Vacation to Oct 27, 2024.
  • Like
Reactions: 1 users
I think you're just going to have to remote in and play them that way honestly.
 
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
 
Have you checked out Moonlight? People have used it to stream all sorts of games, Renpy should be no different.

 
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.
 
This User is on vacation. Response time may be delayed. Vacation to Oct 27, 2024.
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
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
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
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..
 
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.
 
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:
This User is on vacation. Response time may be delayed. Vacation to Oct 27, 2024.
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.
 
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