NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi Guys, So before I start - I have done a lot of research into this, but I always seem to get stuck at the same issue.

Firstly, the setup:

Hardware: Xeon D-1520 - 32GB - Hybrid SoftRaid 2x2tb + 2x480GB SSD

Software: Ubuntu Server 16.04 "Xenial Xerus" LTS

The Problem:

So - I've managed to get a OSM tile server running by importing europe.osm.pbf by following an article here: https://www.linuxbabe.com/linux-server/openstreetmap-tile-server-ubuntu-16-04

Which got me as far as being able to render tiles and display them via a leaflet map, however, the problem is, that map is now out of date and i cant for the life of me figure out how to go about updating what is in the database currently.

So, 2 questions

  1. Is that guide linked above the recommended way to setup a tile server, if not, what would be the best guide?
  2. If that guide is fine - how would one go about updating my current europe tiles to a more up to date version

Please try to be as descriptive as possible as this is still a relatively new thing to me.

Thanks.

asked 26 Apr '18, 11:58

gaza1994's gravatar image

gaza1994
16223
accept rate: 0%

Just out of interest, how long did it take to do an "initial load" of Europe on that hardware?

(26 Apr '18, 15:22) SomeoneElse ♦

around 3-4 days (ish)

(26 Apr '18, 15:26) gaza1994

I was worried about that - that's going to rule out "overnight updates" then, I think. "diff" based updates should be possible, but you'll want to start with an up to date server, though.

(26 Apr '18, 15:35) SomeoneElse ♦

starting fresh isnt an issue!

Is there a good guide on how the "diff updates" work and how it could be scheduled to do it?

(26 Apr '18, 15:38) gaza1994

I don't know of a good "how they work" guide but this section should tell you what you need to do.

I guess that there ought to be a page at switch2osm.org about it, but no-one has written that yet. Feel free to volunteer :)

(26 Apr '18, 15:46) SomeoneElse ♦

I'd suggest doing applying updates as described here for 16.04 (or here for 18.04). Those use the same software as the switch2osm guides for 16.04 and 18.04, which is mostly similar to the LinuxBabe notes, with some default user acount changes. Some repositories are using forked versions to avoid user typing and editing where possible.

One thing to look out for - the forked version of mod_tile (which contains openstreetmap-tiles-update-expire) has been modified to use https destinations only for openstreetmap.org. The version you have installed may not do this. It's a one-line change in the code though, so easy to apply.

permanent link

answered 26 Apr '18, 12:30

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

If you want a one-off update only, and not set up continuous updates, then you could also do the following:

  • repeat your "osm2pgsql" step with a more recent data file, and then
  • (optionally) run render_list again to re-generate tiles

While the update is running, you won't be able to generate tiles since the database is empty, but existing tiles will still display. If this is not acceptable to you, you could also import into a new database (say, "gis_new"), and when the import is complete, drop your old database and rename the new. If your disk space is not sufficient for two parallel databases, you can "drop table planet_osm_ways; drop table planet_osm_nodes; drop table planet_osm_rels;" on the old databases before you start, this will free over 50% of the disk space and make your old database still-working-but-un-updatable - not a problem since you plan to get rid of it anyway.

permanent link

answered 26 Apr '18, 13:02

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

1

what would be a good method if i wanted to update often, say once a month?

(26 Apr '18, 14:48) gaza1994
1

"Once a month" is about the worst thing that you can do because it's already too seldom for using the "diff" based updates (updating a database with all the diffs for one month will likely take more time than loading the whole thing anew) and at the same time a bit frequent for doing full data loads. But still I'd go for the full data load - should just about be doable over night on your platform.

(26 Apr '18, 15:04) Frederik Ramm ♦

so basically, Load EU - render the tiles, then when updating, nuke the database, re-import EU and force a re-render of all the tiles?

(26 Apr '18, 17:07) gaza1994

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×440
×204
×61
×4

question asked: 26 Apr '18, 11:58

question was seen: 4,963 times

last updated: 26 Apr '18, 17:07

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum