Introduction to Federation in Stellar Blockchain


  1. Basic knowledge of how cryptocurrency technologies.
  2. Have a Stellar account, you can easily create one from the stellar account viewer or with the wallet.


In this article, we’ll be learning what is a federation in the Stellar network, its use case, how to actually benefit from it, and also how to deploy one into an Alibaba Cloud Elastic Compute Service (ECS) with Ubuntu installed.

About Stellar

Stellar is one of the most used Blockchain network right now in terms of market capitalization and adoption. According to CoinMarkerCap, at the time of writing, Stellar is the ranked 6 out of 100 cryptocurrencies.

Federation: What and Why

One of the main goals of new Blockchain technologies nowadays is to make their features more accessible to the rest of the word, meaning to peoples with not clear understanding of all the mechanic that is happening behind although they would like to (or need to) take advantage of this technology.

Stellar Address

A Stellar address looks almost same like a normal email address, but with a simple addition here called the federation server link.

  1. username is the unique identification of an account, most of the time it’s an email address as an email is naturally unique in the whole world.
  2. domain.tld is the federation server link where you have created your stellar federation address, for technical persons it’s the server where we’ll look for the federation configurations (stellar.toml) link to query the real public key matching with the username.

Creating a Stellar Address

Creating a federation address is a very straightforward process where one only needs to submit a basic form with a username/email he would like to be assigned to one of his specific public key, this needs to be done from a Stellar federation server you trust or either building yours.


Connecting to

After being logged in, here is the screen I see with my stellar account I have added.

Sending Money (XLM) to a Stellar Address

Let’s assume that we’ve two Stellar accounts, the one we’ll send the money to has a federation address we have submitted in the previous section.

  1. Interstellar is just one of the easier federation server many Stellar peoples are using daily, any other could do as long as it’s trusted by the community too.
  2. XLM is the native currency of the Stellar Blockchain.
  3. As we’re on Interstellar itself (where we have created our federation address), there is no need to fill the second part of the address. It’s guessed to be *

Setting Up a Federation Server

Let’s suppose you don’t trust anyone else than yourself. You can build your own federation server using this process. Technical (software developer) skills are needed to follow the whole process as it involves:

  1. Create a specific configuration file into the .well-known folder, accessible from this link: https://YOUR_DOMAIN/.well-known/stellar.toml
  2. Add the federation_url into your configuration file, similar to the Interstellar one shown in the image up here with the name FEDERATION_SERVER.
  3. Implement federation url HTTP endpoint, here we have two possibilities either building from scratch or start from the one open sourced by Stellar Development Foundation and accessible over on GitHub.
  1. Install MySQL. Postgres or Sqlite3 can be use as well
  2. Install Go tools, as the federation server has been built with Go programming language.
  3. Download and run the federation server

Install MySQL

Here are the terminal commands to type in order to install MySQL, the last one is to configure and make it more secured on our ECS:

sudo apt-get update
sudo apt-get install mysql-server

Install Go Tools

Go tools are required to run any Go program into a computer, let’s get the latest stable Linux binary release from the official page here and unzip it into the appropriate folder then configure the environment variables. The latest version at the time of writing this article is Go 1.11.1.

cd /usr/local : go into the right folder to install the binary
wget : to download our binary into the current directory
tar -C /usr/local -xzf go1.11.1.linux-386.tar.gz : unzip the downloaded binary

Download and Run the Federation Server

The federation server is provided by Stellar, just pick one from the releases here, especially the latest according to your operating system (ours is Ubuntu then we took the Linux one).

port = 8000[database]
type = "mysql"
dsn = "dbuser:dbpassword@/dbname"
federation = "SELECT account_id as id FROM Users WHERE username = ? AND domain = ?"
reverse-federation = "SELECT username as name, domain FROM Users WHERE account_id = ?"


In this tutorial, we focused on how the famous stellar federation address work, how to install one into our ECS, how it simplifies the money sending operation as now there is no need to always look for the very long correspondent’s public key.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website: