* Recent release of GNU+Linux Debian or Ubuntu
* docker
* docker-compose
Clone the repository.
# Clone Ecko to ~/ecko directory
git clone https://github.com/magicstone-dev/ecko.git
# Change directory to ~/ecko
cd ~/ecko
Review the settings in docker-compose.yml.
If you're not making any local code changes or customizations on your instance, you can use a prebuilt Docker image to avoid the time and resource consumption of a build.
- Open
docker-compose.ymlin your text editor. - Add environment variables to the
dbsection:environment: - POSTGRES_PASSWORD=xyz <-- choose a safe one, 20-30 chars - POSTGRES_DB=ecko_production - POSTGRES_USER=ecko - POSTGRES_HOST_AUTH_METHOD=trust
- (Optional) To use pre-built images, comment out the
build: .lines for theweb,streaming, andsidekiqservices. - Save the file and exit the text editor.
- If you followed step 3, run
docker-compose pull. If you skipped step 3, rundocker-compose buildto build the necessary container images. - Create the public/system dir with
mkdir public/system - Set correct file-owner with
sudo chown -R 991:991 public/system
Next generate a configuration with:
docker-compose run --rm web bundle exec rake mastodon:setup
This is an interactive wizard that will guide you through the options and generate app secrets.
- Enter the Fully Qualified Domain Name (FQDN) of your Ecko instance.
- Select if you want a Single User instance (recommended only if you're running this for one person).
- Obviously, you are running Ecko in a docker instance, so type Y (or hit return, as it's the default)
- The PostgreSQL host is
db, the port is5432(again, default), the database isecko_production, the database user iseckoand the password is the one you chose and put intodocker-compose.yml. - The redis server is
redis, the port is6379and the password is empty. - If you want to store uploaded files on the cloud, enter Y here and put in the necessary data.
- If you want to send emails from the local machine, enter
Y. I choseNand was able to send email via a free mailgun account. Accept the default port then enter the user and password for the email sending account. Select the SMTP authentication typeplainand OpenSSL verify modenone. Choose what sender address the emails will have likeecko@example.com.
Now it will output your configuration. Copy and paste that into the file .env.production.
The wizard will setup the database schema and precompile assets. After it's done, you can launch Mastodon with:
docker-compose up -d
You need a reverse proxy in front of your Ecko instance and for this setup we will use nginx.
In case you have an Apache running on port 80 anyway, you can also use that as a reverse proxy.
Copy the example nginx.conf to a specific one for your domain:
sudo cp dist/nginx.conf /etc/nginx/sites-available/example.com.conf
Then edit the file to replace example.com with your domain, and adust the root lines so they point to your installation. In my case I had to change the username and remove live/
Activate the configuration you added:
sudo ln -s ../sites-available/example.com.conf /etc/nginx/sites-enabled
This depends on your host operating system. Search for DigitalOcean's setup documents which work well for multiple versions of Ubuntu and Debian.
To finish up, restart nginx with sudo systemctl reload nginx