Set up your own
Tent server in 5 minutes

Tent is a protocol for distributed social networking. Think of something like Twitter or maybe even Facebook working similarly to way email works. Just like anyone can set up their own email server, and send and receive emails entirely independently from others, Tent allows the same to happen with Twitter-like communication. Anyone can set up their Tent server, and publish posts, that are received by followers accross many servers. It's pretty cool, because no single company can control your Tent experience, and because it works, right now.

This short tutorial can help you set up your own Tent server very quickly, but it assumes at least basic understanding of command line. Git or Heroku knowledge might also help. If you have no idea what these things are, you can still be part of Tent - go to Tent.is , and get a free account.

Some conventions: text that is monospaced and highlighted should be executed in the command line. Text that you need to replace (such as username or domain) will be displayed in red .

  1. Sign up for Heroku if you don't have account already.
  2. Install Heroku Toolbelt. It will install heroku command line tool and git, two things we will need. If you have git already, don't worry, it shouldn't overwrite your current installation.
  3. Login to Heroku with heroku login . It will ask for your Heroku email and password. As you type your password, nothing will show up on the command line. That's how it should work - keep calm and type on.
  4. It should take care of SSH public key uploading. If not, generate one and upload with heroku keys:add ~/.ssh/id_rsa.pub
  5. Clone TentAdmin: git clone git://github.com/tent/tentd-admin.git You might want to cd to another folder before cloning.
  6. Move to your newly-cloned folder with cd tentd-admin
  7. Create a new Heroku app with heroku create your_chosen_name --addons heroku-postgresql:dev Replace your_chosen_name with something else. It will be accessible at your_chosen_name.herokuapp.com and can be used as your entity. Entity in Tent is like your @-handle in Twitter. Examples of tent entities are https://example.tent.is and http://example.org. You follow or mention other Tent users by their entities.
  8. Add a database with heroku pg:promote $(heroku pg | head -1 | cut -f2 -d" ")
  9. Set up basic environment variables: heroku config:add ADMIN_USERNAME=your_chosen_tent_admin_username ADMIN_PASSWORD=your_chosen_tent_admin_password SERVE_ASSETS=1
  10. Push tentd-admin to Heroku with git push heroku master . It's more that just a simple git push, though, because Heroku will see that this is a Rack app, load the code and restart the server.
  11. That's it! Now you should be able to open TentAdmin at your_chosen_name.herokuapp.com/admin, login with username and password you just picked, and set up your profile. Then you can authenticate your client (such as TentStatus or Tentia ) and use Tent.

Bonus: use your own
domain as your entity

To use your own domain as your entity, there are a few more steps.

  1. In TentAdmin, set entity field to your domain, such as https://example.com (include http:// or https://).
  2. Add one more environment variable that sets what entity tent server represents: heroku config:add TENT_ENTITY=your_domain
  3. Finally, you need to make your Heroku server discoverable from your domain URL. For that we need to add HTTP header like Link: <https://example-tent.herokuapp.com/profile>; rel="https://tent.io/rels/profile" to your domain.
    It might be easiest with PHP, just add <?php header('Link: <https://example-tent.herokuapp.com/profile>; rel="https://tent.io/rels/profile"'); ?> at the top of index.php. It should also be possible with Apache or any other server - what you are looking for is how to add custom HTTP response header to a request to your website's index (or any page).
  4. If you can't get HTTP response header to work, you can add HTML <link> tag as another way to discover your tent entity. <head> section in HTML should have a <link> tag similar to this: <link href="https://example-tent.herokuapp.com/profile" rel="https://tent.io/rels/profile" /> These tags are much easier to add and should work with most clients, but are not as reliable as HTTP response headers, so try that first.
  5. And just like that, you're done! Tell your friends to follow you on Tent as https://example.com and enjoy distributed social networking!