[SOLVED] Can't get self hosting to work

Hi, I’m not a coder so I don’t really know what to do here, I downloaded the index.html file, I uploaded everything to GitHub, and it’s just loading an empty page, also tried to upload to my webserver and it’s not working, I guess the simple way is to upload to the play canvas servers, but I don’t want my clients to see the play canvas link in the iframe, can someone direct me how to approach this?

Thank you

Hi @YaronS and welcome!

Have you tried reading through the following manual page? It provides info on the basic steps that can get you to self-host the Playcanvas build.

https://developer.playcanvas.com/en/user-manual/publishing/web/self-hosting/

yes I have gone through all of them, and I don’t understand why it’s not working, do I just need to upload the files and the index will run it? I read something about server side code or something like that is that related?

“When writing PlayCanvas applications, no code you write in PlayCanvas runs server-side and we don’t provide any server-side code for your projects.”

Can you provide a link of your hosted app to take a look?

Usually it’s sufficient to get all the files from the downloaded Playcanvas build, upload them in your hosting/server remote folder and try running index.html in the browser using the remote url.

this is just a blank project I created and it’s also acting in the same way, giving me a blank page when trying to load the index

And where are you uploading the contents? On which web-server? If you can provide the remote url to try that out it would be helpful.

I’m currently trying on github https://wolfpoly3d.github.io/

but I do want to upload to www.siteground.com eventually I want all the projects to be self hosted on my side and provide my clients iframe code for it

These files seem to be missing, not available on that url, that’s why the app fails to load:

image

Make sure all files from the build have been uploaded to that url and are available.

yes I can see the start and loading are there

I can give you access to github but I don’t know how…

Actually I now see a collaborator option do you have a user name?

Sorry I haven’t used GitHub pages to host any webpage to help you with it.

Here is their getting started guide in case it helps:

https://help.github.com/en/github/working-with-github-pages/creating-a-github-pages-site

If you don’t find a fix for this, try contacting their support or support forums. This is definitely a web hosting issue, not directly related with Playcanvas. But I agree it would be good to have it fixed, may help others in the future.

If you find a fix, do share it!

Ok thank you so much for your help I appreciate it!

1 Like

This is the repo: https://github.com/WolfPoly3d/WolfPoly3d.github.io

In the index.html file, remove the WolfPoly3d.github.io for the scripts URL:

<body>
    <script src="WolfPoly3d.github.io/__start__.js"></script>
    <script src="WolfPoly3d.github.io/__loading__.js"></script>
</body>

At the moment, it is looking for https://wolfpoly3d.github.io/WolfPoly3d.github.io/__start__.js instead of https://wolfpoly3d.github.io/__start__.js

1 Like

Actually, looking into it more, it looks like this is the issue. https://stackoverflow.com/questions/6397780/names-starting-with-underscore-shows-errors-page-doesnot-exists-for-gh-pages-bra

Looks like github processes files with leading underscores on filenames.

hmm ok thank you! can you maybe recommend a web server that I can just drop the files in and it will work? I don’t even know what to look for… do I need a domin for this or I can grab a link directly from the server?

I just added the file name .nojekyll to github and it worked! thank you!

3 Likes