In what remains of what we know as Acts 20, Luke treats us with Paul’s final speech as a free man. Furthermore, it is his only speech in Acts that is given before only a believing audience. So, we can expect his words here to be of greater depth than what he is shown to have said before at the Athenian Areopagus in Acts 17, for example or even before the Jews of Pisidian Antioch in Acts 13. Here at Miletus, a prosperous coastal city on the eastern Aegean Sea, Paul summoned the elders of the Ephesian church (Acts 20:17), for he sailed past the port at Ephesus not wanting to delay his course to Jerusalem longer than was necessary (Acts 20:16).
Paul began his farewell address before the Ephesian church leaders by reminding them of how he lived among them for the past three years, roughly speaking (Acts 20:18; cp. 20:31). Verse-18 sets the stage for the next three verses where Paul refers to his experiences among them—things they should have been able to recall and verify the truth of what his was claiming. The reason for this jaunt through his more recent personal history was probably an effort to show the difference between a real servant of Jesus (Acts 20:19; cp. Romans 1:1; 12:11 and Philippians 2:22) and the grievous wolves (Acts 20:29) who would secretly enter the flock (cp. Acts 20:30).
Paul reminded the believers of the humility of his service to the Lord (Acts 20:19), refusing to claim any personal gain from them (cp. 1Thessalonians 2:1-2, 6-9; 2Corinthinas 11:7-8; Philippians 4:15). He spoke of his tears also, possibly reminding them of his previous tearful warnings that trouble would arise from among themselves (cp. Acts 20:29-31; cp. Philippians 3:18). Paul seems to be prophesying not by direct revelation, but from past personal experience. He understood the works of the enemies of the Gospel, that they were predictable—always behaving as they had before.
Paul also spoke of the enemy from without (Acts 20:19), reminding the listening believers that they should not expect otherwise. Indeed, it may be that the Jews instigated the riot attributed to Demetrius (Acts 19:24, 38), as had been done in Lystra (Acts 14:19), and it backfired upon them as well (cp. Acts 19:33-34). Such things are dangerous and unpredictable, but the enemies of the Gospel, whoever they are, will instigate trouble wherever possible (cp.1Thessalonians 2:14). In fact, this very meeting in Miletus occurred because of a secret plot against Paul’s life, made known to him in Corinth (cp. Acts 20:3), and may be the very reason he did not stop over at Ephesus, fearing a delay there could encourage an enemy plot. Consider that the ship that left Corinth in Acts 20:3 may well have gone to Ephesus, as did Paul’s vessel in Acts 18:18-19, before sailing off to Syria, so plans changed to fit the prevailing circumstances.
Paul went on to remind the believers that what he preached in public he also taught in private (Acts 20:20; cp. 2Corinthians 4:1-2). He was not as the gentile philosophers who acted privately contrary to what they publicly proclaimed (cp. Lucian of Samosata, Timon 54). Paul kept back nothing from the believers (Acts 20:20, 35) in so much that he could say that he was innocent of any adverse judgment of God upon them (Acts 20:26). He spoke alike to both Jew and gentile that all need to repent of their rebellion toward God (Romans 3:9) and trust in the rule of Christ their King (Acts 20:21; cp. Romans 10:12; 1Corinthians 1:23-24; 9:20-22).
 My studies show Paul arriving in Ephesus in the late spring or early summer of 53 CE. He spent two full years there evangelizing and teaching the Kingdom of God before sailing off to Macedonia and traveling to Corinth then back to Macedonia and embarking on the Aegean in route to Syria and arrived in Miletus cir. April 56 CE intending to be in Jerusalem by Pentecost. Paul pointed to his arrival at Ephesus in 53 CE to his point of departure here at Miletus as his three years of teaching the Ephesian believers.