Newer
Older
# Instructions to install LibrePaaS
## Recommendation
- API key on Namecheap (if you want to automatically buy domain name)
You can take it from a cloud provider, like DigitalOcean or Scaleway and choose to spin up a VM with CoreOS already installed on it.
You can also buy a baremetal at [Hetzner](https://serverboerse.de/index.php?country=EN) as they are the cheapest options around. Follow these [instructions](INSTALL_HETZNER.md) in this case.
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
```
#cloud-config
hostname: $hostname
ssh_authorized_keys:
- #your ssh public key here
write_files:
- path: /etc/sysctl.d/aio-max.conf
permissions: 0644
owner: root
content: "fs.aio-max-nr = 1048576"
- path: /etc/hosts
permissions: 0644
owner: root
content: |
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
- path: /etc/environment
permission: 0644
owner: root
content: |
NAMECHEAP_URL="namecheap.com"
NAMECHEAP_API_USER="pierreo"
NAMECHEAP_API_KEY=
IP=`curl -s http://icanhazip.com/`
FirstName="Pierre"
LastName="Ozoux"
Address="23CalcadaSaoVicente"
PostalCode="1100-567"
Country="Portugal"
Phone="+351.967184553"
EmailAddress="pierre@ozoux.net"
City="Lisbon"
CountryCode="PT"
BACKUP_DESTINATION=root@xxxxx:port
MAIL_USER=contact%40indie.host
MAIL_PASS=
MAIL_HOST=mail.indie.host
MAIL_PORT=587
coreos:
update:
reboot-strategy: off
units:
- name: systemd-sysctl.service
command: restart
- name: swap.service
command: start
content: |
RemainAfterExit=true
ExecStartPre=-/bin/bash -euxc ' \
fallocate -l 8192m /swap \
chmod 600 /swap \
mkswap /swap'
ExecStop=/sbin/swapoff /swap
[Install]
WantedBy=local.target
- name: install-compose.service
command: start
content: |
[unit]
Description=Install Docker Compose
[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=-/bin/bash -euxc ' \
mkdir -p /opt/bin \
curl -L `curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r '.assets[].browser_download_url | select(contains("Linux") and contains("x86_64"))'` > /opt/bin/docker-compose \
chmod +x /opt/bin/docker-compose'
- name: install-indiehosters.service
command: start
content: |
[unit]
Description=Install IndieHosters
[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=-/bin/bash -euxc ' \
git clone https://github.com/indiehosters/LibrePaaS.git /indiehosters \
mkdir /{data,system} \
mkdir /data/trash \
cp /indiehosters/unit-files/* /etc/systemd/system && systemctl daemon-reload \
cp /indiehosters/utils/* /opt/bin/'
```