summaryrefslogtreecommitdiff
path: root/README.md
blob: 3a9a96d3663369721fd74022a4615ad2aa715ac4 (plain)
1
2
3
4
5
6
7
8
9
10
11
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
62
63
64
65
66
67
68
69
70
# weewx-S3upload
Extension to upload web files to an AWS S3 bucket from where they are publicly served.

Rather than serving the web pages generated by weewx directly from a 
webserver running on the same system as weewx, I upload those pages 
to an AWS S3 bucket. The bucket is configured to be a static website
and is costing me around USD0.50/month. This is cheaper than usual 
website hosting and saves me the worry of someone hacking into the
system running weewx.

## Setup

Before installing this extensions, get an S3 bucket at Amazon
https://aws.amazon.com/. Sign into the management consule, create an
account if necessary, then create an S3 bucket.

Search their help pages for how to set up the bucket as a static
website.

Clone this repo to your weewx extensions directory; for example

```
git clone git@github.com:wmadill/weewx-S3upload /home/weewx/extensions/weewx-S3upload
```

## Installation instructions:

1. run the installer

```
cd /home/weewx
setup.py install --extension extensions/weewx-S3upload
```

2. modify the S3upload stanza in weewx.conf and set your
S3 access code, secret token, and bucket name.

3. restart weewx:

```
sudo /etc/init.d/weewx stop
sudo /etc/init.d/weewx start
```

## Manual installation instructions:

1. copy files to the weewx user directory:

```
cp -rp skins/S3upload /home/weewx/skins
cp -rp bin/user/S3upload /home/weewx/bin/user
```

2. add the following to weewx.con

```
[StdReport]
    ...
    [[S3upload]]
        skin = S3upload
        acces_key = 'REPLACE_WITH_YOUR_S3_ACCESS_KEY'
        secret_token ='REPLACE_WITH_YOUR_SECRET_TOKEN'
        bucket_name = 'REPLACE_WITH_YOUR_S3_BUCKET_NAME'
```

3. start weewx

```
sudo /etc/init.d/weewx start
```