How to create own sites based on Steemit or Golos blockchains with help of Glasnost from @ontofractal. My personal experience.

in #open-source7 years ago (edited)

From the moment that famous @ontofractal started his great project named Glasnost creating own personal site based on Steemit or Golos blockhain became a piece of cake! I know it because I have already made personal mysteemit.gq (for Steemit) and mygolos.gq (for GOLOS) sites that run on my VPS and after reading this post you also will be able to do it easily. Here is how my steemit site looks like:




Let's begin! So If you would like to have one or several sites with help of Glasnost the first thing that I recomend to do is to find some good VPS. I picked one from ovh.com for 3.5 USD per month and happy with that. You can follow me and do the same (check this page for that: https://www.ovh.com/us/vps/vps-ssd.xml) or find server to host your site somewhere else.

Next thing that you will need is domain name. It can be taken for free here: https://my.freenom.com . Then you will need to attach your domain name to your server. Check domain settings for that.

After that you can start with launching Glasnost at your server. I installed it on Ubuntu 16.04 OS and recommend you to do the same.

The first thing you need to do is to install and configure Docker and NGINX. You don't need to be programmer to do it. Everything that is required is access to terminal on your server and careful following instructions. Let's begin with Docker. To install it, go to the page https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04
and copy/past necesary commands. It's easy. Then install and configure nginx server. For this purpose open page https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-16-04 and do copy/paste of required commands.

Now it is time to configure nginx. Put into your config file for nginx something like this:

server {
listen 80 ;
server_name mysteemit.gq ; # here you change mysteemit.gq for your domain name
location / {
expires off;
proxy_pass http://51.254.130.194:8081; #51.254.130.194 - this is IP of my VPS server, you will need to edit it to match the IP of yours
}
}

Here I took 8081 port to make my first site run on it. For my second site - mygolos.gq - I took 8081 port. You can follow me and do the same or took some other ports.

The last thing that we need to do is to create config json file for Glasnost. Here you can read how to do it : https://github.com/cyberpunk-ventures/glasnost/blob/master/README-en.md . Also you can check russian version :
https://github.com/cyberpunk-ventures/glasnost/blob/master/README-ru.md and use Google for translation. It will help if English file for some reason is outdated

This file should be awailable online in raw format. One way to do it is to upload it on github.com (it is free) and i did it this way
My current file looks this way:
{
"authors": [{
"account_name": "steemitblog",
"filters": {
"tags": {
"blacklist": [],
"whitelist": []
},
"title": {
"blacklist": ["test \d"],
"whitelist": []
},
"created": {
"only_after": "2017-01-01",
"only_before": ""
}
}
},
{
"account_name": "mrwang",
"filters": {
"tags": {
"blacklist": [],
"whitelist": []
},
"title": {
"blacklist": [],
"whitelist": ["WANGCHANGE"]
},
"created": {
"only_after": "2017-01-01",
"only_before": ""
}
}
},
{
"account_name": "steemfactory",
"filters": {
"tags": {
"blacklist": [],
"whitelist": []
},
"title": {
"blacklist": [],
"whitelist": []
},
"created": {
"only_after": "2017-01-01",
"only_before": ""
}
}
},
{
"account_name": "virtualgrowth",
"filters": {
"tags": {
"blacklist": [],
"whitelist": []
},
"title": {
"blacklist": [],
"whitelist": ["Giveaway"]
},
"created": {
"only_after": "2017-01-01",
"only_before": ""
}
}
},

{
"account_name": "ontofractal",
"filters": {
"tags": {
"blacklist": [],
"whitelist": []
},
"title": {
"blacklist": [],
"whitelist": []
},
"created": {
"only_after": "2017-01-01",
"only_before": ""
}
}
}
],
"about_blog_permlink": "ann-introducing-glasnost-alpha-open-source-blog-and-app-server-for-steem-golos-blockchains",
"about_blog_author": "ontofractal",
"source_blockchain": "steem"
}

As you can notice, I chose those authors (@virtualgrowth, @mrwang , @steemfactory) that do crypto tokens giveway (I like what these guys do, really!) and @steemitblog account to follow all steemit news. I also follow @ontofractal to track all news about Glasnost project.

At last, everything is ready and we can launch Glasnost. Open terminal, type there such command :

docker run -it -p 8081:80 -e "GLASNOST_CONFIG_URL=https://raw.githubusercontent.com/sokil747/glasnost/master/config.ini" --restart on-failure:10 ontofractal/glasnost:latest

Of course, there should be YOUR link to YOUR config json file . And , here you put proper port (in my case it is 8081). Press "Enter" key and feel happy :)

To detach your terminal from docker, press Cntrl+P, then Cntrl+Q.

If you see no content on your site, it means that you need to update content via admin panel. Type in your browser right after your site name "/admin" , save admin pass, then put raw link to config json file and press "sync" button. That is all !


TIP: If your config file does not work? you can check it and find the reason on this site: http://jsonlint.com . It helped me to find errors in my code. Another reason of possible problem is that url in docker command does not contain link to raw json code. If you decided (similar to me) to put your config file on github. the link should start with https://raw.githubusercontent.com part.

Sort:  

I see my posts there. Keep up the good work and thanks for sharing my posts along with others.

Did you experience this glitch? https://github.com/cyberpunk-ventures/glasnost/issues/7

Also, assuming there was VPS maintenance & the server was reset, does the admin panel reset and your configuration is lost?

Thanks

Hi! No, I didn't have such glitch as mentioned in the link. But I tried reboot to see if there is problem with VPS reboot and confirm that all configs are lost after it. Did you report @ontofractal about it?

@ontofractal just responded on github:

By starting up the docker container again won't the admin page reset (potentially enabling a malicious user to gain access to the admin panel?)

Yep, Glasnost is in alpha and current admin workflow isn't ready for production yet. I will implement proper authorization and authentication soon.

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.032
BTC 59244.49
ETH 2977.21
USDT 1.00
SBD 3.77