Tutorial for Houdini-Asyncio and Dash

How to configure the server locally on Nginx/Windows
Only Vanilla Server
v1
by desbarmitar (PT) #5488

Important before you start
  • For the tutorial I will use the C:\CPPS folder as the root.
  • If any of these programs are already installed there may be conflicts. I recommend uninstalling it. I am not responsible for conflict errors that appear.

I Part - Downloads

Download Media Files

https://git.solero.me/solero/vanilla-media


Download Houdini-Asyncio

https://github.com/solero/houdini


Download Dash

https://github.com/solero/dash


Download and Install WinNMP

https://sourceforge.net/projects/wtnmp/files/
(20.05 +)

Install WinNMP

  • Accept the agreement -> Next
  • Folder C:\CPPS\WinNMP-> Next
  • Components required: Redis, Last version PHP, Composer.phar and AcmePhp.phar -> Next
  • Check the box Add to the Path -> Next -> Install
  • Uncheck the box Open after install -> Close

Download and Install Python

https://www.python.org/downloads/
(3.8.2 +)

Install Python

  • Customize installation -> Next
  • Check the box Install for all users
  • Folder C:\CPPS\Python38 -> Install -> Close

Download and Install PostgreSQL

https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
(12.2 +)

Install PostgreSQL

  • -> Next -> Folder C:\CPPS\PostgreSQL\12 -> Next
  • Check all components boxes -> Next
  • Folder C:\CPPS\PostgreSQL\12\data -> Next
  • Password: password -> Next … Install
  • Uncheck the box Stack Builder -> Finish

Download and Install Build Tools for Visual Studio 2019

https://visualstudio.microsoft.com/visual-cpp-build-tools/

Install Build Tools

  • -> Continue
  • Workloads Tab
  • Check the box C++ buid tools -> Install
  • Close

II Part - Configurations

Media Files and WinNMP
  • Extract from ‘vanilla-media-master.zip’ the folders ‘media’ and ‘play’ to C:\CPPS\WinNMP\WWW
  • Open ‘WinNMP’
  • In the tab ‘Projects’ select ‘Project Setup - Play’ (tools icon). Will open the project setup window
  • Check the box ‘Enable Local Virtual Server’ and click on ‘Edit Nginx Virtual Server’

Find
listen 127.0.0.1:80;

Add below
listen *:80;

Find
server_name play.test;

Change
server_name play.localhost;

Find
allow 127.0.0.1;
deny all;

Change
allow all;
##deny all;

Find
location / {
try_files $uri $uri/ =404;
}

Add below
location /create_account/create_account.php {
proxy_pass http://localhost:3000/create/legacy;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location /penguin/activate {
proxy_pass http://localhost:3000/activate/legacy;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location /penguin/create {
proxy_pass http://localhost:3000/create/vanilla/en;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location ~ ^/(.*)/penguin/create {
proxy_pass http://localhost:3000/create/vanilla/$1;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location ~ ^/(.*)/penguin/activate/(.*) {
proxy_pass http://localhost:3000/activate/vanilla/$1/$2;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location ~ ^/(.*)/penguin/activate {
proxy_pass http://localhost:3000/activate/vanilla/$1;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location /penguin/activate {
proxy_pass http://localhost:3000/activate/vanilla/en;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location ~ ^/(.*)/penguin/forgot-password/(.*) {
proxy_pass http://localhost:3000/password/$1/$2;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location ~ ^/(.*)/penguin/forgot-password {
proxy_pass http://localhost:3000/password/$1;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location /penguin/forgot-password {
proxy_pass http://localhost:3000/password/en;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location ~ ^/avatar/(.*)/cp$ {
proxy_pass http://localhost:3000/avatar/$1$is_args$args;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location ^/(.*)/web-service/snfgenerator/session$ {
proxy_pass http://localhost:3000/session;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location /api/v0.2/xxx/game/get/world-name-service/start_world_request {
proxy_pass http://localhost:3000/swrequest;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

  • Save and close
  • In the tab ‘Projects’ select ‘Project Setup - Media’ (tools icon). Will open the project setup window
  • Check the box ‘Enable Local Virtual Server’ and click on ‘Edit Nginx Virtual Server’

Find
listen 127.0.0.1:80;

Add below
listen *:80;

Find
server_name play.test;

Change
server_name play.localhost;

Find
allow 127.0.0.1;
deny all;

Change
allow all;
##deny all;

Find
location / {
try_files $uri $uri/ =404;
}

Add below
location /social/autocomplete/v2/search/suggestions {
proxy_pass http://localhost:3000/autocomplete;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

  • Make sure that Nginx and Redis server are running without errors
  • Open ‘HostsEditor’

If is alredy added
127.0.0.1 play.test
127.0.0.1 media.test

Change the host names
127.0.0.1 play.localhost
127.0.0.1 media.localhost

  • Save and close
  • Edit ‘play\web_service\environment_data.xml’ file:

http://media1.clubpenguin.com/… -> http://media.localhost/

  • Edit ‘index.html’ file in ‘play’ folder and in lang subfolders:

var media = “http://media1.clubpenguin.com/”; -> var media = “http://media.localhost/”;


Houdini-Asyncio
  • Extract the folder from ‘houdini-asyncio-master.zip’ to C:\CPPS and rename to ‘houdini-asyncio’
  • Open the folder and add to the top of the file ‘requirements.txt’

wheel

  • Run the command in this folder (CMD.exe):

pip install -r requirements.txt

  • In the file ‘bootstrap.py’ find the database config and change the default values if needed

database_address: localhost
database_username: postgres
database_password: password
database_name: postgres


Dash
  • Extract the folder from ‘dash-master.zip’ to C:\CPPS and rename to ‘dash’
  • Open the folder
  • Run the command in this directory (CMD.exe):

pip install -r requirements.txt

  • Rename the file ‘sample.config.py’ to ‘config.py’
  • In the file ‘config.py’ find and change the default values if needed:

postgres_host = ‘localhost’
postgres_name = ‘postgres’
postgres_user = ‘postgres’
postgres_password = ‘password’
approve_username = true
vanilla_activate_link = ‘http://play.localhost
legacy_activate_link = ‘http://play.localhost
legacy_play_link = ‘http://play.localhost
vanilla_play_link = ‘http://play.localhost


PostgeSQL
  • Search on Google how to edit the System Variables on your Windows version
  • Search in the Variables Path if is any PostgreSQL related path. If not, add to the end

;C:\CPPS\PostgreSQL\12\lib;C:\CPPS\PostgreSQL\12\bin\

( !!! \PostgreSQL\ is the folder where i install PostgreSQL and can contain a subfolder with the version number \12\)

  • Save and close
  • Open the folder houdini-asyncio
  • Run the command in this directory (CMD.exe):

psql -h localhost -d postgres -U postgres -f houdini.sql

(password: password)


III Part - Run the Servers

Media Files and Redis
  • Open WinNMP, the servers Nginx and Redis should automatically start

Houdini-Asyncio
  • Open the folder ‘houdini-asyncio’
  • Run the commands in this folder (CMD.exe):

python C:\CPPS\houdini-asyncio\bootstrap.py login
python C:\CPPS\houdini-asyncio\bootstrap.py world


Dash
  • Open the folder ‘dash’
  • Run the commands in this folder (CMD.exe):

python bootstrap.py -c config.py


If you used this tutorial and it is working, leave a like.

3 Likes

Hi, I followed all of the steps in the guide, double checked and everything seems to be the same, but when I go to create a penguin I’m hit with a 404. So I was looking around and noticed that my url was still play.test and wasn’t redirecting properly. Even changing .test to .localhost for both play and media on everything this guide said to, it still won’t change and I still can’t get past the 404. I’m used to using Xampp and using phpmyadmin, so I’m a little unsure what I’m doing here.

I confirm that I saw the message.
Since I did the tutorial there have been many updates and it is difficult for me to always check the installation and configuration of the server.
I am investigating what the problem will be and its origin to correct the tutorial.
But I advise when configuring the Dash server to copy the server settings that are in the description of it on Github, those that are here in the tutorial are out of date.